Skip to Content
author's profile photo Former Member
Former Member

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

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Dec 29, 2011 at 09:49 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • 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.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.