on 04-04-2014 1:28 AM
I need to connect to a DLL using 'COM Connectivity" and a function to provide data for my crystal report in c#,
I have one report that gets populated via a database:
// DATABASE via ODBC-DSN
TableLogOnInfo tblLoginInfo = tbl.LogOnInfo;
tblLoginInfo.ConnectionInfo.ServerName = dsn;
blLoginInfo.ConnectionInfo.UserID = username;
tblLoginInfo.ConnectionInfo.Password = pw;
tbl.ApplyLogOnInfo(tblLoginInfo);
tbl.Location = db + "." + tbl.Name;
// this works great
I have another crystal report that is populated by COM Connectivity
// COM
TableLogOnInfo tblLoginInfo = tbl.LogOnInfo;
tblLoginInfo.ConnectionInfo.ServerName = "myclassname";
tblLoginInfo.ConnectionInfo.Type = ConnectionInfoType.CRQE;
// tbl.Location = ??
// this doesn't work. The report generated is empty/corrupted, but it gives no error
Thank you for your help,
Tammy
Hi Tammy,
Correct, that will never work, crqe is not a database driver.
What do you mean by COM Connectivity, what is the data source?
Do you mean a DataSet or a WEB Service?
Don
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Don,
The Datasource is a Dataset from a function call from a DLL. I'm think I'm setting up the parameters wrong, but I can't find any examples for reference.
I get true returned when I run tbl.TestConnectivity().
When I run ExportToDisk to create the PDF, I get a completely blank tiny PDF.
Any help would be appreciated,
Tammy
Hi Tammy,
Run the report from the IDE and preview it Then from the viewer export to RPT format. Now open that report up in you app and do you see data when exported?
Could be you are not setting the export code correctly.
Try viewing the report by adding the CR viewer to a Form and export the report from the Export button.
Sorry, I don't have your code so I can't help you debug it...
Don
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.