Skip to main content



      Home
Home » Archived » BIRT » Problem with print
Problem with print [message #136954] Tue, 28 February 2006 07:33 Go to next message
Eclipse UserFriend
Originally posted by: huqiao.mail.huptt.zj.cn

IN the ToolbarFragment.jsp I only found three button such as
"TITLE="<%= Resources.getString( "birt.viewer.toolbar.toc" )%>"
CLASS="birtviewer_clickable">
TITLE="<%= Resources.getString( "birt.viewer.toolbar.export" )%>"
CLASS="birtviewer_clickable">
TITLE="<%= Resources.getString( "birt.viewer.toolbar.parameter" )%>"
CLASS="birtviewer_clickable">"

I couldn't find the print button!
Re: Problem with print [message #137176 is a reply to message #136954] Tue, 28 February 2006 17:12 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Holger.Buchner.XXXXXXX.de

Hello hzjia,

the print-button was lost in the JSP template for the report-viewer from
BIRT RC2 to BIRT 2.0.
You can just add the "print" button with the call of the PDF-rendition by
adding it to the section You've shown in Your email:

Just add the "Print" Button in the ToolbarFragment.jsp:

<TR><TD></TD></TR>
<TR>
<TD WIDTH="6px"/>
<TD WIDTH="15px">
<A HREF="<%= pdfUrl %>" TARGET="_blank">
<IMG NAME='print' SRC="images/iv/Print.gif"
TITLE="<%= Resources.getString( "birt.viewer.toolbar.print"
)%>" CLASS="birtviewer_clickable">
</A>
</TD>
<TD WIDTH="6px"/>
<TD WIDTH="15px">
<IMG NAME='toc' SRC="images/iv/Toc.gif"
TITLE="<%= Resources.getString( "birt.viewer.toolbar.toc" )%>"
CLASS="birtviewer_clickable">
</TD>
<TD WIDTH="6px"/>
<TD WIDTH="15px">
<IMG NAME='parameter' SRC="images/iv/ChangeParameter.gif"
TITLE="<%= Resources.getString( "birt.viewer.toolbar.parameter"
)%>" CLASS="birtviewer_clickable">
</TD>
<TD WIDTH="6px"/>
<TD WIDTH="15px">
<IMG NAME='export' SRC="images/iv/ExportData.gif"
TITLE="<%= Resources.getString( "birt.viewer.toolbar.export"
)%>" CLASS="birtviewer_clickable">
</TD>
<TD ALIGN='right'>
</TD>
</TR>

Then the "print" Button will be available again.
Re: Problem with print [message #137188 is a reply to message #137176] Tue, 28 February 2006 19:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: huqiao.mail.huptt.zj.cn

Thanks!
Re: Problem with print [message #137597 is a reply to message #137176] Wed, 01 March 2006 10:38 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: vladperl.semanticprogrammer.org

"Holger" <Holger.Buchner@XXXXXXX.de> wrote in message
news:3310726e4a664358038aab84d52272db$1@www.eclipse.org...
> Hello hzjia,
>
> the print-button was lost in the JSP template for the report-viewer from
> BIRT RC2 to BIRT 2.0.
> You can just add the "print" button with the call of the PDF-rendition by
> adding it to the section You've shown in Your email:
>
> Just add the "Print" Button in the ToolbarFragment.jsp:
>
> <TR><TD></TD></TR>
> <TR>
> <TD WIDTH="6px"/>
> <TD WIDTH="15px">
> <A HREF="<%= pdfUrl %>" TARGET="_blank">
> <IMG NAME='print' SRC="images/iv/Print.gif"
> TITLE="<%= Resources.getString( "birt.viewer.toolbar.print" )%>"
> CLASS="birtviewer_clickable">
> </A>
> </TD>
> <TD WIDTH="6px"/>
> <TD WIDTH="15px">
> <IMG NAME='toc' SRC="images/iv/Toc.gif"
> TITLE="<%= Resources.getString( "birt.viewer.toolbar.toc" )%>"
> CLASS="birtviewer_clickable">
> </TD>
> <TD WIDTH="6px"/>
> <TD WIDTH="15px">
> <IMG NAME='parameter' SRC="images/iv/ChangeParameter.gif"
> TITLE="<%= Resources.getString( "birt.viewer.toolbar.parameter" )%>"
> CLASS="birtviewer_clickable">
> </TD>
> <TD WIDTH="6px"/>
> <TD WIDTH="15px">
> <IMG NAME='export' SRC="images/iv/ExportData.gif"
> TITLE="<%= Resources.getString( "birt.viewer.toolbar.export" )%>"
> CLASS="birtviewer_clickable">
> </TD>
> <TD ALIGN='right'>
> </TD>
> </TR>
>
> Then the "print" Button will be available again.

It's not enough because if you changed values of parameters on print you
will get result with olad values of parameters.
To work out this problem you need make the following changes:

ToolbarFragment.jsp

<%

String htmlUrl = request.getContextPath( ) + "/run?"

+ ParameterAccessor.getEncodedQueryString( request,
ParameterAccessor.PARAM_FORMAT, ParameterAccessor.PARAM_FORMAT_HTML );

String pdfUrl = request.getContextPath( ) + "/run?"

+ ParameterAccessor.getEncodedQueryString( request,
ParameterAccessor.PARAM_FORMAT, ParameterAccessor.PARAM_FORMAT_PDF );

%>

............................................................

<TD ALIGN='right'>

<A ID="print_html" HREF="<%=htmlUrl%>" TARGET="_blank">

<IMG SRC="images/PrintHTML.gif"

TITLE="<%= Resources.getString( "birt.viewer.toolbar.print" )%>" BORDER="0">

</A>

</TD>

<TD ALIGN='right' width="30px">

<A ID="print_pdf" HREF="<%=pdfUrl%>" TARGET="_blank">

<IMG SRC="images/PrintPDF.gif"

TITLE="<%= Resources.getString( "birt.viewer.toolbar.print" )%>" BORDER="0">

</A>

</TD>



BirtParameterDialog.js

__okPress : function( )

{

if( birtParameterDialog.collect_parameter( ) )

{

birtEventDispatcher.broadcastEvent( birtEvent.__E_CHANGE_PARAMETER );

this.__updatePrintLinks();

this.__l_hide( );

}

},

/**

* Patch for print links update :)

*/

__updatePrintLinks : function()

{

var strParams = "";

if (this.__parameter)

{

for (var i=0; i < this.__parameter.length; i++)

{

strParams += "&" + this.__parameter[i].name + "=";

strParams += this.__parameter[i].value;

}

}

if (this.__cascadingParameter)

{

for (var j=0; j < this.__cascadingParameter.length; j++)

{

for (var k=0; k < this.__cascadingParameter[j].length; k++)

{

strParams += "&" + this.__cascadingParameter[j][k].name + "=";

strParams += this.__cascadingParameter[j][k].value;

}

}

}

strHtmlUrl = $('print_html').href;

strUrlBase = strHtmlUrl.substring(0, strHtmlUrl.indexOf("&"));

$('print_html').href = strUrlBase + strParams + "&__format=html";

$('print_pdf').href = strUrlBase + strParams + "&__format=pdf";

},

After changes you will able to print in pdf and html.
Let me know in any case how it work for you.
If everything will work fine I will send that patch to the Birt team (there
is bug on this problem).

Good luck,
Vladimir
Re: Problem with print [message #138647 is a reply to message #137597] Thu, 02 March 2006 19:20 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: huqiao.mail.huptt.zj.cn

Hello Vladimir:
everything worked fine and now I can print in pdf and html!
I think it's the best way to solve the print problem!
Thank you very much!

joe
Re: Problem with print [message #138672 is a reply to message #137597] Thu, 02 March 2006 20:49 Go to previous messageGo to next message
Eclipse UserFriend
thanks a lot,but how can i integrate this JSP and JS into the plugin?
Re: Problem with print [message #138682 is a reply to message #137176] Thu, 02 March 2006 21:02 Go to previous messageGo to next message
Eclipse UserFriend
I add the code to the page of ToolbarFragment.jsp, when I click the
print button,I get the error.


org.apache.crimson.tree.DomEx: org.apache.crimson.tree/D-007
at
org.apache.crimson.tree.AttributeSet.removeNamedItem(Attribu teSet.java:285)
at
org.apache.crimson.tree.ElementNode.removeAttribute(ElementN ode.java:498)
at
org.eclipse.birt.report.engine.layout.util.HTMLStyleProcesso r.execute(HTMLStyleProcessor.java:138)
at
org.eclipse.birt.report.engine.layout.util.HTML2Content.proc essForeignData(HTML2Content.java:152)
at
org.eclipse.birt.report.engine.layout.util.HTML2Content.html 2Content(HTML2Content.java:132)
at
org.eclipse.birt.report.engine.layout.impl.AbstractLayoutEng ine.handleHTMLContent(AbstractLayoutEngine.java:7
at
org.eclipse.birt.report.engine.layout.impl.AbstractLayoutEng ine.startForeign(AbstractLayoutEngine.java:326)
at
org.eclipse.birt.report.engine.layout.impl.ReportLayoutEngin e.startForeign(ReportLayoutEngine.java:156)
at
org.eclipse.birt.report.engine.presentation.WrappedEmitter.s tartForeign(WrappedEmitter.java:209)
at
org.eclipse.birt.report.engine.presentation.LocalizedEmitter .startForeign(LocalizedEmitter.java:430)
at
org.eclipse.birt.report.engine.executor.TextItemExecutor.exe cuteHtmlText(TextItemExecutor.java:132)
at
org.eclipse.birt.report.engine.executor.TextItemExecutor.exe cute(TextItemExecutor.java:75)
at
org.eclipse.birt.report.engine.executor.ReportExecutorVisito r.visitTextItem(ReportExecutorVisitor.java:111)
at
org.eclipse.birt.report.engine.ir.TextItemDesign.accept(Text ItemDesign.java:129)
at
org.eclipse.birt.report.engine.executor.GridItemExecutor.exe cuteCell(GridItemExecutor.java:273)
at
org.eclipse.birt.report.engine.executor.GridItemExecutor.exe cuteRow(GridItemExecutor.java:208)
at
org.eclipse.birt.report.engine.executor.GridItemExecutor.exe cute(GridItemExecutor.java:128)
at
org.eclipse.birt.report.engine.executor.ReportExecutorVisito r.visitGridItem(ReportExecutorVisitor.java:172)
at
org.eclipse.birt.report.engine.ir.GridItemDesign.accept(Grid ItemDesign.java:117)
at
org.eclipse.birt.report.engine.executor.ListItemExecutor.acc essListBand(ListItemExecutor.java:149)
at
org.eclipse.birt.report.engine.executor.ListItemExecutor.acc essDetail(ListItemExecutor.java:165)
at
org.eclipse.birt.report.engine.executor.ListingElementExecut or.accessQuery(ListingElementExecutor.java:106)
at
org.eclipse.birt.report.engine.executor.ListItemExecutor.exe cute(ListItemExecutor.java:101)
at
org.eclipse.birt.report.engine.executor.ReportExecutorVisito r.visitListItem(ReportExecutorVisitor.java:96)
at
org.eclipse.birt.report.engine.ir.ListItemDesign.accept(List ItemDesign.java:125)
at
org.eclipse.birt.report.engine.executor.GridItemExecutor.exe cuteCell(GridItemExecutor.java:273)
at
org.eclipse.birt.report.engine.executor.GridItemExecutor.exe cuteRow(GridItemExecutor.java:208)
at
org.eclipse.birt.report.engine.executor.GridItemExecutor.exe cute(GridItemExecutor.java:128)
at
org.eclipse.birt.report.engine.executor.ReportExecutorVisito r.visitGridItem(ReportExecutorVisitor.java:172)
at
org.eclipse.birt.report.engine.ir.GridItemDesign.accept(Grid ItemDesign.java:117)
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:175)
at
org.eclipse.birt.report.services.ReportEngineService.runAndR enderReport(Unknown
Source)
at
org.eclipse.birt.report.viewer.aggregation.layout.EngineFrag ment.doService(Unknown
Source)
at
org.eclipse.birt.report.viewer.aggregation.BaseFragment.serv ice(Unknown
Source)
at
org.eclipse.birt.report.viewer.servlet.ViewerServlet.doGet(U nknown 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
com.chinaspis.base.filters.SetProductCodeFilter.doFilter(Set ProductCodeFilter.java:82)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFi lter(ApplicationFilterChain.java:202)
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
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:595)



Holger :
> Hello hzjia,
>
> the print-button was lost in the JSP template for the report-viewer from
> BIRT RC2 to BIRT 2.0.
> You can just add the "print" button with the call of the PDF-rendition
> by adding it to the section You've shown in Your email:
>
> Just add the "Print" Button in the ToolbarFragment.jsp:
>
> <TR><TD></TD></TR>
> <TR>
> <TD WIDTH="6px"/>
> <TD WIDTH="15px">
> <A HREF="<%= pdfUrl %>" TARGET="_blank">
> <IMG NAME='print' SRC="images/iv/Print.gif"
> TITLE="<%= Resources.getString(
> "birt.viewer.toolbar.print" )%>" CLASS="birtviewer_clickable">
> </A>
> </TD>
> <TD WIDTH="6px"/>
> <TD WIDTH="15px">
> <IMG NAME='toc' SRC="images/iv/Toc.gif"
> TITLE="<%= Resources.getString(
> "birt.viewer.toolbar.toc" )%>" CLASS="birtviewer_clickable">
> </TD>
> <TD WIDTH="6px"/>
> <TD WIDTH="15px">
> <IMG NAME='parameter'
> SRC="images/iv/ChangeParameter.gif"
> TITLE="<%= Resources.getString(
> "birt.viewer.toolbar.parameter" )%>" CLASS="birtviewer_clickable">
> </TD>
> <TD WIDTH="6px"/>
> <TD WIDTH="15px">
> <IMG NAME='export' SRC="images/iv/ExportData.gif"
> TITLE="<%= Resources.getString(
> "birt.viewer.toolbar.export" )%>" CLASS="birtviewer_clickable">
> </TD>
> <TD ALIGN='right'>
> </TD>
> </TR>
>
> Then the "print" Button will be available again.
>
>
>
Re: Problem with print [message #138942 is a reply to message #138672] Fri, 03 March 2006 11:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: vladperl.semanticprogrammer.org

> thanks a lot,but how can i integrate this JSP and JS into the plugin?
About what plugin you are asking?
The parts belong to user interface of the report viewer and report viewer is
web application not plugin.
Do you want to integrate this changes to the report viewer that working in
eclipse?
Re: Problem with print [message #139247 is a reply to message #137597] Sat, 04 March 2006 09:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jlopez.asmws.com

hello

I do the changes , and now the buttons appears , but when I click to
generate pdf or html, that generates a kind of javascript alert , with no
text, and after I click the ok button of the alert, the server hungs up (
cpu 100%) , I don't know if its a problem ot this report ( the report have
page value and a grid in the master page ).

thanks

"Vladimir" <vladperl@semanticprogrammer.org> escribi
Re: Problem with print [message #139323 is a reply to message #137176] Sat, 04 March 2006 16:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Holger.Buchner.XXXXXXX.de

Dear all:

in BIRT 2.0 RC2, the print button was integrated in the report viewer and
disappeared in BIRT 2.0. I transfered the some changes from RC2 to BIRT
2.0 using Winmerge. I'm not sure what other changes in addition to the
changes in the toolbar_fragment were made.
Re: Problem with print [message #139333 is a reply to message #139247] Sat, 04 March 2006 22:53 Go to previous messageGo to next message
Eclipse UserFriend
mrlops wrote:

> I do the changes , and now the buttons appears , but when I click to
> generate pdf or html, that generates a kind of javascript alert , with no
> text, and after I click the ok button of the alert, the server hungs up (
> cpu 100%) , I don't know if its a problem ot this report ( the report have
> page value and a grid in the master page ).

inside file BirtToolbar.js comment out: alert( oBtn.name );

old variant:

default:
{
alert( oBtn.name );
break;
}

new variant:

default:
{
//alert( oBtn.name );
break;
}
Re: Problem with print [message #139343 is a reply to message #139323] Sat, 04 March 2006 23:03 Go to previous message
Eclipse UserFriend
Holger wrote:

> Dear all:

> in BIRT 2.0 RC2, the print button was integrated in the report viewer and
> disappeared in BIRT 2.0. I transfered the some changes from RC2 to BIRT
> 2.0 using Winmerge. I'm not sure what other changes in addition to the
> changes in the toolbar_fragment were made.

There is a problem with implementation printing in Birt 2.0 RC2.

Check out:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=123854

You don't have the problem described in the bug?

Best regards,
Vladimir
Previous Topic:Problems with a scripted data source
Next Topic:pdf generation hung up
Goto Forum:
  


Current Time: Sat Jul 19 07:05:11 EDT 2025

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

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

Back to the top