The community of Analytics developers are invited to follow and participate in the developer network.
OpenText technical experts collaborate with supported customers and partners in the Magellan product area.

Dynamic Chart title fails in BIRT 4.3.1, but worked great in 3.7.1

onRender
/**
* Called before generation of chart model to GeneratedChartState.
*
* @param chart
* Chart
* @param icsc
* IChartScriptContext
*/

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.today())+ " " + title +" " + myTitle)
}

It appears getPersistentGlobalVariable() is no longer a choice

Comments

  • wwilliamswwilliams Junior Member

    well it looks like it doesn't like setValue( BirtDateTime.year(BirtDateTime.today())

  • I tested your code in 4.8 and it works correctly. If possible, try upgrading. If upgrading is not an option, you might be able to work around the issue using the JavaScript date methods.

    Regards,
    Jeff F.
    Sr. Technical Support Specialist
    OpenText
Sign In or Register to comment.