Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Get access of data set from 'beforeDrawDataPoint' event in script window
Get access of data set from 'beforeDrawDataPoint' event in script window [message #924438] Wed, 26 September 2012 17:10 Go to next message
Jesh Stha is currently offline Jesh Stha
Messages: 13
Registered: February 2012
Location: Toronto
Junior Member
Hi,

I have report chart with scripted data source and dataset.
I want to access my dataset from scripts events.Please help me how can i access the dataset from my script level. Basically onRender event-> beforeDrawDataPoint

Thank you
Re: Get access of data set from 'beforeDrawDataPoint' event in script window [message #925378 is a reply to message #924438] Thu, 27 September 2012 13:05 Go to previous message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Can you be a bit more specific on what you are trying to do. Here is a quick script that will help by showing some of the data values that are available in the beforeDrawDataPoint event:

function beforeDrawDataPoint( dph, fill, icsc )
{

importPackage( Packages.java.io );
out = new PrintWriter( new FileWriter( "c:/temp/datapoints.txt", true ) );
out.println( "dph.getIndex " + dph.getIndex());
out.println( "dph.getsize " + dph.getSize());
out.println( "dph.getLocation x" + dph.getLocation().getX() + " y " + dph.getLocation().getY() );
//out.println( "dph.getLocation 3D x" + dph.getLocation3D().getX() + " y " + dph.getLocation3D().getY() + " z " + dph.getLocation3D().getZ() );
out.println( "dph.getbasedisplayvalue " + dph.getBaseDisplayValue());
out.println( "dph.getdisplayvalue " + dph.getDisplayValue());
out.println( "dph.getdisplayvalue " + dph.getBaseValue());

out.close();

}

BTW in the afterDataSetFilled event you can get access to all the values for a specific series. You may also want to look at this post:
http://birtworld.blogspot.com/2010/08/birt-charting-scripting-overview.html

Jason
Previous Topic:Script: Accessing specific cross-tab cell data
Next Topic:Suppress duplicates in crosstab report
Goto Forum:
  


Current Time: Thu Jul 24 11:26:56 EDT 2014

Powered by FUDForum. Page generated in 0.02192 seconds