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)
Including report path in design file
lgudait
Is there a way to pull the location of a report design on the iServer into the report? I'm looking for something similar to how you can put &[Path]&[File] in the footer in excel to get the file location.
Thanks!
Laura
Find more posts tagged with
Comments
bgbaird
Laura, there is a whole slew of things you can get from the iServer at runtime.
This will get you the volume and report name:
this.text = reportContext.getAppContext().get('VolumeName')+reportContext.getReportRunnable().getReportName();
This will get you user and runtime:
today = new Date();
df = new Packages.java.text.SimpleDateFormat("MM/dd/yyyy hh:mm a");
today = df.format(today);
this.text = "Run by: " + reportContext.getAppContext().get('ServerUserName') + " @ " + today;
Good Luck,
Brian
lgudait
Thanks Brian! This worked great!
One thing we noticed is that after we moved a rptdesign file to a new location after uploading, it still showed the original location when we reran it. Obviously, it's not a huge issue, since we can just reupload the report design instead of moving it.
However, is there something we have to do to refresh the rptdesign after moving that will show the new path?
Thanks again,
Laura
bgbaird
I haven't run into that. It calls at runtime for me.
bgbaird
You might also take a look at:
http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.birt.doc.isv/engine/api/org/eclipse/birt/report/engine/api/IReportDocument.html
lgudait
Thanks Brian!
How would I use the getSystemId() function? I'm JavaScript illiterate.