Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » how to create datewise table?
how to create datewise table? [message #1100778] Tue, 03 September 2013 15:22 Go to next message
4040 4040 is currently offline 4040 4040Friend
Messages: 78
Registered: February 2013
Member
Hi,am having two requirement..first thing is i had created a date of month as parameter (1-8-2013 to 31-8-2013)...if i have select a date it have to display table like below


                     6am-7am  8am-9am   9am-10am  10am-11am
classic car             10         20      30         40
train                   12        40       50        90


second thing is already i create a date of month(Aug 2013)..but it have to automatically update in listbox.to.next month of dates(sep 2013)

how to achieve two requirement.........

thank in advance...

[Updated on: Tue, 03 September 2013 15:23]

Report message to a moderator

Re: how to create datewise table? [message #1100958 is a reply to message #1100778] Tue, 03 September 2013 21:05 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

This looks like a crosstab to me grouped by hour. For your second question, I'm not sure I'm totally understanding your question. If you can explain more, that would be great. Thanks!

Michael

Developer Evangelist, Silanis
Re: how to create datewise table? [message #1102278 is a reply to message #1100958] Thu, 05 September 2013 15:36 Go to previous messageGo to next message
4040 4040 is currently offline 4040 4040Friend
Messages: 78
Registered: February 2013
Member
thank for reply..this is the urgent needed report then i will work on hour report..this report is for mainly to find variance of week
for example let u consider example the date like 08/14/2003
so if u select a date it have to compare last week (08/7/2003)for sale ....if u look at a report they are two table so first table contain a productline with hyperlink so if we click a hyperlink it have to drill through a table country..so country contain a VARIANCE of sale ..according to variance only the top Table contain value Ranges..of product-line of (0-5%),(6-10%)like this...


                   0-5%       6-10%   10-15%    15-20%     country
classic car             10         20      30         40          100 
train                   20        40       60        90            210


country              sale     lastweeksale   variance%

india                6613          6287        5
spain                13036          12424      5
usa                  8632            8337      4


how to achive this report...i have attached a sampledb..kindly provide a solution


thank u...

[Updated on: Thu, 05 September 2013 15:39]

Report message to a moderator

Re: how to create datewise table? [message #1102748 is a reply to message #1102278] Fri, 06 September 2013 03:24 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

I'm not sure I'm understanding what happens when you click on a hyperlink in the top table. You want the bottom table to be filled with countries for that product line? And how are you determining the values that go in the top column? Let me know. If you can show a sample set of data and what it should look like in the report, it might help. Thanks.

Michael

Developer Evangelist, Silanis
Re: how to create datewise table? [message #1103134 is a reply to message #1102748] Fri, 06 September 2013 12:12 Go to previous messageGo to next message
4040 4040 is currently offline 4040 4040Friend
Messages: 78
Registered: February 2013
Member
thank for reply....report is mainly for compare a Weeks of the day..
for example:
According to my calculations, the percentage difference between 6613(sale) and 6287 last week(sale) is 5% of the day..
so from the variance we fill value in top table...
and we create a hyperlink for each variance..(i.e)if we click a 5(0-5) in top table it have drill-down a value between how many country are in the range of 5%....like wise it..go
i have attached a sample db with label value...kindly provide sample db..


thank in advance..

[Updated on: Fri, 06 September 2013 12:14]

Report message to a moderator

Re: how to create datewise table? [message #1103396 is a reply to message #1103134] Fri, 06 September 2013 18:21 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

I don't know that the sample database has enough data to do this by week. I'll change it to be set up by month. If you want it to be done for week, please provide me with some sample data to use. Thanks!

Michael

Developer Evangelist, Silanis
Re: how to create datewise table? [message #1103663 is a reply to message #1103396] Sat, 07 September 2013 04:40 Go to previous messageGo to next message
4040 4040 is currently offline 4040 4040Friend
Messages: 78
Registered: February 2013
Member
first of all thank for u r reply......i have attached CSV data for u r reference...if u can do by this it helpful...if cant try to do in sample databases..by month...and provide idea how to do in week...

thank u...
  • Attachment: week.zip
    (Size: 6.57KB, Downloaded 205 times)

[Updated on: Sat, 07 September 2013 04:42]

Report message to a moderator

Re: how to create datewise table? [message #1105609 is a reply to message #1103663] Tue, 10 September 2013 04:22 Go to previous messageGo to next message
4040 4040 is currently offline 4040 4040Friend
Messages: 78
Registered: February 2013
Member
kindly reply for the post...........
Re: how to create datewise table? [message #1106412 is a reply to message #1105609] Wed, 11 September 2013 04:17 Go to previous messageGo to next message
4040 4040 is currently offline 4040 4040Friend
Messages: 78
Registered: February 2013
Member
kindly reply for the post..........i am waiting .........


thank u in advance..
Re: how to create datewise table? [message #1106751 is a reply to message #1106412] Wed, 11 September 2013 13:56 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

Sorry for the delay. With the data you gave, I don't know how to associate the Outlets with a Zone. Can you please update the data in a way that I can do that? Or give me the list of outlets for each zone. Thanks.

Michael

Developer Evangelist, Silanis
Re: how to create datewise table? [message #1106772 is a reply to message #1106751] Wed, 11 September 2013 14:27 Go to previous messageGo to next message
4040 4040 is currently offline 4040 4040Friend
Messages: 78
Registered: February 2013
Member
thank for u r reply ..here is the CSV file zone and outlet...

thank u
Re: how to create datewise table? [message #1107407 is a reply to message #1106772] Thu, 12 September 2013 10:57 Go to previous messageGo to next message
4040 4040 is currently offline 4040 4040Friend
Messages: 78
Registered: February 2013
Member
kindly reply for the post...
Re: how to create datewise table? [message #1107900 is a reply to message #1107407] Fri, 13 September 2013 04:02 Go to previous messageGo to next message
4040 4040 is currently offline 4040 4040Friend
Messages: 78
Registered: February 2013
Member
without u r help am struggling a lot....if u can do this by month also help to do my report.....kindly reply for the post......

thank u ..
Re: how to create datewise table? [message #1108578 is a reply to message #1107900] Sat, 14 September 2013 03:01 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

Sorry. I've been bogged down with other stuff. I'll take a look at it sometime this weekend. Smile

Michael

Developer Evangelist, Silanis
Re: how to create datewise table? [message #1108615 is a reply to message #1108578] Sat, 14 September 2013 04:21 Go to previous messageGo to next message
4040 4040 is currently offline 4040 4040Friend
Messages: 78
Registered: February 2013
Member
thank u for reply...i will be wait ... Confused
Re: how to create datewise table? [message #1110663 is a reply to message #1108615] Tue, 17 September 2013 06:44 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

I got a little work on this done, but I'll have to transform your data with a scripted data source, I think. I'll work more on it in the am.

Michael

Developer Evangelist, Silanis
Re: how to create datewise table? [message #1111256 is a reply to message #1100778] Wed, 18 September 2013 01:43 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

Here is what I've got for you so far. I just did positive and negative difference to simplify it. I had to create two scripted data sources out of the original data to get what you were wanting. I might be able to simplify this later. This will work for now. All you need to do after this is to add your hyperlinks and pass a parameter through to limit the data and the rest should take care of itself.

Michael

Developer Evangelist, Silanis
Re: how to create datewise table? [message #1111659 is a reply to message #1111256] Wed, 18 September 2013 14:45 Go to previous messageGo to next message
4040 4040 is currently offline 4040 4040Friend
Messages: 78
Registered: February 2013
Member
first of all thank for u r effort and reply...which u gave is work as far good...and my question.. example which u provide is created by scripted data-set to fetch value for positive and negative value..so if i want more column means to create as like (positive and negative value).is the only way by scripted data set...or else we can do to by any other way like compute columns or by initialize method...i am not well in script am just asking idea from u concern ....


thank u....

[Updated on: Wed, 18 September 2013 15:04]

Report message to a moderator

Re: how to create datewise table? [message #1111682 is a reply to message #1111659] Wed, 18 September 2013 15:17 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

There's likely going to have to be some script to make this work as you're wanting. I guess you wouldn't necessarily have to use a scripted dataset, but you'd still have to calculate the values for each variance group from the dataSet that splits the columns for this week and last week. I was going to use a crosstab for the bottom table and let it do the grouping and calculate the variance, but since the values in the top table depend on the second table, I had to do the calculations at a dataset level, which is why I used the scripted dataSets. The top table could probably be a crosstab instead, which would maybe make things easier for you on the variance columns.

Michael

Developer Evangelist, Silanis
Re: how to create datewise table? [message #1111689 is a reply to message #1111682] Wed, 18 September 2013 15:26 Go to previous messageGo to next message
4040 4040 is currently offline 4040 4040Friend
Messages: 78
Registered: February 2013
Member
No Message Body

[Updated on: Mon, 23 September 2013 14:02]

Report message to a moderator

Re: how to create datewise table? [message #1114990 is a reply to message #1111689] Mon, 23 September 2013 14:02 Go to previous messageGo to next message
4040 4040 is currently offline 4040 4040Friend
Messages: 78
Registered: February 2013
Member
Hi..am working on this example am getting this error i dono where is happens..
i just copied which u gave i just include a one datasource for oracle instead CSV data source........if is there a better way compared to this..just provide by sample db its very much useful to do my report...

A BIRT exception occurred. See next exception for more information.
TypeError: Cannot read property "length" from null (/report/data-sets/script-data-set[@id="3289"]/method[@name="open"]#4).
   at org.eclipse.birt.report.engine.script.internal.DtEScriptExecutor.handleJS(DtEScriptExecutor.java:99)
   at org.eclipse.birt.report.engine.script.internal.DataSetScriptExecutor.handleJS(DataSetScriptExecutor.java:256)
   at org.eclipse.birt.report.engine.script.internal.ScriptDataSetScriptExecutor.handleOpen(ScriptDataSetScriptExecutor.java:98)
   at org.eclipse.birt.data.engine.impl.ScriptDataSetRuntime.open(ScriptDataSetRuntime.java:80)
   at org.eclipse.birt.data.engine.impl.PreparedScriptDSQuery$ScriptDSQueryExecutor$CustomDataSet.open(PreparedScriptDSQuery.java:247)
   at org.eclipse.birt.data.engine.impl.PreparedScriptDSQuery$ScriptDSQueryExecutor.executeOdiQuery(PreparedScriptDSQuery.java:223)
   at org.eclipse.birt.data.engine.impl.QueryExecutor.execute(QueryExecutor.java:1208)
   at org.eclipse.birt.data.engine.impl.ServiceForQueryResults.executeQuery(ServiceForQueryResults.java:233)
   at org.eclipse.birt.data.engine.impl.QueryResults.getResultIterator(QueryResults.java:178)
   at org.eclipse.birt.report.engine.data.dte.QueryResultSet.(QueryResultSet.java:98)
   at org.eclipse.birt.report.engine.data.dte.DteDataEngine.doExecuteQuery(DteDataEngine.java:168)
   at org.eclipse.birt.report.engine.data.dte.DataGenerationEngine.doExecuteQuery(DataGenerationEngine.java:83)
   at org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.execute(AbstractDataEngine.java:275)
   at org.eclipse.birt.report.engine.executor.ExecutionContext.executeQuery(ExecutionContext.java:1947)
   at org.eclipse.birt.report.engine.executor.QueryItemExecutor.executeQuery(QueryItemExecutor.java:80)
   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:46)
   at org.eclipse.birt.report.engine.internal.executor.emitter.ReportItemEmitterExecutor.execute(ReportItemEmitterExecutor.java:46)
   at org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplicateItemExecutor.execute(SuppressDuplicateItemExecutor.java:43)
   at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.execute(WrappedReportItemExecutor.java:46)
   at org.eclipse.birt.report.engine.internal.executor.l18n.LocalizedReportItemExecutor.execute(LocalizedReportItemExecutor.java:34)
   at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:65)
   at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout(HTMLPageLM.java:92)
   at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:100)
   at org.eclipse.birt.report.engine.presentation.ReportDocumentBuilder.build(ReportDocumentBuilder.java:249)
   at org.eclipse.birt.report.engine.api.impl.RunTask.doRun(RunTask.java:269)
   at org.eclipse.birt.report.engine.api.impl.RunTask.run(RunTask.java:86)
   at org.eclipse.birt.report.service.ReportEngineService.runReport(ReportEngineService.java:1325)
   at org.eclipse.birt.report.service.BirtViewerReportService.runReport(BirtViewerReportService.java:158)
   at org.eclipse.birt.report.service.actionhandler.BirtRunReportActionHandler.__execute(BirtRunReportActionHandler.java:81)
   at org.eclipse.birt.report.service.actionhandler.BirtChangeParameterActionHandler.runReport(BirtChangeParameterActionHandler.java:58)
   at org.eclipse.birt.report.service.actionhandler.AbstractChangeParameterActionHandler.__execute(AbstractChangeParameterActionHandler.java:52)
   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.handleChangeParameter(BirtDocumentProcessor.java:100)
   at sun.reflect.GeneratedMethodAccessor270.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:112)
   at org.eclipse.birt.report.soapengine.endpoint.BirtSoapBindingImpl.getUpdatedObjects(BirtSoapBindingImpl.java:66)
   at sun.reflect.GeneratedMethodAccessor84.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:265)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
   at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
   at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.service(BirtSoapMessageDispatcherServlet.java:122)
   at org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.service(ServletManager.java:180)
   at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
   at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
   at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:60)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
   at org.eclipse.equinox.http.jetty.internal.HttpServerManager$InternalHttpServiceServlet.service(HttpServerManager.java:386)
   at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:669)
   at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:457)
   at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:229)
   at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)
   at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)
   at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
   at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)
   at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
   at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
   at org.eclipse.jetty.server.Server.handle(Server.java:368)
   at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
   at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:953)
   at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1014)
   at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:861)
   at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
   at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
   at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628)
   at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
   at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
   at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
   at java.lang.Thread.run(Unknown Source)
Caused by: org.eclipse.birt.data.engine.core.DataException: Fail to execute script in function __bm_OPEN(). Source:
------
" + outlets = reportContext.getPersistentGlobalVariable("outlets");

currentRow = 0;
totalRows = outlets.length; + "
-----
A BIRT exception occurred. See next exception for more information.
TypeError: Cannot read property "length" from null (/report/data-sets/script-data-set[@id="3289"]/method[@name="open"]#4)
   at org.eclipse.birt.data.engine.script.JSMethodRunner.runScript(JSMethodRunner.java:147)
   at org.eclipse.birt.report.engine.script.internal.DtEScriptExecutor.handleJS(DtEScriptExecutor.java:90)
... 84 more
Caused by: org.eclipse.birt.data.engine.core.DataException: A BIRT exception occurred. See next exception for more information.
TypeError: Cannot read property "length" from null (/report/data-sets/script-data-set[@id="3289"]/method[@name="open"]#4)
   at org.eclipse.birt.data.engine.core.DataException.wrap(DataException.java:123)
   at org.eclipse.birt.data.engine.script.ScriptEvalUtil.evaluateJSAsExpr(ScriptEvalUtil.java:997)
   at org.eclipse.birt.data.engine.script.JSMethodRunner.runScript(JSMethodRunner.java:138)
... 85 more
Caused by: org.eclipse.birt.core.exception.CoreException: TypeError: Cannot read property "length" from null (/report/data-sets/script-data-set[@id="3289"]/method[@name="open"]#4)
   at org.eclipse.birt.core.script.JavascriptEvalUtil.wrapRhinoException(JavascriptEvalUtil.java:307)
   at org.eclipse.birt.core.script.JavascriptEvalUtil.evaluateRawScript(JavascriptEvalUtil.java:106)
   at org.eclipse.birt.core.script.JavascriptEvalUtil.evaluateScript(JavascriptEvalUtil.java:138)
   at org.eclipse.birt.data.engine.script.ScriptEvalUtil.evaluateJSAsExpr(ScriptEvalUtil.java:993)
... 86 more
Caused by: org.mozilla.javascript.EcmaError: TypeError: Cannot read property "length" from null (/report/data-sets/script-data-set[@id="3289"]/method[@name="open"]#4)
   at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3654)
   at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3632)
   at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3660)
   at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3679)
   at org.mozilla.javascript.ScriptRuntime.undefReadError(ScriptRuntime.java:3692)
   at org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1421)
   at org.mozilla.javascript.gen.c2977._c1(/report/data-sets/script-data-set[@id="3289"]/method[@name="open"]:4)
   at org.mozilla.javascript.gen.c2977.call(/report/data-sets/script-data-set[@id="3289"]/method[@name="open"])
   at org.mozilla.javascript.optimizer.OptRuntime.callName0(OptRuntime.java:108)
   at org.mozilla.javascript.gen.c2974._c0(/report/data-sets/script-data-set[@id="3290"]/method[@name="open"]:0)
   at org.mozilla.javascript.gen.c2974.call(/report/data-sets/script-data-set[@id="3290"]/method[@name="open"])
   at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:398)
   at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3065)
   at org.mozilla.javascript.gen.c2974.call(/report/data-sets/script-data-set[@id="3290"]/method[@name="open"])
   at org.mozilla.javascript.gen.c2974.exec(/report/data-sets/script-data-set[@id="3290"]/method[@name="open"])
   at org.eclipse.birt.core.script.JavascriptEvalUtil.evaluateRawScript(JavascriptEvalUtil.java:99)
... 88 more
org.eclipse.birt.report.engine.api.EngineException: There are errors evaluating script "if(currentRow < totalRows)
{
row["Outlet Name"] = outlets[currentRow];
row["Last Week ASPD"] = reportContext.getPersistentGlobalVariable(row["Outlet Name"] + "Last Week");
row["This Week ASPD"] = reportContext.getPersistentGlobalVariable(row["Outlet Name"] + "This Week");
row["Zone Name"] = reportContext.getPersistentGlobalVariable(row["Outlet Name"]);
row["Variance"] = (row["This Week ASPD"] / row["Last Week ASPD"])* 100;

if(reportContext.getPersistentGlobalVariable(row["Zone Name"]) == null)
{
if(row["Variance"] > 0)
{
temp = new Array(1,0);
}
else
{
temp = new Array(0,1);
}
}
else
{
temp = reportContext.getPersistentGlobalVariable(row["Zone Name"])
if(row["Variance"] > 0)
{
temp[0]++;
}
else
{
temp[1]++;
}
}
reportContext.setPersistentGlobalVariable(row["Zone Name"],temp);

currentRow++;
return(true);
}
return(false);":
Fail to execute script in function __bm_FETCH(). Source:
------
" + if(currentRow < totalRows)
{
row["Outlet Name"] = outlets[currentRow];
row["Last Week ASPD"] = reportContext.getPersistentGlobalVariable(row["Outlet Name"] + "Last Week");
row["This Week ASPD"] = reportContext.getPersistentGlobalVariable(row["Outlet Name"] + "This Week");
row["Zone Name"] = reportContext.getPersistentGlobalVariable(row["Outlet Name"]);
row["Variance"] = (row["This Week ASPD"] / row["Last Week ASPD"])* 100;

if(reportContext.getPersistentGlobalVariable(row["Zone Name"]) == null)
{
if(row["Variance"] > 0)
{
temp = new Array(1,0);
}
else
{
temp = new Array(0,1);
}
}
else
{
temp = reportContext.getPersistentGlobalVariable(row["Zone Name"])
if(row["Variance"] > 0)
{
temp[0]++;
}
else
{
temp[1]++;
}
}
reportContext.setPersistentGlobalVariable(row["Zone Name"],temp);

currentRow++;
return(true);
}
return(false); + "
-----

Re: how to create datewise table? [message #1116174 is a reply to message #1114990] Wed, 25 September 2013 04:03 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

The csv likely has nothing to do with it. The issue is that a field where we're checking its "length" has null values in it. You'll either need to filter out the rows with null values or modify the code to check for null values and assign a length of 0 to the variable, or something.

Michael

Developer Evangelist, Silanis
Re: how to create datewise table? [message #1129250 is a reply to message #1116174] Tue, 08 October 2013 12:54 Go to previous messageGo to next message
4040 4040 is currently offline 4040 4040Friend
Messages: 78
Registered: February 2013
Member
sry to open this topic again ..if i fill value in array it will fill all Zero value.....in top table..its not bothered below table to count and increment.and how to give hyperlink to each column to drill down...the value..i know am only doing a mistake..but am not well in script...so kindly go through it report..just correct and provide solution for this...report....(csv is in top of thread..)
and then VARIANCE calculation is like below but its not assigning a correct value...in the column i dono where i done mistake......just correct that too..
percentage difference 
 row["This Week ASPD"] = 867900 and row["This Week ASPD"] = 411381 

( | row["This Week ASPD"] - row["This Week ASPD"] | / ((row["This Week ASPD"] + row["This Week ASPD"])/2) ) * 100 

= ( | 867900 - 411381 | / ((867900 + 411381)/2) ) * 100 
= ( | 456519 | / (1279281/2) ) * 100 
= ( 456519 / 639640.5 ) * 100 
= 0.713712 * 100 
= 71.3712% difference

[Updated on: Tue, 15 October 2013 04:25]

Report message to a moderator

Re: how to create datewise table? [message #1138385 is a reply to message #1129250] Tue, 15 October 2013 04:23 Go to previous messageGo to next message
4040 4040 is currently offline 4040 4040Friend
Messages: 78
Registered: February 2013
Member
Hi..can some body help out this problem....

thank u in advance..
Re: how to create datewise table? [message #1148610 is a reply to message #1138385] Mon, 21 October 2013 16:30 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

I know Kris had started working on this with you over on BIRT Exchange when I wasn't able to get back to you. Were you able to solve this?

Michael

Developer Evangelist, Silanis
Re: how to create datewise table? [message #1149434 is a reply to message #1148610] Tue, 22 October 2013 05:03 Go to previous messageGo to next message
4040 4040 is currently offline 4040 4040Friend
Messages: 78
Registered: February 2013
Member
thank for u r reply....Mr.GLO_FR has solve the Report ......the one thing is to filter by drill down...(i.e).in the upper table the value are shown like this means


Count of Cafes   0-5%   6-10%     11-15%      16-25%       26-50%       >50%   Cafes
EAST              23    25         21          21           30           6       137
NORTH             49    36         19          26          19            8       184
SOUTH             41    32         19           26          17           5       157
WEST              57    32         17           25          12           8      164


so now if i click of any link for instance 23 so in below table have to show how many value are present in 23 ..like wise it go for all

if u look at this thread u will understand here it navigate to particular value ...but for me to drill down by hyperlink
http://www.birt-exchange.org/forum/index.php?/topic/30392-filter-table-by-scripted-data-set/

[Updated on: Tue, 22 October 2013 07:21]

Report message to a moderator

Re: how to create datewise table? [message #1171351 is a reply to message #1149434] Tue, 05 November 2013 07:06 Go to previous message
4040 4040 is currently offline 4040 4040Friend
Messages: 78
Registered: February 2013
Member
kindly reply for the post............
Previous Topic:can't create PDF output
Next Topic:Concatenating strings with Aggregation Builder issue/question
Goto Forum:
  


Current Time: Fri Apr 19 21:59:41 GMT 2024

Powered by FUDForum. Page generated in 0.05052 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top