Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Developing Analytics Applications
How to get the CategoryAxis in startImageMethod() (HTML Emitter)
Migrateduser
Hi all,<br />
<br />
I need to get the CategoryAxis and the IChartWithAxes includes a method to receive it.<br />
<br />
But my problem is how to use IChartWithAxes.<br />
<br />
I'm modifying the HTML Emitter and this is the code I use till now:<br />
<br />
Class: HTMLReportEmitter<br />
Method:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>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();
}
.
.
.
}</pre>
<br />
Regards,<br />
Samo
Find more posts tagged with
Comments
There are no comments yet