Home
Designing Analytics Reports
Java handler does not change vlaue
Migrateduser
<p>Hi !</p>
<p>Ive been searching for a while before posting.</p>
<p> </p>
<p>The issue im experiancing -</p>
<p> </p>
<p>I created a report through the eclipse plugin, and i have a data cell thats taken from the DB.</p>
<p> </p>
<p>The db can contain RTF format, so i created a java project and created a class that extends DataItemEventAdapter and there i implemented the onCreate in this way</p>
<p> </p>
<p>public void onCreate(IDataItemInstance arg0,IReportContext arg1){</p>
<p>String rtfed = "" ;</p>
<p>if(arg0 == null)</p>
<p> return;</p>
<p>try{</p>
<p>String toHtml = (String) arg0.getValue();</p>
<p>if(toHtml -== null)</p>
<p> return;</p>
<p>rtfed = rtfToHtml(new StringReader(toHtml));</p>
<p>if(rtfed == null)</p>
<p> return</p>
<p>arg0.setDisplayValue(rtfed);</p>
<p>}</p>
<p>}</p>
<p> </p>
<p>You get the idea from what i wrote.(you can ssume its compiling well)</p>
<p> </p>
<p>Now im experiancing something wierd. i configured the debug mode to debug on java, and when i run the report, i stop on the breakpoints and see the value is actually changing as he is suppose to, but i dont see any visuals of the report once im done.</p>
<p> </p>
<p>I did put the project in the classpath of both the report and debug configuration</p>
<p> </p>
<p>When i run the report though report design prespective ( the option that opens chrome to show the report) i see the data as if it didnt go through the handler- the RTF string straight from my db</p>
<p> </p>
<p>I did put the imported project jar in several locations - </p>
<p>scriptlib</p>
<p>eclipse plugin of birt viewer</p>
<p>in birt engine and webviewer</p>
<p> </p>
<p>I still cant get this to work...</p>
<p>I just started working with birt, if anyone needs more info i would love to know.</p>
<p> </p>
<p>If someone has a step by step guide to a report that gets data from DB, and how to create an handler that takes that data and change it i would really appreciate it.</p>
<p> </p>
<p>Thanks alot! </p>
<p> </p>
<p>Sharon</p>
Find more posts tagged with
Comments
There are no comments yet