Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

generating reports using VS 2008

Status
Not open for further replies.

dinger2121

Programmer
Sep 11, 2007
439
US
Hello,
I have a need to create and save a file from a template in VS 2008. I was hoping to be able to use a crystal report for the template, populate it with data when a new request is entered, and save it as a pdf in the background.
Can someone recommend the best way to accomplish this.

Thanks for any thoughts.
 
what you describe is correct. This is how I currently generate pdfs. I have a love/hate relationship with it.
love it, because it's easy to configure the layout. hate it because formulas are tedious and the output cannot be tested in an automated fashion.

my approach is
1. query the database and load a collection/datatable.
2. pass the collction/datatable to the crystal report
3. set any parameters on the crystal report
4. export to whatever... I usually export to file or stream

I never have my crystal reports access the database directly. This couples the presentation of information too tightly with the retrieval of data.

remember to dispose of the report/export stream when you are done with it. if not you will hit some 75 concurrent user instance maximum 'thing'.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top