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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Caching crystal reports? - is it possible?

Status
Not open for further replies.

crystalReporterNew

Programmer
Jan 18, 2004
24
US
Hi,

I am wondering if it is possible to create a crystal report and save it on the disk, and then later retrieve the same report and view it in the crystal report viewer. I know I can save it as pdf etc but I dont want to do that. I have saved it as a .rpt file on my local machine but when I try to set the crystalreport viewer to that file it asks for my database connection again. I gather from this that it does not actually save the data but tries to connect to the database again to get the values. Can someone clarify this? I am using the following snippets of code:

adoOleDbDataAdapter1 = New OleDbDataAdapter(sqlString, adoOleDbConnection1)
adoOleDbDataAdapter1.Fill(DataSet1, "student1")
crReportDocument.Database.Tables(0).SetDataSource(DataSet1.Tables(0))

In another form I am doing:

CrystalReportViewer1.ReportSource = "C:\reporterNew\bin\trialreport.rpt"


where the last line gave me a previously saved crystal report. Is it true that the data does not get saved on the disk but gets retrieved from teh database everytime the repot is loaded??

Please help
thanks





 
When you are saving the file choose the option 'save data with report' as opposed to just saving the report - this allows you to work with the data off-line
 
I dont see any option of saving the data as well with the export report option. Where exactly does it allow you to save data with report??

Thanks
 
Save Data with Report is in the File menu. However, it will only save the last set of data the report was run with. Each time you run, you'll overwrite whatever data was there. If you need to have a longer term view of what the contents of the report has been over time, you'll probably need to use Crystal Enterprise.

-D
 
Hi,
I really do not have any such options in the file menu.
I am using Microsoft Visual Basic.NET for the crystal report and the file menu there doesnt contain any such option. Also the crystal report itself when viewed in the crystal report viewer does not have a File option itself(leave alone the save data option)...I only have options such as print,goto, export report(which allows me tos ave in the normal fashion). Am I missing something?


Please help
 
I haven't seen the version that comes with MS VB.Net, so I don't know were/if the option is in that version. As I said, Crystal Enterprise may be your only option for saving data with various "runs" of a report.

-D
 
Any export of a Crystal report to an RPT file, creates a report file with saved data. Hence, you can create your own viewer or scheduler and manually or automatically export to get snapshots of the report with data as of a given date and time.

If you don't want to develop the viewer/scheduler yourself, there are various 3rd-party tools you can select from. See a list at:
Cheers,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top