Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Report # 1 : Questions
nuraniuscc
Hi Mike,
1) I have defined a GROUP FOOTER to leave a BLANK DETAIL LINE when
the field changes.
It leaves (Prints) a BLANK line BUT, It also prints the field value (Which
I don't want to see)
Is there a way to do this?
2) Can I check if the PAGE BREAK is working only if I run the report on Web
viewer? I don't think I can see by running the "PREVIEW". Am I right?
3) In the above GROUP FOOTER, I have defined another field (On which I
want to PAGE BREAK). Should that be defined there or Is there a better
way to do this?
Thanks
Nurani Sivakumar
Find more posts tagged with
Comments
mwilliams
Nurani,
1) Can you explain more...maybe with a screenshot?
2) Page breaks don't happen in the "preview" window, you are correct. You'll have to use the web viewer to see those.
3) Can you explain this more as well?
Thanks.
nuraniuscc
Please refer to email where I am attaching the report. You can see on the Layout what I am taking about. You may have to change the query to run it and see what shows up. One of the fields called "Consolidation" is the one I need to PAGEBREAK on.
Thanks
Nurani Sivakumar
mwilliams
Nurani,
3) If you want to page break on a report item, just click on the row the report item is in and set the page break to always before or after depending on what you want.
1) Can you show me a screenshot of what you mean in #1? I'm not sure what you mean there about printing the field value. Can you not delete the data item that's showing up in the group that you don't want to display? You don't have to have anything in the group line that you create, that is just a default thing that BIRT does because it assumes you're grouping to not show that field over and over again in the detail rows.
nuraniuscc
Hi Mike,
For Question 1, It's to do with the data. You know what, I will cut and paste my data and highlight the place where I am having issue with. I will email it to you and then you can understand where I am coming from.
Thanks
Nurani Sivakumar
mwilliams
Nurani,
I have not received any data if you sent it.
nuraniuscc
Hi Mike,
This one is so puzzling to me. I cleaned up the script and made sure all the Syntax errors were taken care of. This is the SQL that I built and I don't understand why after the WHERE clause the predicates repeat 3 times.
select CYCLE_CODE || '/' || CYCLE_RUN_MONTH || '/' || CYCLE_RUN_YEAR as CYCLE, DATACENTER, MEMBER, BAN, EXPERTKEY, APPLICATION_ID, BP_MTFORMAT, FIXEDDATE, LATESTDATEREJECTED, BA_CONSMETHOD from TBLRMREJECTLIST where BA_CONSMETHOD in ('B') and DATACENTER in ('M01') and CYCLE_RUN_MONTH in (07) and CYCLE_RUN_YEAR in (2008) and BA_CONSMETHOD in ('B') and DATACENTER in ('M01') and CYCLE_RUN_MONTH in (07) and CYCLE_RUN_YEAR in (2008) and BA_CONSMETHOD in ('B') and DATACENTER in ('M01') and CYCLE_RUN_MONTH in (07) and CYCLE_RUN_YEAR in (2008) group by BA_CONSMETHOD,CYCLE_CODE,CYCLE_RUN_MONTH,CYCLE_RUN_YEAR,DATACENTER,MEMBER,BAN,EXPERTKEY,APPLICATION_ID,BP_MTFORMAT,FIXEDDATE,LATESTDATEREJECTED order by BA_CONSMETHOD,CYCLE,DATACENTER,MEMBER,BAN,EXPERTKEY,APPLICATION_ID,BP_MTFORMAT,FIXEDDATE,LATESTDATEREJECTED
The Script is as follows
if(params["Consolidation"].value != 'ALL'){
if (MySQLString == ""){
MySQLString = MySQLString + " BA_CONSMETHOD in (" + reportContext.getParameterValue("Consolidation") + ")";
}
else if (MySQLString != ""){
MySQLString = MySQLString + " and BA_CONSMETHOD in (" + reportContext.getParameterValue("Consolidation") + ")";
}}
if(params["Market"].value != 'ALL'){
if (MySQLString == ""){
MySQLString = MySQLString + " DATACENTER in (" + reportContext.getParameterValue("Market") + ")";
}
else if (MySQLString != ""){
MySQLString = MySQLString + " and DATACENTER in (" + reportContext.getParameterValue("Market") + ")";
}}
if(params["Cycle Run Month"].value != 'ALL'){
if (MySQLString == ""){
MySQLString = MySQLString + " CYCLE_RUN_MONTH in (" + reportContext.getParameterValue("Cycle Run Month") + ")";
}
else if (MySQLString != ""){
MySQLString = MySQLString + " and CYCLE_RUN_MONTH in (" + reportContext.getParameterValue("Cycle Run Month") + ")";
}}
if(params["Cycle Run Day"].value != 'ALL'){
if (MySQLString == ""){
MySQLString = MySQLString + " CYCLE_RUN_DAY in (" + reportContext.getParameterValue("Cycle Run Day") + ")";
}
else if (MySQLString != ""){
MySQLString = MySQLString + " and CYCLE_RUN_DAY in (" + reportContext.getParameterValue("Cycle Run Day") + ")";
}}
if(params["Cycle Run Year"].value != 'ALL'){
if (MySQLString == ""){
MySQLString = MySQLString + " CYCLE_RUN_YEAR in (" + reportContext.getParameterValue("Cycle Run Year") + ")";
}
else if (MySQLString != ""){
MySQLString = MySQLString + " and CYCLE_RUN_YEAR in (" + reportContext.getParameterValue("Cycle Run Year") + ")";
}}
if (MySQLString == "")
{
this.queryText = this.queryText + " group by BA_CONSMETHOD,CYCLE_CODE,CYCLE_RUN_MONTH,CYCLE_RUN_YEAR,DATACENTER,MEMBER,BAN,EXPERTKEY,APPLICATION_ID,BP_MTFORMAT,FIXEDDATE,LATESTDATEREJECTED"
+ " order by BA_CONSMETHOD,CYCLE,DATACENTER,MEMBER,BAN,EXPERTKEY,APPLICATION_ID,BP_MTFORMAT,FIXEDDATE,LATESTDATEREJECTED";
}
else if (MySQLString != "")
{
this.queryText = this.queryText + " where" + MySQLString + " group by BA_CONSMETHOD,CYCLE_CODE,CYCLE_RUN_MONTH,CYCLE_RUN_YEAR,DATACENTER,MEMBER,BAN,EXPERTKEY,APPLICATION_ID,BP_MTFORMAT,FIXEDDATE,LATESTDATEREJECTED"
+ " order by BA_CONSMETHOD,CYCLE,DATACENTER,MEMBER,BAN,EXPERTKEY,APPLICATION_ID,BP_MTFORMAT,FIXEDDATE,LATESTDATEREJECTED";
SQLText = "";
SQLText = this.queryText;
}
Error Message
OdaDataSet Reject Report:
+ Class reportContext does not implement the org.eclipse.birt.report.engine.api.script.eventhandler.IAutoTextEventHandler interface.
Error.ScriptClassCastError ( 1 time(s) )
Thanks
Nurani Sivakumar
mwilliams
Nurani,
You'd have to expand the error for me to be able to see it all. As for the reapeating 3 times thing. Try adding MySQLString = ""; to the top of your beforeOpen script. This might help.
nuraniuscc
Hi Mike,
The 3 Repeats is Gone (So, Add MySQLString = "" in the beforeOpen event)
As far as the error message, this is all I got.
detail : org.eclipse.birt.report.engine.api.EngineException: Class reportContext does not implement the org.eclipse.birt.report.engine.api.script.eventhandler.IAutoTextEventHandler interface. at org.eclipse.birt.report.engine.script.internal.ScriptExecutor.addException(ScriptExecutor.java:201) at org.eclipse.birt.report.engine.script.internal.ScriptExecutor.addClassCastException(ScriptExecutor.java:162) at org.eclipse.birt.report.engine.script.internal.DataSetScriptExecutor.initEventHandler(DataSetScriptExecutor.java:69) at org.eclipse.birt.report.engine.script.internal.DataSetScriptExecutor.<init>(DataSetScriptExecutor.java:47) at org.eclipse.birt.report.engine.adapter.ModelDteApiAdapter.newOdaDataSet(ModelDteApiAdapter.java:481) at org.eclipse.birt.report.engine.adapter.ModelDteApiAdapter.createDataSetDesign(ModelDteApiAdapter.java:204) at org.eclipse.birt.report.engine.adapter.ModelDteApiAdapter.doDefineDataSet(ModelDteApiAdapter.java:276) at org.eclipse.birt.report.engine.adapter.ModelDteApiAdapter.defineDataSet(ModelDteApiAdapter.java:235) at org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.prepare(AbstractDataEngine.java:135) at org.eclipse.birt.report.engine.executor.ReportExecutor.execute(ReportExecutor.java:101) at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportExecutor.execute(WrappedReportExecutor.java:59) at org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplciateReportExecutor.execute(SuppressDuplciateReportExecutor.java:51) at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportExecutor.execute(WrappedReportExecutor.java:59) at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:149) at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:72) at org.eclipse.birt.report.service.ReportEngineService.runAndRenderReport(ReportEngineService.java:928) at org.eclipse.birt.report.service.BirtViewerReportService.runAndRenderReport(BirtViewerReportService.java:876) at org.eclipse.birt.report.service.actionhandler.BirtGetPageAllActionHandler.__execute(BirtGetPageAllActionHandler.java:123) at org.eclipse.birt.report.service.actionhandler.AbstractBaseActionHandler.execute(AbstractBaseActionHandler.java:89) at org.eclipse.birt.report.soapengine.processor.AbstractBaseDocumentProcessor.__executeAction(AbstractBaseDocumentProcessor.java:47) at org.eclipse.birt.report.soapengine.processor.AbstractBaseComponentProcessor.executeAction(AbstractBaseComponentProcessor.java:159) at org.eclipse.birt.report.soapengine.processor.BirtDocumentProcessor.handleGetPageAll(BirtDocumentProcessor.java:183) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.birt.report.soapengine.processor.AbstractBaseComponentProcessor.process(AbstractBaseComponentProcessor.java:111) at org.eclipse.birt.report.soapengine.endpoint.BirtSoapBindingImpl.getUpdatedObjects(BirtSoapBindingImpl.java:66) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397) at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186) at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83) at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454) at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281) at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699) at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.doPost(BirtSoapMessageDispatcherServlet.java:225) at javax.servlet.http.HttpServlet.service(HttpServlet.java:616) at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.service(BirtSoapMessageDispatcherServlet.java:112) at org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.service(ServletManager.java:180) at org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleRequest(ServletRegistration.java:90) at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:111) at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:59) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at org.eclipse.equinox.http.jetty.internal.HttpServerManager$InternalHttpServiceServlet.service(HttpServerManager.java:269) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428) at org.mortbay.jetty.servlet.ServletHandler.dispatch(ServletHandler.java:677) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568) at org.mortbay.http.HttpContext.handle(HttpContext.java:1530) at org.mortbay.http.HttpContext.handle(HttpContext.java:1482) at org.mortbay.http.HttpServer.service(HttpServer.java:909) at org.mortbay.http.HttpConnection.service(HttpConnection.java:820) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:986) at org.mortbay.http.HttpConnection.handle(HttpConnection.java:837) at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:245) at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357) at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)Caused by: org.eclipse.birt.report.engine.api.EngineException: Class reportContext not found. at org.eclipse.birt.report.engine.script.internal.ScriptExecutor.getInstance(ScriptExecutor.java:133) at org.eclipse.birt.report.engine.script.internal.DataSetScriptExecutor.initEventHandler(DataSetScriptExecutor.java:62) ... 61 moreCaused by: java.lang.ClassNotFoundException: reportContext at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:481) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:397) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:385) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:87) at java.lang.ClassLoader.loadClass(Unknown Source) at org.eclipse.birt.report.engine.executor.ApplicationClassLoader.loadClass(ApplicationClassLoader.java:77) at org.eclipse.birt.report.engine.script.internal.ScriptExecutor.getInstance(ScriptExecutor.java:128) ... 62 more
Thanks
Nurani Sivakumar
mwilliams
Nurani,
What line in your script uses reportContext?
nuraniuscc
See Note # 7 where I have the entire script copied. I am using reportContext to check Parameter values
Thanks
Nurani Sivakumar
mwilliams
Nurani,
Have you tried just using 'params["Consolidation"].value' rather than the reportContext way?
nuraniuscc
Hi Mike,
If you look at Note # 7 (Where I have the entire Script) You can clearly see
that I am using 'params["Consolidation"].value' in my IF statement. But when
I can actually move I use "reportContext" (Which You had suggested).
1) Is the way I am using not right?
2) What is the issue here? Can we not correct it?
(Because this was working before .... I put this the very first time and
carried this to all the reports)
I don't mind changing to Whatever you suggest - I just want it to Work
Thanks
Nurani Sivakumar
mwilliams
Nurani,
Everything you're doing has gotten more complex since you first started posting. The error seems to be talking about not liking the reportContext call there, so your best bet would be to remove that format and use the params["paramName"].value format. If it works, then the issue is solved. Let me know.
nuraniuscc
Hi Mike,
Thanks for your help. It worked.
Even after I changed the reportContext to params in my Script, that error was showing up.
Then I went to the XML window and there it was. It looks like when you make changes to the Report the XML doesn't get refreshed with the Changes.
So, I saw there was only one occurence of "reportContext". Went ahead and
deleted that line and BIngo the report came out without any errors.
(There was NO DATA, But that is Ok). Now I can go and fix the same issue on other reports.
It's Just frustration at times to get things done more than anything else.
Thanks
Nurani Sivakumar
mwilliams
Nurani,
Excellent. Glad it's working now.