If the production database is different from the development database loading the report take more then two minutes.
Is the a way to avoid this issue.
The code to print the report is the following....
I would check to see if the same printer is available on both systems. I find when I get foreign reports they take a long time to load and then I get an PRINTER message saying the printer the report was developed with is not available and the default printer will be used. In general I never have the database available.
These are reports users upload here so I don't expect to have the database.
mlmcc
PCIIain
Crystal 2008 just seems to take a very long time to switch the data to different databases. We have speeded up some necessary reports by converting the data source to a command, meaning it only has one 'table' to switch databases, but there was a significant drop in loading speed between Crystal XI and Crystal 2008.
vasto
You can save the production report with the production connection and you will avoid crystal reports to verify the database each time you switch the connections. You will still need to set database connection , but this will be just to set the user and password. However loading is before SetDBConnectionForReport so your problem is somewhere else. 2 minutes is too big period . It looks like timeout to me. It can be a missing printer, mapped drive or a connection issue.
Are you running the report on the same machine where test world report is working fine?
By changing the database to the production on Crystal Reports solves the problem, but still if the client changes teh database name or server location the problem persists
The mais issue is that the same report is used in diferente Servers / databases. It's anoying tho produce one for each server /database.
It seem that on Load it check´s the database connection, before I have the chance to change it.
I have seen some 'load' event preapps is there the correct place to change logon parametes?
Mike McCracken
Is there an OPEN method on the report document?
I believe LOAD tries to run the report where as OPEN just opens the report for modifications like you want to do?
myReport.OPEN(reportPath);
Why do you do a REFRESH?
If you are always going to do a refresh, you could simply not save the report with data and the report will automatically load the newest data.
mlmcc
vasto
Do you have option "Save data with report" checked (in Report options) ?
No I don't wave the option 'save data with report' and there is no 'open' method available.
I have addes thsin tow lines with no efect.
myReport.FileName = reportPath;
myReport.SetDatabaseLogon(m_UserID, m_Password, m_Database);
myReport.Load(reportPath);
There is a EnterpriseSession method, what is it for?
vss-pt, obviously the report is trying to connect to the database on load. Any chance to upload the report here ?
If you cannot upload then:
- What is the version of this report ? I have seen some crystal 8 -8.5 reports with integrated security which were trying to connect to the initial database no matter what you are doing. What is your login type ?
- Do you use command ?
- Do you have dynamic value list ?
vss-pt
ASKER
mlmcc:
The load method is the line in samples...
cryRpt.Load("PUT CRYSTAL REPORT PATH HERE\CrystalReport1.rpt")
...
vasto:
I don't have the final release on hand, but this repçort prodices the same efect.
I think the problem is not report related, but with the Crystal API for VS 2005.
But still if you have any ideas. For now I have created a copy of the report for each database,
I know it doesn´t make any sense but I cant have the use waitin 2 minutes to print a card.
vss-pt , something is messed up with the database information.
We have a tool which is changing the datasource to fix issues like this. Please check the report and let me know if it is fixed now. APL-Frente.rpt
vss-pt
ASKER
vasto:
Yes in fact loadreport executes imediatly, but setting server/database/user/password wont prevent login box to be displayed.
On the login box, the database is blank so we cannot even manualy logon.
But still this is the way to solve the problem
Two questions, the first one is what product do you use to 'fix' the report? Also what version is the report on?
These are reports users upload here so I don't expect to have the database.
mlmcc