Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
BIRT 2.3.2 how to put Version in the footer?
system_migrated
Hi
In BIRT 2.3.2 in the User Properties, one can place (among others), the version number of the report.
I would like to print in the footer, on the Master Page, author name, version number and maybe some other information from user properties.
Are there any variables or other method to access these properties? (I do not want to use the Author Autotext because it is not context based, it will simply copy the current value from the Author property into the report - I want to have more flexible solution).
regards,
Robert
Find more posts tagged with
Comments
mwilliams
Hi Robert,
In your initialize script, you can grab the author and version values with the following code:
Version = reportContext.getDesignHandle().createdBy;
RptAuthor = reportContext.getDesignHandle().author;
Then, you can display these values in a text box in your master page footer. Hope this helps.
Migrateduser
Michael,
thank you very much for the response.
I have tested your solution and it partially works
I can take the author's name and it works as expected.
However the statement:
varVersion = reportContext.getDesignHandle().version;
will not return the value I am looking for, instead it is producing static text: 3.2.17.
I have attached the screenshot with the information I want to publish.
Anyway, thank you for the help. It moved my work forward
mwilliams
createdBy gets the BIRT version for me as expected. I don't have Maximo, so I can't test going after your version information you're looking for.
Good luck. Let us know whenever you have questions!
drbud
Hi,
I have put the "RptAuthor = reportContext.getDesignHandle().author;" statement in my initialize script.
But how do I get the Master Page footer to display the value that is in RptAuthor?
Thanks in advance.
PS I'm working with 3.7.2.
wirzbicki
hi drbud,
Can't you assign the value to a global variable and then pull that in at the footer.
// set global variable to initalize event
reportContext.setGlobalVariable("g_RptAuthor ", RptAuthor );
//within master page footer you can edit text use the global
"Author: " + reportContext.getGlobalVariable("g_RptAuthor");
// or assign it to a local variable to use in the onPage event
var l_Author = "Author: " + reportContext.getGlobalVariable("g_RptAuthor");
Mike W.
drbud
Thanks Mike,
Took me some time to figure it out (I'm an absolute Newbie with BIRT, JavaScript, etc.) but I did it in a way that I understand
- First I created a Report Variable: Author
- Then in the initialize script I put this statement:
reportContext.setPageVariable("Author", reportContext.getDesignHandle().author);
- Finally in the Master Page footer a Text Item (HTML):
<VALUE-OF>"Author: " + vars["Author"]</VALUE-OF>