cancel
Showing results for 
Search instead for 
Did you mean: 

Failed to bind columns - Error JRCCommunicationAdapter

Former Member
0 Kudos
442

Hi All,

<br/><br/>

I have a crystal report with Command that uses a stored procedure.

<br/><br/>

Command has the script - EXECUTE [TestCrystalCastIssueSP] '{?name}','{?valueStr}',{?valueInt}

<br/><br/>

I use the below replaceConnection in the code for replacing the connections on run time for each table :

databaseController.replaceConnection(originalConnectionInfo, newConnectionInfo, fields, DBOptions._doNotVerifyDB);

<br/><br/>

All works fine.

<br/><br/><br/>

Now I change the script in stored procedure from 'SELECT * from TestCrystalCastIssue t' to 'SELECT t.name, t.valueStr, t.valueint from TestCrystalCastIssue t' - which means selecting only few columns of the table

<br/><br/>

Execute the report from java web application but the crystal engine throws the following error.

<br/><br/>

Please assist me. Thanks.

<br/><br/>

-- start of error log --<br/>

Error com.businessobjects.reports.sdk.JRCCommunicationAdapter - detected an exception: Failed to bind columns.<br/>

at com.crystaldecisions.reports.datafoundation.DFQuery.for(SourceFile:632)<br/>

at com.crystaldecisions.reports.datalayer.a.do(SourceFile:1621)<br/>

at com.crystaldecisions.reports.datalayer.a.a(SourceFile:1404)<br/>

at com.crystaldecisions.reports.dataengine.m.b(SourceFile:334)<br/>

at com.crystaldecisions.reports.dataengine.j.b(SourceFile:515)<br/>

at com.crystaldecisions.reports.dataengine.m.o(SourceFile:408)<br/>

at com.crystaldecisions.reports.dataengine.m.a(SourceFile:173)<br/>

at com.crystaldecisions.reports.dataengine.ContextNode.a(SourceFile:114)<br/>

at com.crystaldecisions.reports.dataengine.ContextNode.a(SourceFile:95)<br/>

at com.crystaldecisions.reports.dataengine.j.case(SourceFile:1080)<br/>

at com.crystaldecisions.reports.dataengine.h.<init>(SourceFile:108)<br/>

at com.crystaldecisions.reports.dataengine.DataContext.a(SourceFile:254)<br/>

at com.crystaldecisions.reports.dataengine.DataProcessor2.a(SourceFile:4660)<br/>

at com.crystaldecisions.reports.dataengine.DataProcessor2.a(SourceFile:4574)<br/>

at com.crystaldecisions.reports.dataengine.DataProcessor2.new(SourceFile:2652)<br/>

at com.crystaldecisions.reports.dataengine.DataProcessor2.byte(SourceFile:2610)<br/>

at com.crystaldecisions.reports.dataengine.DataProcessor2.try(SourceFile:2282)<br/>

at com.crystaldecisions.reports.dataengine.DataProcessor2.int(SourceFile:2442)<br/>

at com.crystaldecisions.reports.dataengine.DataProcessor2.I(SourceFile:1013)<br/>

at com.crystaldecisions.reports.formatter.formatter.objectformatter.ObjectFormatter.fo(SourceFile:526)<br/>

at com.crystaldecisions.reports.formatter.formatter.paginator.PageFormatter.if(SourceFile:613)<br/>

at com.crystaldecisions.reports.formatter.formatter.paginator.PageFormatter.a(SourceFile:578)<br/>

at com.crystaldecisions.reports.formatter.formatter.paginator.PageFormatter.X(SourceFile:387)<br/>

at com.crystaldecisions.reports.formatter.formatter.paginator.PageFormatter.moveToPageN(SourceFile:339)<br/>

at com.crystaldecisions.reports.formatter.export2.a.a(SourceFile:78)<br/>

at com.crystaldecisions.reports.formatter.export2.a.a(SourceFile:247)<br/>

at com.crystaldecisions.reports.formatter.export2.ExportSupervisorEx.if(SourceFile:642)<br/>

at com.crystaldecisions.reports.formatter.export2.ExportSupervisorEx.a(SourceFile:586)<br/>

at com.businessobjects.reports.sdk.requesthandler.ReportViewingRequestHandler.a(SourceFile:636)<br/>

at com.businessobjects.reports.sdk.requesthandler.ReportViewingRequestHandler.int(SourceFile:672)<br/>

at com.businessobjects.reports.sdk.JRCCommunicationAdapter.do(SourceFile:1944)<br/>

at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(SourceFile:661)<br/>

at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(SourceFile:167)<br/>

at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.a(SourceFile:529)<br/>

at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.call(SourceFile:527)<br/>

at com.crystaldecisions.reports.common.ThreadGuard.syncExecute(SourceFile:102)<br/>

at com.businessobjects.reports.sdk.JRCCommunicationAdapter.for(SourceFile:525)<br/>

at com.businessobjects.reports.sdk.JRCCommunicationAdapter.int(SourceFile:424)<br/>

at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(SourceFile:352)<br/>

at com.businessobjects.sdk.erom.jrc.a.a(SourceFile:54)<br/>

at com.businessobjects.sdk.erom.jrc.a.execute(SourceFile:67)<br/>

at com.crystaldecisions.proxy.remoteagent.RemoteAgent$a.execute(SourceFile:716)<br/>

at com.crystaldecisions.proxy.remoteagent.CommunicationChannel.a(SourceFile:125)<br/>

at com.crystaldecisions.proxy.remoteagent.RemoteAgent.a(SourceFile:537)<br/>

at com.crystaldecisions.sdk.occa.report.application.ds.a(SourceFile:186)<br/>

at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(SourceFile:1558)<br/>

at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(SourceFile:337)<br/>

at com.crystaldecisions.sdk.occa.report.application.ReportSource.export(SourceFile:286)<br/>

at com.crystaldecisions.sdk.occa.report.application.AdvancedReportSource.export(SourceFile:209)<br/>

at com.businessobjects.report.web.event.bh.a(SourceFile:158)<br/>

at com.businessobjects.report.web.event.o.a(SourceFile:146)<br/>

at com.businessobjects.report.web.event.bw.broadcast(SourceFile:93)<br/>

at com.businessobjects.report.web.event.am.a(SourceFile:53)<br/>

at com.businessobjects.report.web.a.t.if(SourceFile:2104)<br/>

at com.businessobjects.report.web.e.a(SourceFile:300)<br/>

at com.businessobjects.report.web.e.a(SourceFile:202)<br/>

at com.businessobjects.report.web.e.a(SourceFile:135)<br/>

at com.crystaldecisions.report.web.ServerControl.a(SourceFile:607)<br/>

at com.crystaldecisions.report.web.viewer.ReportExportControl.a(SourceFile:124)<br/>

at com.crystaldecisions.report.web.ServerControl.processHttpRequest(SourceFile:342)<br/>

at MyCrystalReportServlet.renderReport(MyCrystalReportServlet.java:565).<br/><br/>

-- end of error log --<br/><br/><br/>

-


start of stored procedure --<br/>

ALTER PROCEDURE [dbo].[TestCrystalCastIssueSP]<br/>

@p_name varchar(10),<br/>

@p_valueStr varchar(10),<br/>

@p_valueInt varchar(10)<br/>

AS<br/>

BEGIN<br/>

-- SET NOCOUNT ON added to prevent extra result sets from<br/>

-- interfering with SELECT statements.<br/>

SET NOCOUNT ON;<br/><br/>

-- Insert statements for procedure here<br/>

DECLARE @valueIntParam INT<br/>

SET @valueIntParam = cast(@p_valueInt AS INTEGER)<br/><br/>

-- below statement causes report to fail. there are four columns in the table.<br/>

--SELECT t.name, t.valueStr, t.valueint from TestCrystalCastIssue t WHERE t.valueInt = @valueIntParam<br/><br/>

SELECT * from TestCrystalCastIssue t WHERE t.valueInt = @valueIntParam<br/>

END<br/>

-


end of stored procedure --

Edited by: ratan korlam on Mar 3, 2011 12:52 PM

View Entire Topic
AleTa82
Newcomer
0 Kudos

Hi everyone

I was facing the same "failed to bind columns" issue, and after tons of R&D and tests, I finally found the real cause of the issue.

Basically, it seems that when you create a command in your report, which uses "alias" for any fields of the performed query, the java library somehow struggles to make the binding between field and the related alias, and eventually throws the exception.

For example a query like this in your rpt will eventually fail in CR java library:

select id my_id
from mytable;

Unfortunately, I couldn't find any possible solution from methods available on ReportClientDocument or any other crystal report java classes.

I saw someone suggested to invoke reportClientDoc.verifyDatabase() , but that doesn't work.

The only way to solve the issue is to make sure that your command on .rpt file doesn't use any alias. I know that implies a certain work on your .rpt file, it's just about remapping the "command" fields with "report" ones, however that definitely will solve the problem.

Hope this can help anyone who is facing the same issue.

Thank you.

P.S.: Despite this thread has been opened many years ago, there are developers like myself who still successfully uses crystal report java library to generate CR report in their application 😉