Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsRender while report is generated
https://www.eclipse.org/forums/index.php/mv/msg/285759/791333/#msg_791333
We need to render report while report is being generated. For example, we have some 100 pages of report and first three pages are rendered, we need to display the three pages rendered and the rest as they are rendered. We need this as the customer need not wait for the entire report to be rendered.
we are using report tag to display the rptdocument.We also use run and then render options to generate reports.
Environment:
Jdk:1.5
BIRT3.7
Weblogic 10.0.2
Any ideas or sample program on how to implement this would be of great help.
Also, what does task.enableProgressiveViewing() does?
Thanks,
KKP]]>harip kaligo2012-02-05T17:10:10-00:00Re: Render while report is generated
https://www.eclipse.org/forums/index.php/mv/msg/285759/792367/#msg_792367
commercial viewer does though.
Jason
On 2/5/2012 12:10 PM, kkp Mising name wrote:
> Hi,
>
> We need to render report while report is being generated. For example,
> we have some 100 pages of report and first three pages are rendered, we
> need to display the three pages rendered and the rest as they are
> rendered. We need this as the customer need not wait for the entire
> report to be rendered.
>
> we are using report tag to display the rptdocument.We also use run and
> then render options to generate reports.
>
> Environment:
> Jdk:1.5
> BIRT3.7
> Weblogic 10.0.2
>
> Any ideas or sample program on how to implement this would be of great
> help.
>
> Thanks,
> KKP]]>Jason Weathersby2012-02-06T23:15:36-00:00Re: Render while report is generated
https://www.eclipse.org/forums/index.php/mv/msg/285759/867213/#msg_867213
sam va2012-05-01T07:17:28-00:00Re: Render while report is generated
https://www.eclipse.org/forums/index.php/mv/msg/285759/870768/#msg_870768
Viewing report while it is still being built works for us in 3.7.1. It is achieved by this line of code called on IRunTask:
task.enableProgressiveViewing(true);
Are you saying that this feature is not supported anymore in 3.7.2 and going forward and only Actuate BIRT supports that? This is important...could you please confirm 100%?
Thanks,
Aleksey
IReportRunnable design = engine.openReportDesign(rox);
// change design time settings via Birt Designer API
BirtDesignHandle designHandle = new BirtDesignHandle(design);
// tables - comment for now as this changes the sort order
// designHandle.processTables();
// pages
designHandle.processPages(buildReq);
// create run task
IRunTask task = engine.createRunTask(design);
// locale
task.setLocale(Utils.buildLocaleInstance(buildReq.getString(buildReq.LOCALE)));
// set report execution parameters in report bean so these can be
// accessed by BIRT runtime on start report build.
setReportExecutionParmsInRptEJB(buildReq);
task.setParameterValue(APP_DATA_PARM, buildReportExcecutionParms(buildReq));
// progressive view -> true for preview; false for print
task.enableProgressiveViewing(buildReq.getboolean(buildReq.PRGR_VIEW));
// page handler
task.setPageHandler(new BirtPageHandler(buildReq, logger));
// task info
BirtTaskInfo taskInfo = new BirtTaskInfo(roi);
taskInfo.setRunTask(task);
res.set(res.VIEW_STATE_INFO, taskInfo);
res.set(res.JOB_ID, new Integer(task.getID()));
// run task
WorkManager workManager = birtEngine.getWorkManager();
workManager.startWork(new BirtTaskRunnable(taskInfo));]]>ivkina Mising name2012-05-09T15:05:47-00:00Re: Render while report is generated
https://www.eclipse.org/forums/index.php/mv/msg/285759/870773/#msg_870773
Viewing report while it is still being built works for us in 3.7.1. It is achieved by this line of code called on IRunTask:
task.enableProgressiveViewing(true);
Are you saying that this feature is not supported anymore in 3.7.2 and going forward and only Actuate BIRT supports that? This is important...could you please confirm 100%?
Thanks,
Aleksey
IReportRunnable design = engine.openReportDesign(rox);
// change design time settings via Birt Designer API
BirtDesignHandle designHandle = new BirtDesignHandle(design);
// tables - comment for now as this changes the sort order
// designHandle.processTables();
// pages
designHandle.processPages(buildReq);
// create run task
IRunTask task = engine.createRunTask(design);
// locale
task.setLocale(Utils.buildLocaleInstance(buildReq.getString(buildReq.LOCALE)));
// set report execution parameters in report bean so these can be
// accessed by BIRT runtime on start report build.
setReportExecutionParmsInRptEJB(buildReq);
task.setParameterValue(APP_DATA_PARM, buildReportExcecutionParms(buildReq));
// progressive view -> true for preview; false for print
task.enableProgressiveViewing(buildReq.getboolean(buildReq.PRGR_VIEW));
// page handler
task.setPageHandler(new BirtPageHandler(buildReq, logger));
// task info
BirtTaskInfo taskInfo = new BirtTaskInfo(roi);
taskInfo.setRunTask(task);
res.set(res.VIEW_STATE_INFO, taskInfo);
res.set(res.JOB_ID, new Integer(task.getID()));
// run task
WorkManager workManager = birtEngine.getWorkManager();
workManager.startWork(new BirtTaskRunnable(taskInfo));]]>ivkina Mising name2012-05-09T15:24:54-00:00Re: Render while report is generated
https://www.eclipse.org/forums/index.php/mv/msg/285759/870808/#msg_870808
That feature has not changed. That reply was in relation to the viewer
framework I believe.
Jason
On 5/9/2012 11:06 AM, ivkina Mising name wrote:
> Jason,
> Viewing report while it is still being built works for us in 3.7.1. It
> is achieved by this line of code called on IRunTask:
> task.enableProgressiveViewing(true);
>
> Are you saying that this feature is not supported anymore in 3.7.2 and
> going forward and only Actuate BIRT supports that? This is
> important...could you please confirm 100%?
>
> Thanks,
> Aleksey
>
> IReportRunnable design = engine.openReportDesign(rox);
> // change design time settings via Birt Designer API
> BirtDesignHandle designHandle = new BirtDesignHandle(design);
> // tables - comment for now as this changes the sort order
> // designHandle.processTables();
> // pages
> designHandle.processPages(buildReq);
> // create run task
> IRunTask task = engine.createRunTask(design);
> // locale
> task.setLocale(Utils.buildLocaleInstance(buildReq.getString(buildReq.LOCALE)));
>
> // set report execution parameters in report bean so these can be
> // accessed by BIRT runtime on start report build.
> setReportExecutionParmsInRptEJB(buildReq);
> task.setParameterValue(APP_DATA_PARM,
> buildReportExcecutionParms(buildReq));
> // progressive view -> true for preview; false for print
> task.enableProgressiveViewing(buildReq.getboolean(buildReq.PRGR_VIEW));
> // page handler
> task.setPageHandler(new BirtPageHandler(buildReq, logger));
> // task info
> BirtTaskInfo taskInfo = new BirtTaskInfo(roi);
> taskInfo.setRunTask(task);
> res.set(res.VIEW_STATE_INFO, taskInfo);
> res.set(res.JOB_ID, new Integer(task.getID()));
> // run task
> WorkManager workManager = birtEngine.getWorkManager();
> workManager.startWork(new BirtTaskRunnable(taskInfo));]]>Jason Weathersby2012-05-09T18:30:43-00:00Re: Render while report is generated
https://www.eclipse.org/forums/index.php/mv/msg/285759/871036/#msg_871036
ivkina Mising name2012-05-10T15:22:33-00:00Re: Render while report is generated
https://www.eclipse.org/forums/index.php/mv/msg/285759/932454/#msg_932454
please mention where to change the code, and add this single line of code.
is it rptdesign file or any java file.
please reply, I need this information.
thank you very much.]]>Vijay Patel2012-10-04T05:45:06-00:00Re: Render while report is generated
https://www.eclipse.org/forums/index.php/mv/msg/285759/932980/#msg_932980
Jason]]>Jason Weathersby2012-10-04T16:24:32-00:00Re: Render while report is generated
https://www.eclipse.org/forums/index.php/mv/msg/285759/957626/#msg_957626
I am trying to display the report on report viewer and at the same time i am trying to render the report as pdf to save automatically to a folder on server....
My report extends to multiple pages and the problem is that when i press next button on Birtviewer, it renders again to create another copy of pdf. (so if my report has 10 pages, it creates 10 copies of same report in pdf in that folder)
I tried setting a global variable which i can use in the if condition to run the beforerender() code once, but somehow it doesnt seem to be working fine.
Please let me know the way out of this.
This is the code i am using to render as pdf (placed under beforeRender function)
importPackage(Packages.org.eclipse.birt.report.engine.api);
importPackage(Packages.java.io)
var re = reportContext.getReportRunnable().getReportEngine();
var mdocument = re.openReportDocument(null,rptdoc, mmap);
var options = new PDFRenderOption();
baos = new ByteArrayOutputStream();
options.setOutputFormat("pdf");
options.setOutputStream(baos);
var ntask = re.createRenderTask(mdocument);
ntask.setRenderOption(options);
ntask.render();
ntask.close();
mdocument.close();
str = "blabla";
success1 = (new File("../webapps/ReportGen/BIRTReports")).mkdir(); //create directory
var path = "myreport_" + str;
fout = new FileOutputStream("../webapps/ReportGen/BIRTReports/"+path); //This name needs to be dynamic
fout.write(baos.toByteArray());
fout.flush();
fout.close();
//g_var = "2";
}
Thanks
]]>Saurabh Puri2012-10-25T11:17:39-00:00Re: Render while report is generated
https://www.eclipse.org/forums/index.php/mv/msg/285759/989237/#msg_989237
I am rendering the pdf file to a location on server.
Is there any way to avoid rendering the report to pdf file again & again while one scroll through different pages of report on birtviewer?
Thanks
Saurabh]]>Saurabh Puri2012-12-05T10:23:07-00:00Re: Render while report is generated
https://www.eclipse.org/forums/index.php/mv/msg/285759/1077325/#msg_1077325
I have added the below piece of code in the constructor of RunTask class to achieve the progressive viewing..
executionContext.enableProgressiveViewing(true);
Will this achieve the progressive viewing ?
I am also facing problems while deploying jar back into my project. Though the jar file is imported successfully into the project, BIRT Execption is being thrown.