Skip to Content
0

Crystal Report is not generating for the Alphanumeric parameter.

Jan 19, 2017 at 05:18 PM

33

avatar image
Former Member

I am using Crystal Report for generating the Report in PDF ,for the standalone application in java,while the report is getting printed when i am giving parameter as integer ,but its failing when the parameter is Alphanumeric. I debugged and found that its failing while Exporting the report at line no 3.

ByteArrayInputStream is = (ByteArrayInputStream) report.getPrintOutputController().export(fmt);
byte[] byteArray = new byte[is.available()];
is.read(byteArray, 0, is.available());
is.close();
Utl.deleteFile(nm);
Utl.writeByteFile(nm, byteArray);
// Release report.
report.close();
// ok
System.out.println("Successfully exported report to " + nm);

while the Error i am getting is

com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: Unexpected database connector error---- Error code:-2147467259 Error code name:failed

- I have checked with Db connection , RPT and procedure defination everything is correct.

i have doubt its CR jar issues or code problem.?

I found that report is getting exported , from the local folder in workplace ,which is getting generated ,then data is written and extracted, while is failing during exporting the report.

Can i get any suggestion on this.?? i am clueless whats worng ??

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Don Williams
Jan 19, 2017 at 10:18 PM
0

I suspect you need to define the parameter value as a sting.

What Java package are you using, CR for Eclipse or the Java package included with BOE?

Share
10 |10000 characters needed characters left characters exceeded