Archived discussions are read-only. Learn more about SAP Q&A

Invalid subreport name Error code:-2147483086

The setup used in this particular environment is to run reports via Crystal reports server 2008. We call the servers via the rassdk_java_dg_12_en and the setup works just fine BUT in one particular case.

The report that fails have a main report with a datasource to SQL. The report does have about 20 - 25 subreports mostly based on the same datasource. There are however 6 subreports that uses ttx files as datasources.

The report works fine when there is no data for the ttx subreports, but whenever a "change datasource" is tried to the ttx subreports the error "Invalid subreport name Error code:-2147483086" pops up.

We have done noumerous tests on the pojo approach in other reports so the technic and code works just fine - it most be some special case in the report.

Before we start to try to rebuild the report we will give you a chance to help us out. The report sucker is big and complex so a rebuild is not wanted...

Here is the particular code involved


private static void passPOJO(ReportClientDocument clientDoc,
            ReportPojoHolder pojoHolder, String reportName) 
                throws ReportSDKException,ClassNotFoundException {
        
        
        //Its a pojo data source, but it's nothing in it
        if (pojoHolder.getPojos().size() == 0) {
            return;
        }
        
        String reportTable = pojoHolder.getTableName();
        Object pojo = pojoHolder.getPojos().iterator().next();
        
        
        POJOResultSetFactory factory = new POJOResultSetFactory(pojo.getClass());
        POJOResultSet resultSet = (POJOResultSet)factory.createResultSet(pojoHolder.getPojos());
        
        if(reportName == null || reportName.equals("")) {
            clientDoc.getDatabaseController().setDataSource(resultSet, reportTable, reportTable); 
        }
            
        else {
            
            System.err.println("Setting data in " + reportName );
            
//Here comes the error
            clientDoc.getSubreportController().getSubreport(reportName).
                getDatabaseController().setDataSource(resultSet, reportTable, reportTable);
           
        }
    }

Here is the stacktrace:

table: srptMainCustomerList;1, subrapport: AddressField
table: srptusrinf;1, subrapport: AdvisorName
table: srptusrinf;1, pojo: Beta
table: srptusrinf;1, pojo: JensensAlpha
table: srptusrinf;1, pojo: PerformanceChart
Setting data in PerformanceChart
2009-02-06 09:05:31,720 ERROR (CrystalReportServlet:doGet()) - [Username=Patrik Andrén, UserID=n249060, CustId=005563741684, Cstid=37385] - (Creation of report: customer_report.rpt failed on: [ReportAppServer: CCA1CS0569. Datasource: cca1cd0046qa1|omega] com.crystaldecisions.sdk.occa.report.lib.ReportSDKServerException: 
Fel i filen customer_report {CDCDCEC2-050C-4405-865C-6031D4BFF2DE}.rpt:
Ogiltigt underrapportnamn.---- Error code:-2147483086 Error code name:failed, ) - [applicationId=omega, omegaUserId=omega.userid, credentials=IT, groupName=IT, sessionId=yLkhJLtYpLlDQ5Jf5S2GkzhPfSZJBg2zZkT4LfQ0L1bJg2v20pz2!-2033571304!1233906968432, requestId=06968853:167:000], exception-stack=
com.nordea.omega.report.exceptions.ReportGenerationFailedException: Creation of report: customer_report.rpt failed on: [ReportAppServer: CCA1CS0569. Datasource: cca1cd0046qa1|omega] com.crystaldecisions.sdk.occa.report.lib.ReportSDKServerException: 
Fel i filen customer_report {CDCDCEC2-050C-4405-865C-6031D4BFF2DE}.rpt:
Ogiltigt underrapportnamn.---- Error code:-2147483086 Error code name:failed, 
	at com.crystaldecisions.sdk.occa.report.lib.ReportSDKServerException.throwReportSDKServerException(Unknown Source)
	at com.crystaldecisions.proxy.remoteagent.s.a(Unknown Source)
	at com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.if(Unknown Source)
	at com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.a(Unknown Source)
	at com.crystaldecisions.sdk.occa.report.application.bl.do(Unknown Source)
	at com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.do(Unknown Source)
	at com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.verifyDatabase(Unknown Source)
	at com.crystaldecisions.sdk.occa.report.application.bl.byte(Unknown Source)
	at com.crystaldecisions.sdk.occa.report.application.ao.onDataSourceChanged(Unknown Source)
	at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(Unknown Source)
	at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(Unknown Source)
	at com.crystaldecisions.sdk.occa.report.application.DatabaseController.setDataSource(Unknown Source)
	at com.nordea.crystalreports.ReportHelper.passPOJO(ReportHelper.java:814)
	at com.nordea.crystalreports.ReportHelper.changeDataSource(ReportHelper.java:124)
	at com.nordea.crystalreports.ReportGenerator.generate(ReportGenerator.java:115)
	at com.nordea.crystalreports.ReportGenerator.generate(ReportGenerator.java:62)
	at com.nordea.omega.report.servlet.CrystalReportServlet.doGet(CrystalReportServlet.java:116)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
	at weblogic.servlet.internal.StubSecurityHelper$ServletServi

Not what you were looking for? View more on this topic or Ask a question