Home » Archived » BIRT » Reoort Engine can't produce chart
Reoort Engine can't produce chart [message #157280] |
Sat, 29 April 2006 06:38  |
Eclipse User |
|
|
|
Originally posted by: wcleung9.ie.cuhk.edu.hk
I made a report template with a bar chart, by Eclipse 3.0.1 and
birt-report-framework 2.0.1 . It shows no problem when rendered in
Eclipse's preview window or when deployed to the Web Viewer Example of
birt-runtime-2.0.1 on JBoss 4.0.3.
But when I try to use the Report Engine API (also from birt-runtime-2.0.1)
to write my own webapp, I could generate the report but could not generate
the chart image in it. No Exception is thrown in the server log.
Did I missed some methods to call?
Below is my Servlet code:
OutputStream out = resp.getOutputStream();
String reportName = "barchart.rptdesign";
try
{
EngineConfig config = new EngineConfig();
config.setEngineHome(this.getServletContext().getRealPath("/WEB-INF/lib "));
// Create the emitter configuration.
HTMLEmitterConfig hc = new HTMLEmitterConfig( );
// Use the "HTML complete" image handler to write the files to disk.
HTMLServerImageHandler imageHandler = new HTMLServerImageHandler( );
hc.setImageHandler( imageHandler );
// Associate the configuration with the HTML output format.
config.setEmitterConfiguration( HTMLRenderOption.OUTPUT_FORMAT_HTML, hc );
engine = new ReportEngine(config);
IReportRunnable report =
engine.openReportDesign(reportReposPath+"/"+reportName);
//Create task to run the report and render the report
IRunAndRenderTask task = engine.createRunAndRenderTask(report);
//Set Render context to handle url and image locataions
HTMLRenderContext renderContext = new HTMLRenderContext();
renderContext.setImageDirectory("image");
HashMap contextMap = new HashMap();
contextMap.put( EngineConstants.APPCONTEXT_HTML_RENDER_CONTEXT,
renderContext );
task.setAppContext( contextMap );
//Set rendering options - such as file or stream output,
//output format, whether it is embeddable, etc
HTMLRenderOption options = new HTMLRenderOption();
options.setOutputStream(out);
//options.setOutputFileName("/example.html");
options.setOutputFormat("html");
task.setRenderOption(options);
task.run();
engine.destroy();
out.flush();
}catch(Exception e)
{
log(e);
}
|
|
| | | | | | | | |
Re: Reoort Engine can't produce chart [message #157686 is a reply to message #157542] |
Tue, 02 May 2006 04:00   |
Eclipse User |
|
|
|
Hi,
Can you file a viewer bug in bugzilla? This sounds like a problem, there is
no reason it would work with one url and not the other, particularly in that
place of the code.
Thanks,
David
"sra" <sheehana@gmail.com> wrote in message
news:38e0be591f4b7fefa4c8fa7533012efb$1@www.eclipse.org...
> The exception in the logs is,
> org.eclipse.birt.chart.exception.ChartException: The dataset used by the
> Chart is invalid. This only occurs when I use run? and not when I use
> frameset?. The datasets are xml files on a remote machine.
>
> Thanks
>
> Here is the full stack trace.
>
> May 1, 2006 12:18:38 PM org.eclipse.birt.chart.datafeed.ResultSetWrapper
> setup
> SEVERE: Unable to determine data types from resultset
> May 1, 2006 12:18:38 PM org.eclipse.birt.chart.exception.ChartException
> logThis
> SEVERE: Exception
> org.eclipse.birt.chart.exception.ChartException: The dataset used by the
> Chart is invalid
> at
> org.eclipse.birt.chart.datafeed.DataSetProcessorImpl.populat e(DataSetProcessorImpl.java:254)
> at
> org.eclipse.birt.chart.internal.factory.DataProcessor.fillSe riesDataSet(DataProcessor.java:1843)
> at
> org.eclipse.birt.chart.internal.factory.DataProcessor.fillSe riesDataSet(DataProcessor.java:1807)
> at
> org.eclipse.birt.chart.internal.factory.DataProcessor.genera teRuntimeSeries(DataProcessor.java:1282)
> at
> org.eclipse.birt.chart.internal.factory.DataProcessor.genera teRuntimeSeries(DataProcessor.java:1016)
> at org.eclipse.birt.chart.factory.Generator.bindData(Generator. java:568)
> at
> org.eclipse.birt.chart.reportitem.ChartReportItemPresentatio nImpl.onRowSets(ChartReportItemPresentationImpl.java:407)
> at
> org.eclipse.birt.report.engine.presentation.LocalizedEmitter .startExtendedContent(LocalizedEmitter.java:660)
> at
> org.eclipse.birt.report.engine.presentation.LocalizedEmitter .startForeign(LocalizedEmitter.java:439)
> at
> org.eclipse.birt.report.engine.presentation.WrappedEmitter.s tartForeign(WrappedEmitter.java:209)
> at
> org.eclipse.birt.report.engine.presentation.DefaultPaginatio nEmitter.startForeign(DefaultPaginationEmitter.java:490)
> at
> org.eclipse.birt.report.engine.executor.ExtendedItemExecutor .execute(ExtendedItemExecutor.java:100)
> at
> org.eclipse.birt.report.engine.executor.ReportExecutorVisito r.visitExtendedItem(ReportExecutorVisitor.java:82)
> at
> org.eclipse.birt.report.engine.ir.ExtendedItemDesign.accept( ExtendedItemDesign.java:30)
> at
> org.eclipse.birt.report.engine.executor.ReportExecutor.execu te(ReportExecutor.java:125)
> at
> org.eclipse.birt.report.engine.executor.ReportExecutor.execu te(ReportExecutor.java:89)
> at
> org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run (RunAndRenderTask.java:171)
> at
> org.eclipse.birt.report.service.ReportEngineService.runAndRe nderReport(Unknown
> Source)
> at
> org.eclipse.birt.report.presentation.aggregation.layout.Engi neFragment.doService(Unknown
> Source)
> at
> org.eclipse.birt.report.presentation.aggregation.BaseFragmen t.service(Unknown
> Source)
> at org.eclipse.birt.report.servlet.ViewerServlet.doGet(Unknown Source)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
> at
> org.apache.axis.transport.http.AxisServletBase.service(AxisS ervletBase.java:327)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFi lter(ApplicationFilterChain.java:252)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(App licationFilterChain.java:173)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(Standar dWrapperValve.java:213)
> at
> org.apache.catalina.core.StandardContextValve.invoke(Standar dContextValve.java:178)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHo stValve.java:126)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorRepo rtValve.java:105)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(Standard EngineValve.java:107)
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAd apter.java:148)
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Proce ssor.java:869)
> at
> org.apache.coyote.http11.Http11BaseProtocol$Http11Connection Handler.processConnection(Http11BaseProtocol.java:664)
> at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(Poo lTcpEndpoint.java:527)
> at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt( LeaderFollowerWorkerThread.java:80)
> at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.ru n(ThreadPool.java:684)
> at java.lang.Thread.run(Thread.java:534)
> May 1, 2006 12:18:38 PM org.eclipse.birt.chart.exception.ChartException
> logThis
> SEVERE: Exception
> org.eclipse.birt.chart.exception.ChartException: The dataset used by the
> Chart is invalid
> at
> org.eclipse.birt.chart.internal.factory.DataProcessor.fillSe riesDataSet(DataProcessor.java:1847)
> at
> org.eclipse.birt.chart.internal.factory.DataProcessor.fillSe riesDataSet(DataProcessor.java:1807)
> at
> org.eclipse.birt.chart.internal.factory.DataProcessor.genera teRuntimeSeries(DataProcessor.java:1282)
> at
> org.eclipse.birt.chart.internal.factory.DataProcessor.genera teRuntimeSeries(DataProcessor.java:1016)
> at org.eclipse.birt.chart.factory.Generator.bindData(Generator. java:568)
> at
> org.eclipse.birt.chart.reportitem.ChartReportItemPresentatio nImpl.onRowSets(ChartReportItemPresentationImpl.java:407)
> at
> org.eclipse.birt.report.engine.presentation.LocalizedEmitter .startExtendedContent(LocalizedEmitter.java:660)
> at
> org.eclipse.birt.report.engine.presentation.LocalizedEmitter .startForeign(LocalizedEmitter.java:439)
> at
> org.eclipse.birt.report.engine.presentation.WrappedEmitter.s tartForeign(WrappedEmitter.java:209)
> at
> org.eclipse.birt.report.engine.presentation.DefaultPaginatio nEmitter.startForeign(DefaultPaginationEmitter.java:490)
> at
> org.eclipse.birt.report.engine.executor.ExtendedItemExecutor .execute(ExtendedItemExecutor.java:100)
> at
> org.eclipse.birt.report.engine.executor.ReportExecutorVisito r.visitExtendedItem(ReportExecutorVisitor.java:82)
> at
> org.eclipse.birt.report.engine.ir.ExtendedItemDesign.accept( ExtendedItemDesign.java:30)
> at
> org.eclipse.birt.report.engine.executor.ReportExecutor.execu te(ReportExecutor.java:125)
> at
> org.eclipse.birt.report.engine.executor.ReportExecutor.execu te(ReportExecutor.java:89)
> at
> org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run (RunAndRenderTask.java:171)
> at
> org.eclipse.birt.report.service.ReportEngineService.runAndRe nderReport(Unknown
> Source)
> at
> org.eclipse.birt.report.presentation.aggregation.layout.Engi neFragment.doService(Unknown
> Source)
> at
> org.eclipse.birt.report.presentation.aggregation.BaseFragmen t.service(Unknown
> Source)
> at org.eclipse.birt.report.servlet.ViewerServlet.doGet(Unknown Source)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
> at
> org.apache.axis.transport.http.AxisServletBase.service(AxisS ervletBase.java:327)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFi lter(ApplicationFilterChain.java:252)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(App licationFilterChain.java:173)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(Standar dWrapperValve.java:213)
> at
> org.apache.catalina.core.StandardContextValve.invoke(Standar dContextValve.java:178)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHo stValve.java:126)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorRepo rtValve.java:105)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(Standard EngineValve.java:107)
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAd apter.java:148)
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Proce ssor.java:869)
> at
> org.apache.coyote.http11.Http11BaseProtocol$Http11Connection Handler.processConnection(Http11BaseProtocol.java:664)
> at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(Poo lTcpEndpoint.java:527)
> at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt( LeaderFollowerWorkerThread.java:80)
> at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.ru n(ThreadPool.java:684)
> at java.lang.Thread.run(Thread.java:534)
> Caused by: org.eclipse.birt.chart.exception.ChartException: The dataset
> used by the Chart is invalid
> at
> org.eclipse.birt.chart.datafeed.DataSetProcessorImpl.populat e(DataSetProcessorImpl.java:254)
> at
> org.eclipse.birt.chart.internal.factory.DataProcessor.fillSe riesDataSet(DataProcessor.java:1843)
> ... 36 more
> May 1, 2006 12:18:38 PM
> org.eclipse.birt.chart.reportitem.ChartReportItemPresentatio nImpl
> onRowSets
> SEVERE: Exception
> org.eclipse.birt.chart.exception.ChartException: The dataset used by the
> Chart is invalid
> at
> org.eclipse.birt.chart.internal.factory.DataProcessor.fillSe riesDataSet(DataProcessor.java:1847)
> at
> org.eclipse.birt.chart.internal.factory.DataProcessor.fillSe riesDataSet(DataProcessor.java:1807)
> at
> org.eclipse.birt.chart.internal.factory.DataProcessor.genera teRuntimeSeries(DataProcessor.java:1282)
> at
> org.eclipse.birt.chart.internal.factory.DataProcessor.genera teRuntimeSeries(DataProcessor.java:1016)
> at org.eclipse.birt.chart.factory.Generator.bindData(Generator. java:568)
> at
> org.eclipse.birt.chart.reportitem.ChartReportItemPresentatio nImpl.onRowSets(ChartReportItemPresentationImpl.java:407)
> at
> org.eclipse.birt.report.engine.presentation.LocalizedEmitter .startExtendedContent(LocalizedEmitter.java:660)
> at
> org.eclipse.birt.report.engine.presentation.LocalizedEmitter .startForeign(LocalizedEmitter.java:439)
> at
> org.eclipse.birt.report.engine.presentation.WrappedEmitter.s tartForeign(WrappedEmitter.java:209)
> at
> org.eclipse.birt.report.engine.presentation.DefaultPaginatio nEmitter.startForeign(DefaultPaginationEmitter.java:490)
> at
> org.eclipse.birt.report.engine.executor.ExtendedItemExecutor .execute(ExtendedItemExecutor.java:100)
> at
> org.eclipse.birt.report.engine.executor.ReportExecutorVisito r.visitExtendedItem(ReportExecutorVisitor.java:82)
> at
> org.eclipse.birt.report.engine.ir.ExtendedItemDesign.accept( ExtendedItemDesign.java:30)
> at
> org.eclipse.birt.report.engine.executor.ReportExecutor.execu te(ReportExecutor.java:125)
> at
> org.eclipse.birt.report.engine.executor.ReportExecutor.execu te(ReportExecutor.java:89)
> at
> org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run (RunAndRenderTask.java:171)
> at
> org.eclipse.birt.report.service.ReportEngineService.runAndRe nderReport(Unknown
> Source)
> at
> org.eclipse.birt.report.presentation.aggregation.layout.Engi neFragment.doService(Unknown
> Source)
> at
> org.eclipse.birt.report.presentation.aggregation.BaseFragmen t.service(Unknown
> Source)
> at org.eclipse.birt.report.servlet.ViewerServlet.doGet(Unknown Source)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
> at
> org.apache.axis.transport.http.AxisServletBase.service(AxisS ervletBase.java:327)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFi lter(ApplicationFilterChain.java:252)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(App licationFilterChain.java:173)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(Standar dWrapperValve.java:213)
> at
> org.apache.catalina.core.StandardContextValve.invoke(Standar dContextValve.java:178)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHo stValve.java:126)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorRepo rtValve.java:105)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(Standard EngineValve.java:107)
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAd apter.java:148)
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Proce ssor.java:869)
> at
> org.apache.coyote.http11.Http11BaseProtocol$Http11Connection Handler.processConnection(Http11BaseProtocol.java:664)
> at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(Poo lTcpEndpoint.java:527)
> at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt( LeaderFollowerWorkerThread.java:80)
> at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.ru n(ThreadPool.java:684)
> at java.lang.Thread.run(Thread.java:534)
> Caused by: org.eclipse.birt.chart.exception.ChartException: The dataset
> used by the Chart is invalid
> at
> org.eclipse.birt.chart.datafeed.DataSetProcessorImpl.populat e(DataSetProcessorImpl.java:254)
> at
> org.eclipse.birt.chart.internal.factory.DataProcessor.fillSe riesDataSet(DataProcessor.java:1843)
> ... 36 more
>
>
|
|
|
Re: Reoort Engine can't produce chart [message #157695 is a reply to message #157638] |
Tue, 02 May 2006 04:05   |
Eclipse User |
|
|
|
Henry,
I think you have to create that image directory yourself. It should be under
ReportEngine I believe. Make sure the web-app process has rights to write
there.
Thanks,
David
"Henry Leung " <wcleung9.ie.cuhk.edu.hk> wrote in message
news:e7409b334a6ad4f3ce0f4e73d956ab8a$1@www.eclipse.org...
> No luck.
> I set BIRT_HOME = D:BirtStudyirt-runtime-2_0_1Report~1
> (Report~1 represents the folder "Report Engine". I use Report~1 to avoid
> any possible problem caused by folder name with whitespace.)
>
> The situation is the same. When I render the report as HTML output, the
> chart can not be displayed. And I can't find the corresponding .png file.
> I don't think the chart image file is generated.
>
> If I render the report as PDF, it's OK. The chart exists in the PDF
> document.
>
>
>
>
>
> In fact, as you can see in my code, I set the chart image folder to be
> "image"
>>>>>renderContext.setImageDirectory("image");
>
> I wonder where this "image" folder should be? Do I have to create it
> myself? Or will BIRT create it automatically?
>
>
>
>
> Besides, in the package birt-runtime-2_0_1, except the "Report Engine"
> folder, I see there is a folder named "Chart Engine". I haven't used any
> libraries or plugins in it. Are they useful?
>
|
|
| | |
Re: Reoort Engine can't produce chart [message #160242 is a reply to message #157695] |
Thu, 11 May 2006 07:47   |
Eclipse User |
|
|
|
Originally posted by: wcleung9.ie.cuhk.edu.hk
Sorry that I have been busy in last week.
I created the "image" folder in %BIRT_ENGINE% and many other locations
that I bet BIRT might use. But none of them is used. When I render the
report as HTML, the chart (the .png file) seems not even generated.
BIRT, as a process of JBoss, has full privilege to write file in any
folder path of my PC. So I guess BIRT just don't know the right path to
handle image. But I don't see any exception being thrown.
David Michonneau wrote:
> Henry,
> I think you have to create that image directory yourself. It should be under
> ReportEngine I believe. Make sure the web-app process has rights to write
> there.
> Thanks,
> David
> "Henry Leung " <wcleung9.ie.cuhk.edu.hk> wrote in message
> news:e7409b334a6ad4f3ce0f4e73d956ab8a$1@www.eclipse.org...
>> No luck.
>> I set BIRT_HOME = D:BirtStudybirt-runtime-2_0_1Report~1
>> (Report~1 represents the folder "Report Engine". I use Report~1 to avoid
>> any possible problem caused by folder name with whitespace.)
>>
>> The situation is the same. When I render the report as HTML output, the
>> chart can not be displayed. And I can't find the corresponding .png file.
>> I don't think the chart image file is generated.
>>
>> If I render the report as PDF, it's OK. The chart exists in the PDF
>> document.
>>
>>
>>
>>
>>
>> In fact, as you can see in my code, I set the chart image folder to be
>> "image"
>>>>>>renderContext.setImageDirectory("image");
>>
>> I wonder where this "image" folder should be? Do I have to create it
>> myself? Or will BIRT create it automatically?
>>
>>
>>
>>
>> Besides, in the package birt-runtime-2_0_1, except the "Report Engine"
>> folder, I see there is a folder named "Chart Engine". I haven't used any
>> libraries or plugins in it. Are they useful?
>>
|
|
|
Re: Reoort Engine can't produce chart [message #160274 is a reply to message #160242] |
Thu, 11 May 2006 08:32   |
Eclipse User |
|
|
|
Did you try to get the webviewer example available for download and deploy
it? I am pretty sure it should work with JBoss. then you would be able to
see what's the difference in your code and the example.
Thanks,
David
"Henry Leung " <wcleung9.ie.cuhk.edu.hk> wrote in message
news:160207f6e9b938dc6a07959afe4d4da1$1@www.eclipse.org...
> Sorry that I have been busy in last week.
>
> I created the "image" folder in %BIRT_ENGINE% and many other locations
> that I bet BIRT might use. But none of them is used. When I render the
> report as HTML, the chart (the .png file) seems not even generated.
> BIRT, as a process of JBoss, has full privilege to write file in any
> folder path of my PC. So I guess BIRT just don't know the right path to
> handle image. But I don't see any exception being thrown.
>
>
> David Michonneau wrote:
>
>> Henry,
>
>> I think you have to create that image directory yourself. It should be
>> under ReportEngine I believe. Make sure the web-app process has rights to
>> write there.
>
>> Thanks,
>
>> David
>
>
>> "Henry Leung " <wcleung9.ie.cuhk.edu.hk> wrote in message
>> news:e7409b334a6ad4f3ce0f4e73d956ab8a$1@www.eclipse.org...
>>> No luck.
>>> I set BIRT_HOME = D:BirtStudybirt-runtime-2_0_1Report~1
>>> (Report~1 represents the folder "Report Engine". I use Report~1 to avoid
>>> any possible problem caused by folder name with whitespace.)
>>>
>>> The situation is the same. When I render the report as HTML output, the
>>> chart can not be displayed. And I can't find the corresponding .png
>>> file. I don't think the chart image file is generated.
>>>
>>> If I render the report as PDF, it's OK. The chart exists in the PDF
>>> document.
>>>
>>>
>>>
>>>
>>>
>>> In fact, as you can see in my code, I set the chart image folder to be
>>> "image"
>>>>>>>renderContext.setImageDirectory("image");
>>>
>>> I wonder where this "image" folder should be? Do I have to create it
>>> myself? Or will BIRT create it automatically?
>>>
>>>
>>>
>>>
>>> Besides, in the package birt-runtime-2_0_1, except the "Report Engine"
>>> folder, I see there is a folder named "Chart Engine". I haven't used any
>>> libraries or plugins in it. Are they useful?
>>>
>
|
|
|
Re: Reoort Engine can't produce chart [message #160820 is a reply to message #160274] |
Sun, 14 May 2006 22:19   |
Eclipse User |
|
|
|
Originally posted by: wcleung9.ie.cuhk.edu.hk
Yes, as said in the first post, the chart is successfully generated when
using the webviewer example deployed to JBoss. It is generated in
eportimages. rt-viewer.war
ok, I will try to dig into those code to see what's the difference.
David Michonneau wrote:
> Did you try to get the webviewer example available for download and deploy
> it? I am pretty sure it should work with JBoss. then you would be able to
> see what's the difference in your code and the example.
> Thanks,
> David
> "Henry Leung " <wcleung9.ie.cuhk.edu.hk> wrote in message
> news:160207f6e9b938dc6a07959afe4d4da1$1@www.eclipse.org...
>> Sorry that I have been busy in last week.
>>
>> I created the "image" folder in %BIRT_ENGINE% and many other locations
>> that I bet BIRT might use. But none of them is used. When I render the
>> report as HTML, the chart (the .png file) seems not even generated.
>> BIRT, as a process of JBoss, has full privilege to write file in any
>> folder path of my PC. So I guess BIRT just don't know the right path to
>> handle image. But I don't see any exception being thrown.
>>
>>
>> David Michonneau wrote:
>>
>>> Henry,
>>
>>> I think you have to create that image directory yourself. It should be
>>> under ReportEngine I believe. Make sure the web-app process has rights to
>>> write there.
>>
>>> Thanks,
>>
>>> David
>>
>>
>>> "Henry Leung " <wcleung9.ie.cuhk.edu.hk> wrote in message
>>> news:e7409b334a6ad4f3ce0f4e73d956ab8a$1@www.eclipse.org...
>>>> No luck.
>>>> I set BIRT_HOME = D:BirtStudybirt-runtime-2_0_1Report~1
>>>> (Report~1 represents the folder "Report Engine". I use Report~1 to avoid
>>>> any possible problem caused by folder name with whitespace.)
>>>>
>>>> The situation is the same. When I render the report as HTML output, the
>>>> chart can not be displayed. And I can't find the corresponding .png
>>>> file. I don't think the chart image file is generated.
>>>>
>>>> If I render the report as PDF, it's OK. The chart exists in the PDF
>>>> document.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> In fact, as you can see in my code, I set the chart image folder to be
>>>> "image"
>>>>>>>>renderContext.setImageDirectory("image");
>>>>
>>>> I wonder where this "image" folder should be? Do I have to create it
>>>> myself? Or will BIRT create it automatically?
>>>>
>>>>
>>>>
>>>>
>>>> Besides, in the package birt-runtime-2_0_1, except the "Report Engine"
>>>> folder, I see there is a folder named "Chart Engine". I haven't used any
>>>> libraries or plugins in it. Are they useful?
>>>>
>>
|
|
|
Re: Reoort Engine can't produce chart [message #161263 is a reply to message #160820] |
Mon, 15 May 2006 22:37  |
Eclipse User |
|
|
|
Originally posted by: wcleung9.ie.cuhk.edu.hk
I decompiled some classes of the webviewer example to compare with my
webapp, and found out what's wrong.
First of all, I didn't set the BaseImageURL. It must be set and should be
a relative path:
renderContext.setBaseImageURL("report/images");
Secondly, I set the ImageDirectory to be a relative path, while that it
should be an absolute path:
renderContext.setImageDirectory(this.getServletContext().get RealPath( "/report/images"));
|
|
|
Goto Forum:
Current Time: Sat May 03 15:00:07 EDT 2025
Powered by FUDForum. Page generated in 0.04318 seconds
|