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)
Creating reports dynamically
Sudhi
Hi All,
Thanks for your help till now. I have a requirement to do One report.It is the attendance data for One month.For all employees.Date 1-end of month i need to capture data from db table,Date should be dynamic depends on the month,
And also after displaying status of all the employees i need to add each stauts per employee ,Means How many leaves he taken,How many Week offs etc.
I dont know where to do these calculations in Birt.I expecting help.
Thanks
Sudheesh
Find more posts tagged with
Comments
mwilliams
Hi Sudheesh,
Can you post some sample data so I know how the data is coming in? Also, what version of BIRT are you using?
Sudhi
Hi,
I am creating attendance report for a duration.
Suppose we want to do some operations according to the db query out put ,eg.add all the leaves,add all present etc,And also the structure of display should be dynamic,ie leaves are coming from masters tables, according to number of leaves in masters the structure of report will vary,
I need to find out each leave how much,so the heading should come 1-31 of the month and all leave types,total working days etc.
And also i have done that report using jsp,I want to create the same in BIRT .
Expecting your help.
Sudheesh
Sudhi
Hi,
I am using BIRT 2.1.3 and
Birt 2.3.1 run time for deployment.
In my table i am storing the status for each day.I am passing one by date and getting the data for each day,After getting this in JSp i am adding each section to find out the total,
And printing the total.
Sudheesh
mwilliams
Sudheesh,
If you could post a small snippet of sample data for me to work with, that would be of great help. Thanks.
Sudhi
Hi,
Code snippet i dont have,till now i am using only sql queries and nested quries to create reports.
Sudheesh
mwilliams
Sudheesh,
Sorry, I probably didn't word what I was looking for very well. I am just looking for a small chunk of sample data that I can use to create a report. However it looks in your dataSet is how I want to see it. Then, if you can show how you want it to look in your report, that will help even more. Thanks.
Sudhi
Hi,
How to design dynamic table in birt report created by using scripted datasource
Thanks
Sudhi
mwilliams
Sudhi,
You can group by employee and include aggregations in the group footer to do calculations for each individual employee.
Sudhi
Hi,
While creating birt report using scripted datasource ,i got error
org.eclipse.birt.report.service.api.ReportServiceException :Invalid TOC query.
And also i am getting the exception "data.engine.ColumnBindingReferToInexistColumn ( 1 time(s) )"
Pls helpme to resove this issue
Thanks
Sudhi
Sudhi
Hi,
I am using scripted data source for creating reports.
While doing i got couple of errors;I have written code in open and fetch methods.
in open i am trying to create object of java class that having methods for getting data.
A copy of Class file of that java file i kept inside eclipse/plugins/org.eclipse.birt.report.viewer_2.1.3.v20070705-1847/birt/WEB-INF/classes" folder.
I am creating object like this
myobj = new com.MasterClass();
favorites = myobj.getContentsForDisplay(); I am giving tghe exception i got.
There are errors evaluating script "myobj = new com.MasterClass();
favorites = myobj.getContentsForDisplay();
totalrows = favorites.size();
currentrow = 0;".
Error.ScriptEvaluationError ( 1 time(s) )
detail : org.eclipse.birt.report.engine.api.EngineException: There are errors evaluating script "myobj = new com.MasterClass();
favorites = myobj.getContentsForDisplay();
totalrows = favorites.size();
currentrow = 0;"..
at org.eclipse.birt.report.engine.script.internal.DtEScriptExecutor.handleJS(DtEScriptExecutor.java:76)
at org.eclipse.birt.report.engine.script.internal.DataSetScriptExecutor.handleJS(DataSetScriptExecutor.java:159)
at org.eclipse.birt.report.engine.script.internal.ScriptDataSetScriptExecutor.handleOpen(ScriptDataSetScriptExecutor.java:66)
at org.eclipse.birt.data.engine.impl.ScriptDataSetRuntime.open(ScriptDataSetRuntime.java:69)
at org.eclipse.birt.data.engine.impl.PreparedScriptDSQuery$ScriptDSQueryExecutor$CustomDataSet.open(PreparedScriptDSQuery.java:234)
at org.eclipse.birt.data.engine.impl.PreparedScriptDSQuery$ScriptDSQueryExecutor.executeOdiQuery(PreparedScriptDSQuery.java:210)
at org.eclipse.birt.data.engine.impl.QueryExecutor.execute(QueryExecutor.java:754)
at org.eclipse.birt.data.engine.impl.ServiceForQueryResults.executeQuery(ServiceForQueryResults.java:183)
at org.eclipse.birt.data.engine.impl.QueryResults.getResultIterator(QueryResults.java:148)
at org.eclipse.birt.report.engine.data.dte.DteResultSet.<init>(DteResultSet.java:85)
at org.eclipse.birt.report.engine.data.dte.DteDataEngine.doExecuteQuery(DteDataEngine.java:120)
at org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.execute(AbstractDataEngine.java:210)
at org.eclipse.birt.report.engine.executor.ExecutionContext.executeQuery(ExecutionContext.java:1658)
at org.eclipse.birt.report.engine.executor.QueryItemExecutor.executeQuery(QueryItemExecutor.java:62)
at org.eclipse.birt.report.engine.executor.DataItemExecutor.execute(DataItemExecutor.java:70)
at org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplicateItemExecutor.execute(SuppressDuplicateItemExecutor.java:43)
at org.eclipse.birt.report.engine.internal.executor.l18n.LocalizedReportItemExecutor.execute(LocalizedReportItemExecutor.java:35)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutChildren(HTMLBlockStackingLM.java:63)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:159)
at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackingLM.resumeLayout(HTMLInlineStackingLM.java:94)
at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackingLM.layoutChildren(HTMLInlineStackingLM.java:138)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:159)
at org.eclipse.birt.report.engine.layout.html.HTMLRowLM.layout(HTMLRowLM.java:30)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutChildren(HTMLBlockStackingLM.java:68)
at org.eclipse.birt.report.engine.layout.html.HTMLTableLM.layoutChildren(HTMLTableLM.java:79)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.layout(HTMLAbstractLM.java:159)
at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layoutChildren(HTMLPageLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout(HTMLPageLM.java:82)
at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:80)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:215)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:145)
at org.eclipse.birt.report.service.ReportEngineService.runAndRenderReport(Unknown Source)
at org.eclipse.birt.report.service.ReportEngineService.runAndRenderReport(Unknown Source)
at org.eclipse.birt.report.service.BirtViewerReportService.runAndRenderReport(Unknown Source)
at org.eclipse.birt.report.service.actionhandler.BirtRunAndRenderActionHandler.__execute(Unknown Source)
at org.eclipse.birt.report.service.actionhandler.AbstractBaseActionHandler.execute(Unknown Source)
at org.eclipse.birt.report.presentation.aggregation.layout.EngineFragment.doService(Unknown Source)
at org.eclipse.birt.report.presentation.aggregation.AbstractBaseFragment.service(Unknown Source)
at org.eclipse.birt.report.servlet.BirtEngineServlet.__doGet(Unknown Source)
at org.eclipse.birt.report.servlet.BaseReportEngineServlet.doGet(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2422)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.eclipse.tomcat.internal.EclipseErrorReportValve.invoke(EclipseErrorReportValve.java:153)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:199)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:700)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:595)
Caused by: org.eclipse.birt.data.engine.core.DataException: A BIRT exception occurred: Error evaluating Javascript expression. Script engine error: ReferenceError: "SimpleClass" is not defined. (DataSet[fvg].__bm_OPEN#2)
Script source: DataSet[fvg].__bm_OPEN, line: 1, text:
__bm_OPEN(). See next exception for more information.
Error evaluating Javascript expression. Script engine error: ReferenceError: "SimpleClass" is not defined. (DataSet[fvg].__bm_OPEN#2)
Script source: DataSet[fvg].__bm_OPEN, line: 1, text:
__bm_OPEN()
at org.eclipse.birt.data.engine.core.DataException.wrap(DataException.java:118)
at org.eclipse.birt.data.engine.script.ScriptEvalUtil.evaluateJSAsExpr(ScriptEvalUtil.java:558)
at org.eclipse.birt.data.engine.script.JSMethodRunner.runScript(JSMethodRunner.java:79)
at
Waiting for your reply'
Sudhi
Sudhi
Hi,
Thanks for your reply till date,
my new issue is while creating reporyt i want to pass one parameter to open method ,While passing i got this exception.Pls help me how to solve it
Multiple exceptions occurred.
Show Exception Stack Trace Hide Exception Stack Trace
Stack Trace:
org.eclipse.birt.report.engine.api.EngineException: There are errors evaluating script "favoritesclass = new Packages.com.SimpleClass(); var fmne = reportContext.getParameterValue("NewParameter1"); favorites = favoritesclass.getMusterRoll(fmne); totalrows = favorites.size(); currentrow = 0;": {1}. at org.eclipse.birt.report.engine.script.internal.DtEScriptExecutor.handleJS(DtEScriptExecutor.java:77) at org.eclipse.birt.report
mwilliams
Sudhi,
Is that the entire stack trace?
Sudhi
Hi,
Stack trace only some lines i given here,For passing i used inputParams,params,reportContext.getParaneterValue(),But report is not getting diplayed.Muliple Stack Trace exception is getting displayed.
What may be the problem.
I am passign this parameter to a java method and getting One Arraylist for report
Waiting for your help
Sudheesh
mwilliams
Sudheesh,
There is no '+' next to the stack trace that you can expand to see the rest of the error? If not, let me know. Thanks.
Sudhi
Hi,
In preview nothing is displayed.
While deployed in the server following exceptions showed
org.eclipse.birt.report.engine.api.EngineException: There are errors evaluating script "favoritesclass = new Packages.com.SimpleClass(); var fmne = reportContext.getParameterValue("NewParameter1"); favorites = favoritesclass.getMusterRoll(fmne); totalrows = favorites.size(); currentrow = 0;": {1}. at org.eclipse.birt.report.engine.script.internal.DtEScriptExecutor.handleJS(DtEScriptExecutor.java:77) at org.eclipse.birt.report.engine.script.internal.DataSetScriptExecutor.handleJS(DataSetScriptExecutor.java:196) at org.eclipse.birt.report.engine.script.internal.ScriptDataSetScriptExecutor.handleOpen(ScriptDataSetScriptExecutor.java:77) at org.eclipse.birt.data.engine.impl.ScriptDataSetRuntime.open(ScriptDataSetRuntime.java:79) at org.eclipse.birt.data.engine.impl.PreparedScriptDSQuery$ScriptDSQueryExecutor$CustomDataSet.open(PreparedScriptDSQuery.java:244) at org.eclipse.birt.data.engine.impl.PreparedScriptDSQuery$ScriptDSQueryExecutor.executeOdiQuery(PreparedScriptDSQuery.java:220) at org.eclipse.birt.data.engine.impl.QueryExecutor.execute(QueryExecutor.java:904) at org.eclipse.birt.data.engine.impl.ServiceForQueryResults.executeQuery(ServiceForQueryResults.java:233) at rg.eclipse.birt.data.engine.impl.QueryResults.getResultIterator(QueryResults.java:161) at org.eclipse.birt.report.engine.data.dte.QueryResultSet.<init>(QueryResultSet.java:92) at rg.eclipse.birt.report.engine.data.dte.DteDataEngine.doExecuteQuery(DteDataEngine.java:128) at eclipse.birt.report.engine.data.dte.DataGenerationEngine.doExecuteQuery(DataGenerationEngine.java:79) at eclipse.birt.report.engine.data.dte.AbstractDataEngine.execute(AbstractDataEngine.java:248) at org.eclipse.birt.report.engine.executor.ExecutionContext.executeQuery(ExecutionContext.java:1736) at org.eclipse.birt.report.engine.executor.QueryItemExecutor.executeQuery(QueryItemExecutor.java:77) at org.eclipse.birt.report.engine.executor.TableItemExecutor.execute(TableItemExecutor.java:62) at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.execute(WrappedReportItemExecutor.java:45) at .eclipse.birt.report.engine.internal.executor.emitter.ReportItemEmitterExecutor.execute(ReportItemEmitterExecutor.java:45) at g.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplicateItemExecutor.execute(SuppressDuplicateItemExecutor.java:42) at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:63) at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout(HTMLPageLM.java:90) at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:101) at org.eclipse.birt.report.engine.presentation.ReportDocumentBuilder.build(ReportDocumentBuilder.java:231) at org.eclipse.birt.report.engine.api.impl.RunTask.doRun(RunTask.java:237) at org.eclipse.birt.report.engine.api.impl.RunTask.run(RunTask.java:90) at org.eclipse.birt.report.service.ReportEngineService.runReport(ReportEngineService.java:1164) at org.eclipse.birt.report.service.BirtViewerReportService.runReport(BirtViewerReportService.java:155) at org.eclipse.birt.report.service.actionhandler.BirtRunReportActionHandler.__execute(BirtRunReportActionHandler.java:81) at org.eclipse.birt.report.service.actionhandler.BirtGetPageActionHandler.__checkDocumentExists(BirtGetPageActionHandler.java:58) at org.eclipse.birt.report.service.actionhandler.AbstractGetPageActionHandler.prepareParameters(AbstractGetPageActionHandler.java:121) at org.eclipse.birt.report.service.actionhandler.AbstractGetPageActionHandler.__execute(AbstractGetPageActionHandler.java:106) at org.eclipse.birt.report.service.actionhandler.AbstractBaseActionHandler.execute(AbstractBaseActionHandler.java:90) at org.eclipse.birt.report.soapengine.processor.AbstractBaseDocumentProcessor.__executeAction(AbstractBaseDocumentProcessor.java:47) at org.eclipse.birt.report.soapengine.processor.AbstractBaseComponentProcessor.executeAction(AbstractBaseComponentProcessor.java:143) at org.eclipse.birt.report.soapengine.processor.BirtDocumentProcessor.handleGetPage(BirtDocumentProcessor.java:87) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.eclipse.birt.report.soapengine.processor.AbstractBaseComponentProcessor.process(AbstractBaseComponentProcessor.java:112) at org.eclipse.birt.report.soapengine.endpoint.BirtSoapBindingImpl.getUpdatedObjects(BirtSoapBindingImpl.java:66) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) 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:709) at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.service(BirtSoapMessageDispatcherServlet.java:112) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.eclipse.birt.report.filter.ViewerFilter.doFilter(ViewerFilter.java:68) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) Caused by: org.eclipse.birt.data.engine.core.DataException: A BIRT exception occurred: There are errors evaluating script "__bm_OPEN()": TypeError: [JavaPackage com.SimpleClass] is not a function, it is org.mozilla.javascript.NativeJavaPackage. (<inline>#2).. See next exception for more information. There are errors evaluating script "__bm_OPEN()": TypeError: [JavaPackage com.SimpleClass] is not a function, it is org.mozilla.javascript.NativeJavaPackage. (<inline>#2). at org.eclipse.birt.data.engine.core.DataException.wrap(DataException.java:118) at org.eclipse.birt.data.engine.script.ScriptEvalUtil.evaluateJSAsExpr(ScriptEvalUtil.java:717) at org.eclipse.birt.data.engine.script.JSMethodRunner.runScript(JSMethodRunner.java:76) at
Sudhi
Hi,
Problem is not because of parameters,With out passing parameters also it is show ing the same exception.I Think calling java method may be the problem,One Static arrayList i returned from java class to birt. In that case it is working fine .But if i put some queries inside java it is showing the problem.
Waiting for your reply
Sudhi
Sudhi
Hi
I was working on the birt report that using scripted datasource.
From the open method i am calling One java class method.From the java class method i am creating One connection code below
Class.forName("org.gjt.mm.mysql.Driver");
con=DriverManager.getConnection("jdbc:mysql://localhost:3306/dbname","dbuser","password");
While doing like this i am getting the exception while running the report.
Is it possible to create like this ? or is there any way to proceed
Waiting for Your reply
Sudhi
mwilliams
Sudhi,<br />
<br />
For the class call, you can check out <a class='bbc_url' href='
http://www.birt-exchange.com/devshare/designing-birt-reports/544-sample-birt-scripted-data-source-example/#description'>this
example</a>. It should help show you how to correctly call an external java class. The live example is not currently working because of an update to the server. Hopefully it will be again soon. The downloadable example should work though.
Sudhi
Hi,
The example that you given same way i am doing .That example is working fine.
Only problem is Connection in the java class.
Sudhi
Sudhi
Hi,
database connection problem is solved in the birt design phase.Problem was auhorization with db.
Now a new problem started.
I kept class file inside /webapps/WebViewerExample/WEB-INF/classes folder
While running in the Tomcat server i got the exception.It is given below.
Birt viewer is installed properly.
Sample reports are working properly.I think problem is only with the connection.In the birt report viewer
WebViewerExample/WEB-INF/lib i added all the connection jar files.Still it is showing the problem.
org.eclipse.birt.report.engine.api.EngineException: There are errors evaluating script "favoritesclass = new Packages.com.SimpleClass(); var fm_id=params["NewParameter1"]; favorites = favoritesclass.getMusterRoll(fm_id); totalrows = favorites.size(); currentrow = 0;": {1}. at org.eclipse.birt.report.engine.script.internal.DtEScriptExecutor.handleJS(DtEScriptExecutor.java:77) at org.eclipse.birt.report.engine.script.internal.DataSetScriptExecutor.handleJS(DataSetScriptExecutor.java:196) at org.eclipse.birt.report.engine.script.internal.ScriptDataSetScriptExecutor.handleOpen(ScriptDataSetScriptExecutor.java:77) at org.eclipse.birt.data.engine.impl.ScriptDataSetRuntime.open(ScriptDataSetRuntime.java:79) at org.eclipse.birt.data.engine.impl.PreparedScriptDSQuery$ScriptDSQueryExecutor$CustomDataSet.open(PreparedScriptDSQuery.java:244) at org.eclipse.birt.data.engine.impl.PreparedScriptDSQuery$ScriptDSQueryExecutor.executeOdiQuery(PreparedScriptDSQuery.java:220) at org.eclipse.birt.data.engine.impl.QueryExecutor.execute(QueryExecutor.java:904) at org.eclipse.birt.data.engine.impl.ServiceForQueryResults.executeQuery(ServiceForQueryResults.java:233) at org.eclipse.birt.data.engine.impl.QueryResults.getResultIterator(QueryResults.java:161) at org.eclipse.birt.report.engine.data.dte.QueryResultSet(QueryResultSet.java:92) at org.eclipse.birt.report.engine.data.dte.DteDataEngine.doExecuteQuery(DteDataEngine.java:128) at org.eclipse.birt.report.engine.data.dte.DataGenerationEngine.doExecuteQuery(DataGenerationEngine.java:79) at org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.execute(AbstractDataEngine.java:248) at org.eclipse.birt.report.engine.executor.ExecutionContext.executeQuery(ExecutionContext.java:1736) at org.eclipse.birt.report.engine.executor.QueryItemExecutor.executeQuery(QueryItemExecutor.java:77) at org.eclipse.birt.report.engine.executor.TableItemExecutor.execute(TableItemExecutor.java:62) at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.execute(WrappedReportItemExecutor.java:45) at org.eclipse.birt.report.engine.internal.executor.emitter.ReportItemEmitterExecutor.execute(ReportItemEmitterExecutor.java:45) at org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplicateItemExecutor.execute(SuppressDuplicateItemExecutor.java:42) at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:63) at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout(HTMLPageLM.java:90) at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:101) at org.eclipse.birt.report.engine.presentation.ReportDocumentBuilder.build(ReportDocumentBuilder.java:231) at org.eclipse.birt.report.engine.api.impl.RunTask.doRun(RunTask.java:237) at org.eclipse.birt.report.engine.api.impl.RunTask.run(RunTask.java:90) at org.eclipse.birt.report.service.ReportEngineService.runReport(ReportEngineService.java:1164) at org.eclipse.birt.report.service.BirtViewerReportService.runReport(BirtViewerReportService.java:155) at org.eclipse.birt.report.service.actionhandler.BirtRunReportActionHandler.__execute(BirtRunReportActionHandler.java:81) at org.eclipse.birt.report.service.actionhandler.BirtGetPageActionHandler.__checkDocumentExists(BirtGetPageActionHandler.java:58) at org.eclipse.birt.report.service.actionhandler.AbstractGetPageActionHandler.prepareParameters(AbstractGetPageActionHandler.java:121) at org.eclipse.birt.report.service.actionhandler.AbstractGetPageActionHandler.__execute(AbstractGetPageActionHandler.java:106) at org.eclipse.birt.report.service.actionhandler.AbstractBaseActionHandler.execute(AbstractBaseActionHandler.java:90) at org.eclipse.birt.report.soapengine.processor.AbstractBaseDocumentProcessor.__executeAction(AbstractBaseDocumentProcessor.java:47) at org.eclipse.birt.report.soapengine.processor.AbstractBaseComponentProcessor.executeAction(AbstractBaseComponentProcessor.java:143) at org.eclipse.birt.report.soapengine.processor.BirtDocumentProcessor.handleGetPage(BirtDocumentProcessor.java:87) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.eclipse.birt.report.soapengine.processor.AbstractBaseComponentProcessor.process(AbstractBaseComponentProcessor.java:112) at org.eclipse.birt.report.soapengine.endpoint.BirtSoapBindingImpl.getUpdatedObjects(BirtSoapBindingImpl.java:66) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) 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:709) at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.service(BirtSoapMessageDispatcherServlet.java:112) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.eclipse.birt.report.filter.ViewerFilter.doFilter(ViewerFilter.java:68) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) Caused by: org.eclipse.birt.data.engine.core.DataException: A BIRT exception occurred: There are errors evaluating script "__bm_OPEN()": TypeError: [JavaPackage com.SimpleClass] is not a function, it is org.mozilla.javascript.NativeJavaPackage. (#2).. See next exception for more information. There are errors evaluating script "__bm_OPEN()": TypeError: [JavaPackage com.SimpleClass] is not a function, it is org.mozilla.javascript.NativeJavaPackage. (#2). at org.eclipse.birt.data.engine.core.DataException.wrap(DataException.java:118) at org.eclipse.birt.data.engine.script.ScriptEvalUtil.evaluateJSAsExpr(ScriptEvalUtil.java:717) at org.eclipse.birt.data.engine.script.JSMethodRunner.runScript(JSMethodRunner.java:76) at
mwilliams
Sudhi,
So, the report works in the designer, just not in the viewer now?
Sudhi
Thanks it is working now
mwilliams
Sudhi,
Good to hear. Let us know if you have any other questions.
Sudhi
Hi,
I want to give hyperlink in my report.In the property editor i selcted Hyperlink and in hyperlink options i given "/WebViewerExample/frameset?_report=Reports/CanteenReport_details.rptdesign&Year="+params["Year"]+"&Month="+params["Month"]+"&EMPLOYEE_ID="+row["EMPLOYEE_ID"]+"&EMPLOYEE_NAME="+row["EMPLOYEE_NAME"]
I am getting the link in the report.But problem is When clicking on the report i am getting the exception
(given below). And how to catch the parametrs that i am sending through the link.Whether in open method we can get the Paramters using params[""].
There is no report design object available.
org.eclipse.birt.report.exception.ViewerException: There is no report design object available.
at org.eclipse.birt.report.context.ViewerAttributeBean.__init(ViewerAttributeBean.java:230)
at org.eclipse.birt.report.context.BaseAttributeBean.init(BaseAttributeBean.java:233)
at org.eclipse.birt.report.context.ViewerAttributeBean.(ViewerAttributeBean.java:113)
at org.eclipse.birt.report.context.BirtContext.__init(BirtContext.java:44)
at org.eclipse.birt.report.context.BaseContext.(BaseContext.java:69)
at org.eclipse.birt.report.context.BirtContext.(BirtContext.java:30)
at org.eclipse.birt.report.servlet.ViewerServlet.__getContext(ViewerServlet.java:150)
at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.doGet(BirtSoapMessageDispatcherServlet.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.service(BirtSoapMessageDispatcherServlet.java:112)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.eclipse.birt.report.filter.ViewerFilter.doFilter(ViewerFilter.java:68)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Sudhi
Sudhi
Hi,
I have created one BIRT report using scripted datasource.Now i want to integrate with my application.Such that in from a link it should open up.I am using "birt-runtime-2_3_1" for running the reports.if we deploy it in the WebViewerExample that is coming with birt-runtime-2_3_1 report will work fine.
When i click the report link in my application i am getting the error message "no report design available".I added WebViewerExample in webapps separate from my application. i given the URL
"/WebViewerExample/frameset?_report=Reports/CanteenReportdetails.rptdesign"
What will be the problem.
Pls help
Sud
mwilliams
Sud,
Is that the entire URL you're using? Or are you using the rest of the path to your app server as well?