on 08-22-2011 7:06 PM
Hi
I have a crystal report that connects to a text file using (Access/Excel DAO).
Now I wrote a C# .net code that loads this report and change the file name to the text file to a different file
using table.TableName and table.Location to the new file and location,
then I do applyLogonInfo.
This worked perfectly on the machine where I developed my report and code but when I put the
files to a different machine where I need to deploy the reports, I get the following error.
Unable to connect: incorrect log on parameters.
at CrystalDecisions.ReportAppServer.Controllers.DatabaseControllerClass.SetTa
bleLocation(ISCRTable CurTable, ISCRTable NewTable)
at CrystalDecisions.CrystalReports.Engine.Table.set_Location(String value)
at ComponentCalcsReport.GenerateCrystalReport.getReportInPdf(String reportfil
e, String fileName)
I have done the following on the deployment machine.
1) I have installed the CR_runtime libraries required to be able to run crystal report applications.
2) I have put my .rpt file and the .csv database files in the correct folder.
3) I have put my exe file on the machine.
I run it from the command line.
Am I missing something like registering the DAO or creating a DSN explicitly?
Hi,
After searching through the forums I found this nice document
Using it's steps, I found out that when I created the report file using CR, I had the data connection set as a path
on the D drive. But the client/deployment machine did not have a D drive and hence the path to which the database was
pointing to. Therefore, the error "cannot connect to database" since the database name was pointing to D:pathToData
When I created a report that was on the C drive and it's data connection was also made from C drive then the same report worked fine on the client machine. I had to make sure that on the client machine I set up the exact same folder structure as the development machine's (i.e. C:pathToMyDataandReportFolder).
I tried using the setConnection function to change this path at run-time but did not succeed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.