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

Crystal Reports 8.5 -- Too Many Files Open

Status
Not open for further replies.

David718

Programmer
Jan 22, 2007
4
US
Hi,

I have an VB6 Application that runs Crystal Reports 8.5 for user selected accounts, now if the user selects 40 different reports for lets say 20 accounts, then I will get 20 x 40 reports open with my viewer form, but if user selects one more account to run reports, then I get the "too many files open" error.

So, to try to bypass this problem, I am trying to dynamically copy the report file to a new uniquely generated file name, and run the report instance with the copied report file, that way I will always have only one instance for any given report, what can I say, its a very good idea, and it works too, with one BIG problem, the is a multi-user app (or so my client says) so, I need a way to kill the generated report file at the time the user closes the Report viewer form (at unload or terminate) because as long the form is open I should still have the report file name in the local variables, but I am getting the permission denied even after report is set to nothing and so on.

So how can I delete the report file right before the form is close?

Thanks
David Klein
 
> generated report file

Why isn't the temporary data used for the report stored locally, or based on a users temporary db table?
 
I am sorry, I ment that i have a new .rpt file so the report called is the new .rpt so the rpt file is called for the first and last time.

i.e. the orig report file is AccountSummary.rpt
the new rpt file is named
<account number>_AccountSummary.rpt

Thanks
David Klein
 
Then store the temporary report locally so the conflicts with other users doesn't happen.
 
The client does not want to have to update multiple computers, so they are running it from the network.
 
You said this is a temporary report. So just copy it from the server to locally prior to using it. If the data in the report is based on a server database table(s), then set the DataFiles location for the report dynamically.

Please ask further in the Crystal Reoports Forum766, Forum768 or Forum149
 
that is what I am doing, copy the rpt file to new location (and diff name), but then I want to delete the copied rpt file, and again, as I see it (now) the only time I have the filename is within the open CRViewer1 (form),
So how do I close the CRViewer1 to free up the rpt file, so I can delete that file?


the reason why I do not want to have a copy of all the report files on the users local dir. is because if I do, then every time I send an update or new report file, the client will have to remember to update all the users local machine, so instead the exe and rpt files are located on the network drive and user exec the app with a shortcut.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top