cancel
Showing results for 
Search instead for 
Did you mean: 

Reprint a generated report Instance

Former Member
0 Kudos

Dear all,

I have submitted a request to BOE server to gnerate a report instance thru SDK. Server Printer has a paper jam during the printing. Is it possible thru the SDK request the BOE to print one more times for the generated instance.

Regards,

Gabriel.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

report at another thread

Former Member
0 Kudos

Exception raised

ted_ueda
Employee
Employee
0 Kudos

Missing parameter values typically indicate you haven't set all parameter field values in the report before printing it, so it can't be run.

Are you getting the instance of the report, or the original report?

Sincerely,

Ted Ueda

Former Member
0 Kudos

Hi Ted Ueda

I obtain the SI_NEW_JOB_ID after infostore.schedule(). Then I use this value to call query the infostore and get the schedule status, it return 'Success' to me. I expect it is generated and store at BOE. Then I use openClientDocument to get instance and create a printoption to print the generated instance at server-side.

how can I know the document is a instance of the report, or the original report?

Regards,

Gabriel.

Edited by: Gabriel Luk on Apr 29, 2009 6:43 PM

Edited by: Gabriel Luk on Apr 29, 2009 6:44 PM

Edited by: Gabriel Luk on Apr 29, 2009 7:20 PM

Former Member
0 Kudos

Thanks

Former Member
0 Kudos

Hi Gabriel,

I think, with ISchedulingInfo class, it is possible to reschedule the report.

Below are two methods (set and get) which say about them.

int getRetriesAllowed()

Returns the maximum number of retries allowed.

int getRetryInterval()

Returns the number of seconds between retries.

void setRetriesAllowed(int newVal)

Sets the maximum number of retries allowed.

void setRetryInterval(int newVal)

Sets the number of seconds between retries.

See if you can use above functionalities.

Thanks,

Praveen.

Former Member
0 Kudos

The reschedule will cause the report re-run. I don't think it is a good option. For other destinations (Email, In-box, FTP), I can use infoStore.sendto(), but nothing for printer.

ted_ueda
Employee
Employee
0 Kudos

If you've scheduled it to the reporting format, you can always runtime view the instance and manually print it. Limitation of this would be:

1. It's for scheduled to report format - if you've scheduled to an alternative format - such as PDF, Word, Excel, etc, then you'd have to print in that format rather than the report format, since the report instance used to generate the alternative format is lost.

2. It's client-side printing rather than server-side, so problematic if a very-very-very long report or the printer is only accessible server-side.

Sincerely,

Ted Ueda

Former Member
0 Kudos

Yes. for over coming the long long report, I prefer server-side print. Is there any alternatives ? how can I perform server-side printing for a generated instance ?

Edited by: Gabriel Luk on Apr 6, 2009 2:22 PM

ted_ueda
Employee
Employee
0 Kudos

I can't think of any alternatives - the workflow is Job Server runs report, sends to print job and then send the created instance format to the FRS, so printing is tied to the Job Server child process.

Sincerely,

Ted Ueda

ted_ueda
Employee
Employee
0 Kudos

Then again, if it's saved as Crystal Report format and you have RAS service running with access to the same printer, then you can do server-side printing from RAS, via ReportClientDocument.getPrintOutputController(...).

Sincerely,

Ted Ueda

Former Member
0 Kudos

Do you mean if the generated instance is Crystal report format, It can re-print on server-side ?

ted_ueda
Employee
Employee
0 Kudos

If Crystal Report format, what you can do is write RAS code to open the instance and send to printer.

Sincerely,

Ted Ueda

Former Member
0 Kudos

Hi,

when the application reach

reportClientDocument.getPrintOutputController().printReport(printReportOptions);

It raise Exception

com.crystaldecisions.sdk.occa.report.lib.ReportSDKPrinterException: Missing parameter values.---- Error code:-2147215357 Error code name:internal at com.crystaldecisions.sdk.occa.report.lib.ReportSDKPrinterException.throwReportSDKPrinterException(Unknown Source) at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.printReport(Unknown Source) at com.kn.acon.base.report.processor.BusinessObjectsSvcImpl.reprint(BusinessObjectsSvcImpl.java) at com.kn.acon.cf.system.svc.app.ReprintReportJobSvcImpl.doOtherEnquiry(ReprintReportJobSvcImpl.java) at com.kn.acon.cf.system.svc.app.ReprintReportJobSvcImpl.executeEnquiry(ReprintReportJobSvcImpl.java:58) at com.kn.acon.base.svc.app.UIEnquirySvcImpl.doExecute(UIEnquirySvcImpl.java:163) at com.kn.acon.base.svc.app.UIAppSvcImpl.execute(UIAppSvcImpl.java:58) at com.kn.acon.base.svc.AconServiceExecutor.execute(AconServiceExecutor.java:75) at com.kn.acon.base.svc.AconUseCaseSvcImpl.processUIRequest(AconUseCaseSvcImpl.java:210) at com.kn.acon.base.svc.AconUseCaseSvcImpl.validateUIObjects(AconUseCaseSvcImpl.java:253) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:77) at com.kn.acon.base.aop.RequestInitializationAdvice.initializeRequest(RequestInitializationAdvice.java:104) at sun.reflect.GeneratedMethodAccessor653.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:627) at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:616) at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:64) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:160) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy34.validateUIObjects(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:615) at com.kn.atlasx.web.controller.RequestController.invokeMethod(RequestController.java:417) at com.kn.atlasx.web.controller.RequestController.executeIoCService(RequestController.java:521) at com.kn.atlasx.web.controller.RequestController.handleRequest(RequestController.java:276) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511) at javax.servlet.http.HttpServlet.service(HttpServlet.java:763) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1075) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:550) at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478) at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:744) at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1455) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:115) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387) at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102) at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165) at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161) at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136) at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195) at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743) at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473) Caused by: com.crystaldecisions.sdk.occa.report.lib.ReportSDKServerException: Missing parameter values.---- Error code:-2147217394 Error code name:missingParameterValueError 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.cf.a(Unknown Source) at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source) at com.crystaldecisions.sdk.occa.report.application.ReportSource.getPage(Unknown Source) at com.businessobjects.crystalreports.viewer.core.rs.b.if(Unknown Source) at com.businessobjects.crystalreports.viewer.core.az.a(Unknown Source) at com.businessobjects.crystalreports.viewer.core.az.run(Unknown Source) at java.lang.Thread.run(Thread.java:797)

Please help ,

Regards,

Gabriel.

Former Member
0 Kudos

Hi ted,

I've tried following,

IInfoObjects infoObjects = infoStore.query("Select * From CI_INFOOBJECTS Where SI_INSTANCE=1 AND SI_ID = 23004"

infoObject = (IInfoObject) infoObjects.get(0);

IReportAppFactory reportAppFactory =

(IReportAppFactory) boSession.getService("", "RASReportFactory");

reportClientDocument = reportAppFactory.openDocument(infoObject, 0, Locale.ENGLISH);

PrintOutputController pc = reportClientDocument.getPrintOutputController();

printServiceName = "RptPrt_1";

PrintReportOptions printReportOptions = null;

printReportOptions = new PrintReportOptions();

printReportOptions.setPrinterName(printServiceName);;

printReportOptions.setCollated(false);

printReportOptions.setJobTitle("Server Side Print Job for CR.");

printReportOptions.setMediaTray(MediaTray.MAIN);

printReportOptions.setNumberOfCopies(1);

printReportOptions.setPaperSize(PaperSize.paperA4);

printReportOptions.setPaperSource(PaperSource.auto);

printReportOptions.setPrinterDuplex(PrinterDuplex.useDefault);

pc.modifyPaperOrientation(PaperOrientation.useDefault);

pc.printReport(printReportOptions);

It is a report instance and format is crystal report. I can preview it with infoview.

It raise followings :

com.crystaldecisions.sdk.occa.report.lib.ReportSDKPrinterException: Missing parameter values.---- Error code:-2147215357 Error code name:internal

at com.crystaldecisions.sdk.occa.report.lib.ReportSDKPrinterException.throwReportSDKPrinterException(Unknown Source)

at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.printReport(Unknown Source)

at com.report.test.main(test.java:238)

Caused by: com.crystaldecisions.sdk.occa.report.lib.ReportSDKServerException: Missing parameter values.---- Error code:-2147217394 Error code name:missingParameterValueError

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.cf.a(Unknown Source)

at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)

at com.crystaldecisions.sdk.occa.report.application.ReportSource.getPage(Unknown Source)

at com.businessobjects.crystalreports.viewer.core.rs.b.if(Unknown Source)

at com.businessobjects.crystalreports.viewer.core.az.a(Unknown Source)

at com.businessobjects.crystalreports.viewer.core.az.run(Unknown Source)

at java.lang.Thread.run(Thread.java:595)

Caused by

com.crystaldecisions.sdk.occa.report.lib.ReportSDKServerException: Missing parameter values.---- Error code:-2147217394 Error code name:missingParameterValueError

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.cf.a(Unknown Source)

at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)

at com.crystaldecisions.sdk.occa.report.application.ReportSource.getPage(Unknown Source)

at com.businessobjects.crystalreports.viewer.core.rs.b.if(Unknown Source)

at com.businessobjects.crystalreports.viewer.core.az.a(Unknown Source)

at com.businessobjects.crystalreports.viewer.core.az.run(Unknown Source)

at java.lang.Thread.run(Thread.java:595)

Caused by:

com.crystaldecisions.sdk.occa.report.lib.ReportSDKServerException: Missing parameter values.---- Error code:-2147217394 Error code name:missingParameterValueError

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.cf.a(Unknown Source)

at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)

at com.crystaldecisions.sdk.occa.report.application.ReportSource.getPage(Unknown Source)

at com.businessobjects.crystalreports.viewer.core.rs.b.if(Unknown Source)

at com.businessobjects.crystalreports.viewer.core.az.a(Unknown Source)

at com.businessobjects.crystalreports.viewer.core.az.run(Unknown Source)

at java.lang.Thread.run(Thread.java:595)

regards,

Gabriel.