Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Generate one PDF per record Expand / Collapse
Author
Message
Posted Thursday, November 22, 2012 4:21 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, February 22, 2013 7:04 AM
Points: 2, Visits: 25
Hi all,

I've built a report which displays data from a db. This works fine, rendering the report correctly.

My query returns ~40,000 records. I would like to automatically generate a pdf file for each record, named using one of the fields returned by the query.

How do I automate this? I have Report Builder 3, and Visual Studio.

Thanks.
Post #1387829
Posted Monday, November 26, 2012 3:01 PM
UDP Broadcaster

UDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP Broadcaster

Group: General Forum Members
Last Login: Monday, July 7, 2014 1:06 PM
Points: 1,478, Visits: 1,025
SSRS only lets you create 1 PDF Per Report Execution.
So if your report returns 40,000 Pages, It will still only export 1 PDF File.

You can create a report that takes the record in you want, and export the pdf for that 1 record, and run it 40,000 times.
to get it to run 40,000 times you can create a service or winapp that gets a list of all 40000 records and loops thru the recordset calling the report for each ID.

You can perhaps Create the 1 PDF with 40,000 pages and automate someother program to create 1 PDF file per page.




Post #1388867
Posted Monday, November 26, 2012 10:08 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 1:55 PM
Points: 36,749, Visits: 31,197
Or, send it to WORD as a "merge file" and let it do it.

--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #1388936
Posted Tuesday, November 27, 2012 1:05 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, February 22, 2013 7:04 AM
Points: 2, Visits: 25
Thanks for the replies guys, much appreciated.

I've gone with the 'single report being called over and over' approach, using this example:

http://msdn.microsoft.com/en-us/library/reportexecution2005.reportexecutionservice.render.aspx
Post #1389003
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse