10-11-2016 05:07 AM
Hi Marco_Ge,
I've tried to run, and I have too problems....
I need an SQL Database.I set up the connection, but informs me the error of nonexistence of the report to open
10-11-2016 05:19 AM
Yes it is necessary a Database connection!
I did not put in my example since the question was focused on the viewer.
Try to swap the OpenReport method and the LogOnServerEx method.
I used connection strings (generated through an .udl file) to store the connection parameters.
bye
10-11-2016 06:35 AM
I've tried to modifie the code, but I have the same problem.
The connection string I've used is correct and work fine, but .vi program presents the same error.
I've installed the CR version in the image.
What's wrong into my code???
Thanks
10-11-2016 07:01 AM
The programming flow is correct... I used it .
If the report .rpt opens without error from the main CR application, then I think your problem should be located inside the parameters you pass to LogOnServerEx.
Looking at them, they are different from mine.
First, put 'crdb_ado' that is the name for the CR active-x data objects driver.
Second, verify that the requested inputs are connected wire by wire... look at my connection string and build one by yourself for your specific database (make a Database connection and then extract the connection string) from an .udl file. (see bottom (*) ).
Keep the wirings to the LogOnServerEx method as in the original example.
Note(*): Create an empty file and change extension to .udl to retrieve connection string.
Open it and from Providers tab select your DB provider (Oracle or others).
In the connection TAB you'll se your database name inside "Data Source Name " control.
Set other information such as Name, Password and database table name.
Click "Check connection" to see if it is OK.
At the end, click OK the window closes and you have saved and configured your .udl.
Now open it with a text editor and you will find the connection string.
10-11-2016 07:13 AM
One more: An error wire is missing between the ReportSource and Refresh methods; then put error probes at each node to see where the error begins to propagate.
10-11-2016 07:39 AM
The parameters to your LogOnServerEx and mine are different (It's possible that I have a problem with the CRAXDRT??. The vi runs ok).
All the steps to build and .udl file are correct and I made it like you.
Could send me the code with the LogOnServerEx you indicated on the image to see if I have a problem with the property node automatically detects in my .vi?.
I dispose of several facilities since development CR reports in several versions for old customers.
Apology for the inconvenience.
10-11-2016 07:46 AM
For customer side, I used only to install CrystalXIrdc.msi on destination machine.
This provided me the method included.
10-11-2016 07:58 AM
It works now!!!!!
The only thing is that by linking the name of the database, the report always retrieves one with which it was designed.
Is there any way to tell the source database? (By linking the LonOnServerEx the name of the database, the values do not change. If I Indicates into connection string don't work.).
Thanks!!!!!!!
10-11-2016 08:05 AM
As far I know, wiring the exact fields to the LogonServerEx method should provide the database connection to the report, so maybe you have to check once again your parameters...
If it works... give a kudos!
Bye
M.
10-11-2016 08:07 AM
PS Have you checked your connection string generated with your UDL? (Test connection).
Was it working?