Skip to main content



      Home
Home » Archived » BIRT » Saving the HTML output
Saving the HTML output [message #259102] Tue, 23 October 2007 11:11 Go to next message
Eclipse UserFriend
Originally posted by: KartoffelKiffer.gmx.de

Hello,

i have a little question to you.

I'm using BIRT with a MySQL database as DataSource. Everytime when i
select a report, the report will be newly generated. Is it possible to
save/export this generated HTML output as a file?

So i could ask in my application if .html (or something else) is existing,
if not -> generate. When i wanna see this report again, a HTML was
generated and only this will be displayed. Not the hole report will be
generated again.

I hope somebody can help me with my problem.



Best regards,
Tom
Re: Saving the HTML output [message #259131 is a reply to message #259102] Tue, 23 October 2007 12:09 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jasonweathersby.alltel.net

Tom,

If you specify a rptdocument in the url the report will not be
regenerated just rendered to your desired output format. If you specify
__document=mytest.rptdocument in the url it will generate this document
if it does not exist, but if it exist it should just render it.

Jason

Tom wrote:
> Hello,
>
> i have a little question to you.
>
> I'm using BIRT with a MySQL database as DataSource. Everytime when i
> select a report, the report will be newly generated. Is it possible to
> save/export this generated HTML output as a file?
>
> So i could ask in my application if .html (or something else) is
> existing, if not -> generate. When i wanna see this report again, a HTML
> was generated and only this will be displayed. Not the hole report will
> be generated again.
>
> I hope somebody can help me with my problem.
>
>
>
> Best regards,
> Tom
>
Re: Saving the HTML output [message #259249 is a reply to message #259131] Wed, 24 October 2007 04:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: KartoffelKiffer.gmx.de

Hello,

i read the articles about the rptdocument, but it doesn't work.

My current link to view a report is like

http://localhost/frameset?__report=/report/content-template/ ReportA/1193207470011_rptReportA.rptdesign&par1=mytest

This report design with the timestamp 1193207470011 is temporarilly
generated. So i use the "main"-report design ReportA.rptdesign and
generate a temp. design with a timestamp which has a little modification
(in the sql and a little more). This temp. rptdesign will be used for
presentation.

I would know if i understood everything corretly: I add a parameter
__document=test.rptdocument to the link above. The engine will have a look
whether this test.rptdocument is existing. If it is not existing, the
engine will follow up the normal way by generating the report new. Will
there be generated a test.rptdocument file automatically?



Best regards,
Tom
Re: Saving the HTML output [message #259327 is a reply to message #259249] Wed, 24 October 2007 12:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jasonweathersby.alltel.net

Tom,

If you add &__document=test.rptdocument to your url this should create a
rptdocument file. Also look in your web.xml and check that the
following setting is false:

<context-param>
<param-name>BIRT_OVERWRITE_DOCUMENT</param-name>
<param-value>false</param-value>
</context-param>

Jason

Tom wrote:
> Hello,
>
> i read the articles about the rptdocument, but it doesn't work.
>
> My current link to view a report is like
>
> http://localhost/frameset?__report=/report/content-template/ ReportA/1193207470011_rptReportA.rptdesign&par1=mytest
>
>
> This report design with the timestamp 1193207470011 is temporarilly
> generated. So i use the "main"-report design ReportA.rptdesign and
> generate a temp. design with a timestamp which has a little modification
> (in the sql and a little more). This temp. rptdesign will be used for
> presentation.
>
> I would know if i understood everything corretly: I add a parameter
> __document=test.rptdocument to the link above. The engine will have a
> look whether this test.rptdocument is existing. If it is not existing,
> the engine will follow up the normal way by generating the report new.
> Will there be generated a test.rptdocument file automatically?
>
>
>
> Best regards,
> Tom
>
Re: Saving the HTML output [message #259402 is a reply to message #259327] Thu, 25 October 2007 03:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: KartoffelKiffer.gmx.de

Hello Jason,

i am assuaged, it works!

My web.xml was wrong. So i fixed it how you said and now everything runs.

I thank you very much.



Best regards,
Tom
Re: Saving the HTML output [message #259432 is a reply to message #259402] Thu, 25 October 2007 06:57 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: KartoffelKiffer.gmx.de

Hello,

i am sorry to say that it doesn't run yet.

Shortly i can write down whats happening:
1) I open the report
( http://localhost/frameset?__report=/report/content-template/ ReportA/1193308461660_rptReportA.rptdesign&__document=re port/content-template/ReportA/(AnyID)rptReportA.rptdocument)
2) The file (AnyID)rptReportA.rptdocument will be deleted (if still
existing, else it will be generated)
3) (AnyID)rptReportA.rptdocument will be created with 0 bytes
4) The report is "processing"
5) About one second before the report is displayed, the
(AnyID)rptReportA.rptdocument will obtain a size of 1 MB
6) Report has finished

So at any start of my report the rptdocument is generating new.

My web.xml looks like
<context-param>
<param-name>BIRT_OVERWRITE_DOCUMENT</param-name>
<param-value>false</param-value>
</context-param>

Is it really correct that the rptdocument will be deleted while starting
my report?

I hope you won't loose your endurance in me and could help me again.



Best regards,
Tom
Re: Saving the HTML output [message #259463 is a reply to message #259432] Thu, 25 October 2007 10:28 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jasonweathersby.alltel.net

Tom,

Can you post your web.xml?
Also try the test report and use
__report=test.rptdesign&__document=test.rptdocument

I just tested on my installation and it worked fine. If the overwrite
is false and the report file has not been changed since the rptdocument
was created the code should not delete the document.

Jason

Tom wrote:
> Hello,
>
> i am sorry to say that it doesn't run yet.
>
> Shortly i can write down whats happening:
> 1) I open the report
> ( http://localhost/frameset?__report=/report/content-template/ ReportA/1193308461660_rptReportA.rptdesign&__document=re port/content-template/ReportA/(AnyID)rptReportA.rptdocument)
>
> 2) The file (AnyID)rptReportA.rptdocument will be deleted (if still
> existing, else it will be generated)
> 3) (AnyID)rptReportA.rptdocument will be created with 0 bytes
> 4) The report is "processing"
> 5) About one second before the report is displayed, the
> (AnyID)rptReportA.rptdocument will obtain a size of 1 MB
> 6) Report has finished
>
> So at any start of my report the rptdocument is generating new.
>
> My web.xml looks like
> <context-param>
> <param-name>BIRT_OVERWRITE_DOCUMENT</param-name>
> <param-value>false</param-value>
> </context-param>
>
> Is it really correct that the rptdocument will be deleted while starting
> my report?
>
> I hope you won't loose your endurance in me and could help me again.
>
>
>
> Best regards,
> Tom
>
Re: Saving the HTML output [message #259600 is a reply to message #259463] Fri, 26 October 2007 03:37 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: KartoffelKiffer.gmx.de

Hello,

here my web.xml

<?xml version="1.0" encoding="utf-8"?>

<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>

<display-name>Eclipse BIRT Report Viewer</display-name>

<!-- Default locale setting -->
<context-param>
<param-name>BIRT_VIEWER_LOCALE</param-name>
<param-value>en-US</param-value>
</context-param>

<!-- Report resources directory for preview. Default to ${birt home} -->
<context-param>
<param-name>BIRT_VIEWER_WORKING_FOLDER</param-name>
<param-value></param-value>
</context-param>

<!-- The generated document files directory. Default to ${birt
home}/documents -->
<context-param>
<param-name>BIRT_VIEWER_DOCUMENT_FOLDER</param-name>
<param-value></param-value>
</context-param>

<!-- If usr can only access the reprot resources under working folder.
Default is false -->
<context-param>
<param-name>WORKING_FOLDER_ACCESS_ONLY</param-name>
<param-value>false</param-value>
</context-param>

<!-- Output image/chart directory. Default to ${birt home}/report/images
-->
<context-param>
<param-name>BIRT_VIEWER_IMAGE_DIR</param-name>
<param-value></param-value>
</context-param>

<!-- Engine log directory. Default to ${birt home}/logs -->
<context-param>
<param-name>BIRT_VIEWER_LOG_DIR</param-name>
<param-value></param-value>
</context-param>

<!-- Report engine log level -->
<context-param>
<param-name>BIRT_VIEWER_LOG_LEVEL</param-name>
<param-value>WARNING</param-value>
</context-param>

<!-- Directory to store all birt report script libraries (JARs). Default
to ${birt home}/scriptlib -->
<context-param>
<param-name>BIRT_VIEWER_SCRIPTLIB_DIR</param-name>
<param-value></param-value>
</context-param>

<!-- Resource location directory. Default to ${birt home} -->
<context-param>
<param-name>BIRT_RESOURCE_PATH</param-name>
<param-value></param-value>
</context-param>

<!-- Preview report max rows limited. -->
<context-param>
<param-name>BIRT_VIEWER_MAX_ROWS</param-name>
<param-value></param-value>
</context-param>

<!-- If always overwrite generated document file. For runtime,efalult to
true -->
<context-param>
<param-name>BIRT_OVERWRITE_DOCUMENT</param-name>
<param-value>false</param-value>
</context-param>

<!-- Define BIRT viewer configuration file -->
<context-param>
<param-name>BIRT_VIEWER_CONFIG_FILE</param-name>
<param-value>WEB-INF/viewer.properties</param-value>
</context-param>

<!-- If turn on the function that supports print on the server side.
Default to on. -->
<context-param>
<param-name>BIRT_VIEWER_PRINT_SERVERSIDE</param-name>
<param-value>OFF</param-value>
</context-param>

<!-- If force optimized HTML output. Default to true -->
<context-param>
<param-name>HTML_ENABLE_AGENTSTYLE_ENGINE</param-name>
<param-value>true</param-value>
</context-param>

<!-- Viewer Servlet Context Listener -->
<listener>
<listener-class> org.eclipse.birt.report.listener.ViewerServletContextListene r </listener-class>
</listener>

<!-- Viewer HttpSession Listener -->
<listener>
<listener-class>org.eclipse.birt.report.listener.ViewerHttpSessionListener </listener-class>
</listener>

<!-- Viewer Servlet, Support SOAP -->
<servlet>
<servlet-name>ViewerServlet</servlet-name>
<servlet-class>org.eclipse.birt.report.servlet.ViewerServlet </servlet-class>
</servlet>

<!-- Engine Serlvet -->
<servlet>
<servlet-name>EngineServlet</servlet-name>
<servlet-class>org.eclipse.birt.report.servlet.BirtEngineServlet </servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>ViewerServlet</servlet-name>
<url-pattern>/frameset</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>ViewerServlet</servlet-name>
<url-pattern>/run</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>EngineServlet</servlet-name>
<url-pattern>/preview</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>EngineServlet</servlet-name>
<url-pattern>/download</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>EngineServlet</servlet-name>
<url-pattern>/parameter</url-pattern>
</servlet-mapping>

<taglib>
<taglib-uri>/birt.tld</taglib-uri>
<taglib-location>/WEB-INF/tlds/birt.tld</taglib-location>
</taglib>
<resource-env-ref>

<description>

Link to the UserDatabase instance from which we request lists of

defined role names. Typically, this will be connected to the global

user database with a ResourceLink element in server.xml or the
context

configuration file for the Manager web application.

</description>

<resource-env-ref-name>users</resource-env-ref-name>

<resource-env-ref-type>

org.apache.catalina.UserDatabase

</resource-env-ref-type>

</resource-env-ref>



<!-- Define a Security Constraint on this Application -->

<security-constraint>

<web-resource-collection>

<web-resource-name>Report Viewer</web-resource-name>
<url-pattern>/some_folders_and_files/*</url-pattern>

</web-resource-collection>

<auth-constraint>

<role-name>rptview</role-name>

</auth-constraint>

</security-constraint>

<security-constraint>

<web-resource-collection>

<web-resource-name>Repoert Viewer with
ADMIN-Access</web-resource-name>
<url-pattern>/some_folders_and_files/*</url-pattern>

</web-resource-collection>

<auth-constraint>

<role-name>admin</role-name>

</auth-constraint>

</security-constraint>


<login-config>
<auth-method>FORM</auth-method>
<form-login-config>
<form-login-page>/login.jsp</form-login-page>
<form-error-page>/login.jsp?false</form-error-page>
</form-login-config>
</login-config>



<security-role>

<description>

The role that is required to log in to the Report-Viewer Application

</description>

<role-name>rptview</role-name>

</security-role>
<security-role>

<description>

The role that is required to log in to the Report-Viewer Application
with ADMIN-Access

</description>

<role-name>admin</role-name>

</security-role>

</web-app>

The content of the reports doesn't change, but the names (look above, the
timestamps in the name). I try to use static names. Could it be, that the
report engine wouldn't find the old report design, so the rptdocument will
be newly generated?

Like i said, i will try out.

Thanks again for your help Jason.



Best regards,
Tom
Re: Saving the HTML output [message #260361 is a reply to message #259600] Fri, 02 November 2007 05:56 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: KartoffelKiffer.gmx.de

Hello,

i'm still here, again.

I successfully tried to crack it. I don't use any timestamps and the newly
generated reports will have the same name.

But a new problem is coming: When i generate a new report (with my
modified sqls and so on) everytime a new rptdocument will be generated
(like before). The name of the report is the same, the content may be
possibly the same, but the date of creation wouldn't accord.

You said, that the content will be compared, is it possible, that the
comparison will accord the date of creation? This couldn't work, because
it will be generated everytime new.

I hope you could help me again Jason.




Best regards,
Tom
Re: Saving the HTML output [message #260387 is a reply to message #260361] Fri, 02 November 2007 10:15 Go to previous message
Eclipse UserFriend
Originally posted by: jasonweathersby.alltel.net

Tom,

The comparison is between the report design and the report document time
stamps. If the report document is newer than it will not be overwritten.
Also the
<context-param>
<param-name>BIRT_OVERWRITE_DOCUMENT</param-name>
<param-value>false</param-value>
</context-param>
Must be false or it will overwrite it every time.

Jason

Tom wrote:
> Hello,
>
> i'm still here, again.
>
> I successfully tried to crack it. I don't use any timestamps and the
> newly generated reports will have the same name.
>
> But a new problem is coming: When i generate a new report (with my
> modified sqls and so on) everytime a new rptdocument will be generated
> (like before). The name of the report is the same, the content may be
> possibly the same, but the date of creation wouldn't accord.
>
> You said, that the content will be compared, is it possible, that the
> comparison will accord the date of creation? This couldn't work, because
> it will be generated everytime new.
>
> I hope you could help me again Jason.
>
>
>
>
> Best regards,
> Tom
>
Previous Topic:Access Data Set rows from Java
Next Topic:client side javascript function not added??
Goto Forum:
  


Current Time: Wed May 07 11:25:33 EDT 2025

Powered by FUDForum. Page generated in 0.04784 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top