Using report parameter values in a chart title
Good morning, All!
As the title says, I'm trying to pull in report parameter values and use them in a chart title. After searching for a while (and finding some answers on the opentext boards), I was able to piece together the following:
beforeGeneration: function(chart, icsc)
{
var month = icsc.getExternalContext().getScriptable().getParameterValue('month1');
var year = icsc.getExternalContext().getScriptable().getParameterValue('year1');
var customer = icsc.getExternalContext().getScriptable().getParameterValue('customer');
var grade = icsc.getExternalContext().getScriptable().getParameterValue('grade');
chart.getTitle().getLabel().getCaption().setValue(month + ' / ' + year + ' ' +
'Customer: ' + customer + ' ' + 'Grade: ' + grade);
}
Now, this doesn't break the report as earlier attempts did, but it doesn't modify the chart title either..... What piece am I missing?
Thanks in advance for the help!
Scott
Best Answer
-
I am using the following in my beforeFactory
myTitle = " AS2-"+ grp + " " + params["eDate"] + " " + params["etonum"];
reportContext.setPersistentGlobalVariable("title", myTitle);and this in the onRender
function beforeGeneration( chart, icsc )
{
var myTitle = chart.getTitle().getLabel().getCaption().getValue();
var title = icsc.getExternalContext().getScriptable().getPersistentGlobalVariable("title")
chart.getTitle().getLabel().getCaption().setValue(BirtDateTime.year(BirtDateTime.addYear(BirtDateTime.today(),-1)) + " " + title +" " + myTitle)
}HTH
0
Answers
-
I am using the following in my beforeFactory
myTitle = " AS2-"+ grp + " " + params["eDate"] + " " + params["etonum"];
reportContext.setPersistentGlobalVariable("title", myTitle);and this in the onRender
function beforeGeneration( chart, icsc )
{
var myTitle = chart.getTitle().getLabel().getCaption().getValue();
var title = icsc.getExternalContext().getScriptable().getPersistentGlobalVariable("title")
chart.getTitle().getLabel().getCaption().setValue(BirtDateTime.year(BirtDateTime.addYear(BirtDateTime.today(),-1)) + " " + title +" " + myTitle)
}HTH
0 -
Thanks for the info! I'll try it in a bit, and get back to you with the results.
0 -
Worked like a charm! Thanks again for the help!
1
Categories
- All Categories
- 107 Developer Announcements
- 53 Articles
- 106 General Questions
- 142 IM Services
- 43 OpenText Hackathon
- 32 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 898 Cloud Fax and Notifications
- 76 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 118 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management