Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » using JavaScript in HTML to retrieve file name of report
using JavaScript in HTML to retrieve file name of report [message #1235339] Fri, 24 January 2014 05:09 Go to next message
Beau Salwin is currently offline Beau SalwinFriend
Messages: 1
Registered: January 2014
Junior Member
Hi Guys

New to BIRT and Javascript and HTML

What I want to be able to do is on the master page layout retrieve the filename of the report and print it in HTML so that I can name each report by its filename rather than having to name each report individually.

I have done some searching but to no avail

Here is what I have tried

<script language="JavaScript">
var sPath=window.location.pathname;
var sPage = sPath.substring(sPath.lastIndexOf("/") + 1);
document.write(sPath);
</script>

and this is what it returned


/viewer/frameset

Thanks in advance
Re: using JavaScript in HTML to retrieve file name of report [message #1240839 is a reply to message #1235339] Fri, 07 February 2014 06:02 Go to previous message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

If you're just trying to do this in the master page of the report, why not use something like this in a dynamic text box?

reportContext.getDesignHandle().fileName


Michael

Developer Evangelist, Silanis
Previous Topic:Table report item content is empty
Next Topic:Regarding new data source jdbc connection
Goto Forum:
  


Current Time: Fri Apr 26 16:10:56 GMT 2024

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

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

Back to the top