cancel
Showing results for 
Search instead for 
Did you mean: 

How to run report using custom driver? Server type USERSPECIFIED fails

Former Member
0 Kudos

Hello everyone,

When trying to run report with the crdb_ado custom driver as code shows below, I get an error in Java. It doesn't like the server type USERSPECIFIED enumeration of 1000. What should I use if I want to run the report using custom driver:

IReportLogon crystalReportLogon... 
...
crystalReportLogon.setOriginalDataSource(Boolean.FALSE);
crystalReportLogon.setPromptOnDemandViewing(Boolean.FALSE);
crystalReportLogon.setCustomDatabaseDLLName("crdb_ado.dll");
crystalReportLogon.setCustomServerType(IReportLogon.CeReportServerType.USERSPECIFIED); // Fails here with error below
//[more code that sets credentials,etc]

...

Fails at the line marked above and gives this stack trace. The enumeration for USERSPECIFIED is 1000 but is apparently invalid for the method setCustomServerType

com.crystaldecisions.sdk.exception.SDKException$InvalidArg: The argument has an invalid value 1000

at com.crystaldecisions.sdk.plugin.desktop.report.internal.ReportLogon.setCustomServerType(ReportLogon.java:308)

Edited by: bartimus on Dec 29, 2011 11:08 AM

Accepted Solutions (1)

Accepted Solutions (1)

former_member185028
Active Participant
0 Kudos

Hello.

Please go to the following link to see a sample that demonstrates how to set the custom database logon information for a Crystal Report using the Enterprise SDK:

http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/e0fdbd98-9953-2e10-71a1-b2b54a659b11

Please go to the following link to see a sample that demonstrates how to schedule a Crystal Report now with custom database logon information using the Enterprise SDK.

http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/c0c17826-9953-2e10-139a-c568b0f5f847

I hope that looking at these samples helps.

Regards.

- Robert

Former Member
0 Kudos

Interesting! So if the server type is USERSPECIFIED, you don't set it, you ONLY set the custom DLL. I was setting both.

Thanks Robert!

Adam_Stone
Active Contributor
0 Kudos

Interestingly, in the .NET SDK documents it has this information about the ReportLogon.CustomDatabaseDLLName property:

Once you set this property, the ReportLogon.CustomServerType Property property is automatically set to 1000 (user-defined).

The Java SDK must do something similar internally, but just isn't documented.

Answers (0)