Showing posts with label pdf. Show all posts
Showing posts with label pdf. Show all posts

Wednesday, March 21, 2012

generating reports and saving them on the disk

Hi,

I want to know how to generate reports as pdf and save them on the disk 'automatically' at regular intervals. I have seen some links by googling but none satisfactory. If any of you have already done this and it works well for you, please share the info.

Can they be saved to the database automatically?

Please give you answer considering that all this is very new to me :)

I appreciate the help. thanks

ROn.

A step by step generation of rdlc as pdf and saving it on a given folder location is given in the foll post.

http://technoblab.blogspot.com

Do u want the rdlc itself to be generated and saved periodically w/o user intervention then ?

Then probablly I'll try ..

.......................................................................

Please "Mark As Answer" on the post that helped you.

|||

Hi,

Thanks. I need to automate the process. How to do that. Plz help.

thanks

|||

Anyone who could help me here!!

|||

hey,


Implement windows service which will run in the background and generate the report each interval time you specify in thetime ticker in the service app.config

to do this you can read the full example in this link http://en.csharp-online.net/Creating_a_.NET_Windows_Service%E2%80%94The_Timer_Approach

each time the timer method execute you call the reporting service web service and execute the report then stream the result and save it on your local server

sql

Generating Multiple Reports

I have a report that I pass parameters of a clientID. I run the report and export it to a .pdf file. I would like to be able to do this for multiple clients without manually having to enter the ID each time and exporting it.

I have thought about creating a report that calls this report so that I can pass in the clientID one at a time. The problem is trying to export each one.

Does anyone have any ideas? Thanks in advance!

I beleive you can use the reportviewer.render method to export directly to a PDF. I've done a similar app going straight to printer.|||

Let me quote myself from http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2048825&SiteID=1

Two methods come to mind:

1. You can run reports from the command line using the rs command (documentation) as described in the following SQLJunkies article:

http://sqljunkies.com/Article/B197B9E7-EF3D-4D70-9B5E-47B74E57EF38.scuk

which doesn't seem to be up for me so here is the Google cache link:

http://64.233.167.104/search?q=cache:XvoyQYWNs50Jqljunkies.com/Article/B197B9E7-EF3D-4D70-9B5E-47B74E57EF38.scuk&hl=en&gl=us&strip=1

Within the VB script that you run, query your tables and feed the parameters.

2. You could use a variant of a Data Driven Subscription. You will need the Enterprise version of SSRS to use Data Driven Subscriptions. Here is a tutorial on building one:

http://msdn2.microsoft.com/en-us/library/ms169673.aspx

I came accross this article by Jason Selburg which claims to allow you to build your own data driven subscriptions using Standard Edition:

http://www.sqlservercentral.com/columnists/jselburg/datadrivensubscriptions.asp

and his follow up:

http://www.sqlservercentral.com/columnists/jselburg/2824.asp

and I believe either method will work for you here. If you need a more specific answer, let me know.

Good luck,

Larry Smithmier

Monday, March 19, 2012

Generating letters in SSRS

Hi. I'm looking for tutorials on how to use SSRS 2005 to generate letters in Word or PDF format from a database. We need to send letters with our company logo and some boilerplate text to a set of companies based on a SQL Server query. So the letter will look something like this, with the red areas repeating from the dataset,

[logo goes here]


123 Any St.
AnyCity, CA 90210

[today's date]

Dear [name from database],

Some boilerplate text goes here. Your Account [account number from database] is past due.

Sincerely,

[scanned signature goes here]

Somebody


Don't have a tutorial but here are the high-level steps:

1. Use the Data tab to create a dataset that returns on record with all fields required.

2. On the Layout tab, drop a List data region and add textboxes in it to hold the content.

3. Type in fixed text in the approapriate textboxes.

4. You can concatenate text in textboxes as needed, e.g.: = "Dear " & Fields!Name.Value

Monday, March 12, 2012

Generating a PDF type report and embeding fonts

When a .pdf file is generated by reporting services, does it embed the fonts used into the .pdf?, or is there any way to tell reporting services to "embed all the fonts"? Thanks in advance.

Hi Sunny --

No, the PDF extension does not do font embedding...There is no way to force this behavior, either.

|||Thanks for the info dude!|||Is there a plan to add this to newer versions of Reporting Services?

Generating a PDF type report and embeding fonts

When a .pdf file is generated by reporting services, does it embed the fonts used into the .pdf?, or is there any way to tell reporting services to "embed all the fonts"? Thanks in advance.

Hi Sunny --

No, the PDF extension does not do font embedding...There is no way to force this behavior, either.

|||Thanks for the info dude!|||Is there a plan to add this to newer versions of Reporting Services?

Sunday, February 26, 2012

Generate Reporting Services directly to PDF file

Hi,

I want my Reporting Services generate Report directly to PDF file after showing just like i did with Crystal Reports. I get problem with RS because RS does not show it printer icon in my client PC.

Could you help me to show how to do it ?

Thanks and Regards,

Kusno

it's easy to call the reporting service web service and call the report you want then stream the result and save it as PDF for more info and example please read this article

http://www.codeproject.com/sqlrs/PDFUsingSQLRepServices.asp

Generate Report Direct to PDF

Hello All,
I have been asked to find a solution for generating an SSRS report
directly to PDF without the client ever viewing it. There are a couple of
particualrs about our requirements:
1. The report is being called from a third party piece of software
2. We have no, or at most, very limited control of this third party app
(some URL control possible)
3. The location the PDF is to be generated to is static
Any information, links, articles, sample code would be muy, muy appreciated
Gracias
Michael CReporting Services provides a set of Web Services that you can use to get
find targeting report, render it as binery stream in one of the output
format (PDF, XLS, HTML...).
You can simply wite an application to call corresponding web methods of the
reporting services. This application can be any type: desktop, web app or
even Windows services..., based on your need.
I have no idea how the said third part app calls the report. But it is
fairly simple to build a ASP.NET app, which works this way (you need to set
web reference to the report server and know how to consume web services in
your app):
1. User is presented a web page, which allow he to select a report and enter
required report parameters, his email address is also collected, where the
report would be sent to in the format of his choice (PDF, XLS...);
2. When the user submit the web form to server, one of the web methods of
the reporting services is called to render the requested report into binary
stream (PDF or XLS...) and returnd to ASP.NET app;
3. The binary stream of the report is saved to a temporary location on the
ASP.NET app server;
4. The ASP.NET app compose an email, attach the saved report, send the email
to user's email address.
After step 2, of course, you can also stream back the report binary data to
user's browser, in this can, user's browser would prompt user with a
download dialog box. User can choose either open it or save it.
"Michael C" <MichaelC@.discussions.microsoft.com> wrote in message
news:C75284F9-60BA-415C-8D2D-CB41F245A232@.microsoft.com...
> Hello All,
> I have been asked to find a solution for generating an SSRS report
> directly to PDF without the client ever viewing it. There are a couple of
> particualrs about our requirements:
> 1. The report is being called from a third party piece of software
> 2. We have no, or at most, very limited control of this third party app
> (some URL control possible)
> 3. The location the PDF is to be generated to is static
> Any information, links, articles, sample code would be muy, muy
> appreciated
> Gracias
> Michael C|||Thanks Norman,
I'm not too familiar with ASP.NET but necessity is the mother of
invention! Ill give this a shot.
Michael C
"Norman Yuan" wrote:
> Reporting Services provides a set of Web Services that you can use to get
> find targeting report, render it as binery stream in one of the output
> format (PDF, XLS, HTML...).
> You can simply wite an application to call corresponding web methods of the
> reporting services. This application can be any type: desktop, web app or
> even Windows services..., based on your need.
> I have no idea how the said third part app calls the report. But it is
> fairly simple to build a ASP.NET app, which works this way (you need to set
> web reference to the report server and know how to consume web services in
> your app):
> 1. User is presented a web page, which allow he to select a report and enter
> required report parameters, his email address is also collected, where the
> report would be sent to in the format of his choice (PDF, XLS...);
> 2. When the user submit the web form to server, one of the web methods of
> the reporting services is called to render the requested report into binary
> stream (PDF or XLS...) and returnd to ASP.NET app;
> 3. The binary stream of the report is saved to a temporary location on the
> ASP.NET app server;
> 4. The ASP.NET app compose an email, attach the saved report, send the email
> to user's email address.
> After step 2, of course, you can also stream back the report binary data to
> user's browser, in this can, user's browser would prompt user with a
> download dialog box. User can choose either open it or save it.
>
> "Michael C" <MichaelC@.discussions.microsoft.com> wrote in message
> news:C75284F9-60BA-415C-8D2D-CB41F245A232@.microsoft.com...
> > Hello All,
> > I have been asked to find a solution for generating an SSRS report
> > directly to PDF without the client ever viewing it. There are a couple of
> > particualrs about our requirements:
> >
> > 1. The report is being called from a third party piece of software
> > 2. We have no, or at most, very limited control of this third party app
> > (some URL control possible)
> > 3. The location the PDF is to be generated to is static
> >
> > Any information, links, articles, sample code would be muy, muy
> > appreciated
> >
> > Gracias
> > Michael C
>|||You mentioned URL access. You can easily tell reporting services to execute
a report to PDF format by using URL access from you third party application.
When you call the desired report add to the calling URL this name=value pair
" &rs:Format=PDF" (no quotes of course).
--
Thanks, Jim
"Michael C" wrote:
> Thanks Norman,
> I'm not too familiar with ASP.NET but necessity is the mother of
> invention! Ill give this a shot.
> Michael C
>
> "Norman Yuan" wrote:
> > Reporting Services provides a set of Web Services that you can use to get
> > find targeting report, render it as binery stream in one of the output
> > format (PDF, XLS, HTML...).
> >
> > You can simply wite an application to call corresponding web methods of the
> > reporting services. This application can be any type: desktop, web app or
> > even Windows services..., based on your need.
> >
> > I have no idea how the said third part app calls the report. But it is
> > fairly simple to build a ASP.NET app, which works this way (you need to set
> > web reference to the report server and know how to consume web services in
> > your app):
> >
> > 1. User is presented a web page, which allow he to select a report and enter
> > required report parameters, his email address is also collected, where the
> > report would be sent to in the format of his choice (PDF, XLS...);
> >
> > 2. When the user submit the web form to server, one of the web methods of
> > the reporting services is called to render the requested report into binary
> > stream (PDF or XLS...) and returnd to ASP.NET app;
> >
> > 3. The binary stream of the report is saved to a temporary location on the
> > ASP.NET app server;
> >
> > 4. The ASP.NET app compose an email, attach the saved report, send the email
> > to user's email address.
> >
> > After step 2, of course, you can also stream back the report binary data to
> > user's browser, in this can, user's browser would prompt user with a
> > download dialog box. User can choose either open it or save it.
> >
> >
> > "Michael C" <MichaelC@.discussions.microsoft.com> wrote in message
> > news:C75284F9-60BA-415C-8D2D-CB41F245A232@.microsoft.com...
> > > Hello All,
> > > I have been asked to find a solution for generating an SSRS report
> > > directly to PDF without the client ever viewing it. There are a couple of
> > > particualrs about our requirements:
> > >
> > > 1. The report is being called from a third party piece of software
> > > 2. We have no, or at most, very limited control of this third party app
> > > (some URL control possible)
> > > 3. The location the PDF is to be generated to is static
> > >
> > > Any information, links, articles, sample code would be muy, muy
> > > appreciated
> > >
> > > Gracias
> > > Michael C
> >
> >

Sunday, February 19, 2012

Generate a report, export to PDF

I want to programmatically pass in some parameters, generate
a report, export this report to PDF, and pop up adobe acrobat reader in a web
browser in one click while naming the PDF file exactly as I like, including
its path. I currently do this easily with Crystal Reports in one click, but
I need to see if its feasible in RS.
In crystal I use an ASP.net page that does all of this for me. I declare the
report, get the parameters, fill them, set up the username/password for the
database, set a name for the file, and set the export options, and then
generate the report.
If I could get some direction as to how to do some of this stuff, it would
be great =) We are thinking that while its not pretty we are going to use the
URL method if possible to do this stuff, because we already have a custom web
app in place, and no need for a shell etc. We just need a web page that can
do this for us upon hitting submit.
Again, any direction you can offer would be great
TIAHi Pinolian:
From ASP.NET you code access the report server with URL access and the
WebClient or WebRequest classes. Once you have the file pulled down to
the ASP.NET application you could stream the file to the client by
setting the content disposition header and using Response.BinaryWrite.
Some sample code would look like this:
byte[] response;
string url = "http://s/reportserver?Report&rs:Format=PDF";
using(WebClient webClient = new WebClient())
{
webClient.Credentials = CredentialCache.DefaultCredentials;
response = webClient.DownloadData(url);
}
Response.ContentType="application/pdf";
Response.AddHeader(
"content-disposition",
"attachment; filename=MyPDF.PDF"
);
Response.BinaryWrite(response);
--
Scott
http://www.OdeToCode.com/blogs/scott/
On Tue, 19 Oct 2004 13:59:01 -0700, "Pinolian"
<Pinolian@.discussions.microsoft.com> wrote:
> I want to programmatically pass in some parameters, generate
>a report, export this report to PDF, and pop up adobe acrobat reader in a web
>browser in one click while naming the PDF file exactly as I like, including
>its path. I currently do this easily with Crystal Reports in one click, but
>I need to see if its feasible in RS.
>In crystal I use an ASP.net page that does all of this for me. I declare the
>report, get the parameters, fill them, set up the username/password for the
>database, set a name for the file, and set the export options, and then
>generate the report.
>If I could get some direction as to how to do some of this stuff, it would
>be great =) We are thinking that while its not pretty we are going to use the
>URL method if possible to do this stuff, because we already have a custom web
>app in place, and no need for a shell etc. We just need a web page that can
>do this for us upon hitting submit.
>Again, any direction you can offer would be great
>TIA