cancel
Showing results for 
Search instead for 
Did you mean: 

Invalid subreport name Error code:-2147483086

Former Member
0 Kudos

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 **** 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

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Was able to solve it

Former Member
0 Kudos

I have been able to wrestle this down after a lot of frustrating work. The error had nothing to do with pojos at all. The error was simple a store procedure that did not reply nothing.

In the preparation of the subreport that did consist of the pojo data source. The report(server?) did send a "pre call" to the store procedure with NULL as parameters. The reply was unfortunately an "empty" reply. When we changed the reply to an empty result set it went pass the data sources.

The error message given on this was "Invalid subreport name"! Not very helpful at all.

I have used this new version for about 3 weeks now in a "proof of concept" work controlling if we would be able to upgrade from crystal 9/Harmoni to Crystal 2008/Crystal Report Server 2008. The answer will be yes. It will work. And with a minimum of report changes which is very nice.

What have struck me the most during this work is a few proposals to improvements.

1. Put the versions on jars and sdk's so it's obvious what's used. I spent a few days with an old version of a sdk believing that it was a newer than I already had. It should not be neccessary to go through a manifest file inside a jar in order to find out what the version is. Put it on the file names!

2. Give proper error messages back when something goes wrong. If a parameter value is missing. Send back the parameter that's missed/misses a value for Gods sake. The programmer catching the error most know what's missed hence the message. Would save the user's of the API very much time.

I spent about 5 - 10 days trying to find out what was wrong with my sub report name (This thread). It had nothing to do with the subreport name. It had to do with missing data from a called store procedure!

3. The documentation can be a bit tricky to find. I saw that you have given away a eclipse plugin in order to gather the documentation inside the IDE. That's a good approach.

If the error messages will be enhanced and more accurate it's a pretty handy api to work with. And the handling of unmanaged reports is a wet dream compared to usage of the Harmoni API. That's a real nightmare. The server seems to be very stable and just runs.

I like this forum, fast replies when one is stuck is extremely helpful!

/Patrik

ted_ueda
Employee
Employee
0 Kudos

Can't say specifically what's causing the issue, however, it's been thrown at the verify database stage.

Couple of possibilities: (1) are you setting subreport data before main report? I think there's an issue with RAS 12 where you have to set main report data before subreport. (2) If you trace the subreport names in the call invocation, is it valid for the report?

Sincerely,

Ted Ueda