Skip to main content



      Home
Home » Archived » BIRT » Generate given HTML once per report page in a custom report item
Generate given HTML once per report page in a custom report item [message #747890] Mon, 24 October 2011 06:44 Go to next message
Eclipse UserFriend
My report items need certain JavaScript to be present on the page. Without modifying the viewer's JSP files the only way to do it seems to be to create <script> tags in onRowSets(IBaseResultSet[]). However, it would be inefficient to generate the same script for every instance of the item. Is there a better way to ensure it's only generated once per page than using context.get/setPageVariable?
Re: Generate given HTML once per report page in a custom report item [message #748336 is a reply to message #747890] Mon, 24 October 2011 12:37 Go to previous message
Eclipse UserFriend
Alexey,

If you add a text element to the top of a report and use a src tag for
it like:

<script type="text/javascript"
src="http://localhost:8090/WebViewer/myjsfile.js"></script>

The script tag should automatically get moved to the HEAD tag of the
viewer and be available on all pages of a report. It only does this for
script tags that use the src tag.

Jason

On 10/24/2011 6:44 AM, Alexey Romanov wrote:
> My report items need certain JavaScript to be present on the page.
> Without modifying the viewer's JSP files the only way to do it seems to
> be to create <script> tags in onRowSets(IBaseResultSet[]). However, it
> would be inefficient to generate the same script for every instance of
> the item. Is there a better way to ensure it's only generated once per
> page than using context.get/setPageVariable?
Previous Topic:horizontal printing in BIRT
Next Topic:Happy to develop birt successfully, but no idea to deploy
Goto Forum:
  


Current Time: Wed Jul 23 20:55:29 EDT 2025

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

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

Back to the top