Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 10:44 Go to next message
Alexey Romanov is currently offline Alexey RomanovFriend
Messages: 263
Registered: May 2010
Senior Member
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 16:37 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

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: Thu Apr 25 07:21:53 GMT 2024

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

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

Back to the top