How to get the CategoryAxis in startImageMethod() (HTML Emitter) [message #1016929] |
Fri, 08 March 2013 04:00  |
Eclipse User |
|
|
|
Hi all,
I need to get the CategoryAxis and the IChartWithAxes includes a method to receive it.
But my problem is how to get an Object of IChartWithAxes.
I'm modifying the HTML Emitter and this is the code I use till now:
Class: HTMLReportEmitter
Method:
public void startImage(IImageContent image) {
.
.
.
ExecutionContext exeContext = ((ReportContent) image.getReportContent())
.getExecutionContext();
Object genby = image.getGenerateBy();
if (genby instanceof ExtendedItemDesign) {
ExtendedItemDesign mychart = (ExtendedItemDesign) image
.getGenerateBy();
long deh = mychart.getHandle().getID();
ReportDesignHandle rdh = image.getReportContent().getDesign()
.getReportDesign();
ExtendedItemHandle eih = (ExtendedItemHandle) rdh
.getElementByID(deh);
IDataQueryDefinition qd = mychart.getQuery();
try {
IDataEngine de = (IDataEngine) exeContext.getDataEngine();
QueryResultSet qr = (QueryResultSet) de.execute(qd);
IResultIterator ri = qr.getResultIterator();
int cc = ri.getResultMetaData().getColumnCount();
IResultMetaData rsmd = ri.getResultMetaData();
} catch (EngineException e2) {
e2.printStackTrace();
} catch (BirtException e2) {
e2.printStackTrace();
}
try {
;
ChartWithAxes cwa = (ChartWithAxes) (eih.getReportItem()
.getProperty("chart.instance"));
[color="#FF0000"]IChartWithAxes icwa = (IChartWithAxes) (eih.getReportItem()
.getProperty("chart.instance"));[/color] [color="#FF0000"]// That doesn't work!![/color]
IAxis iaxisTemp = icwa.getCategoryAxis();
}
.
.
.
}
Regards,
SG
[Updated on: Tue, 12 March 2013 06:29] by Moderator
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04911 seconds