Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Scripted dataset showing empty tables - question
ssen
I am facing the following situation with the scripted data set. I downloaded the ScriptedDataSource example (with the SimpleClass) and it works fine.
Then I created a new table, associated the default data set (Favourite) to it, added a data and mapped it to a column and then could successfully preview the content of the new table.
Then I created another data set and added the following in the fetch handler for testing:
--
var cust = new java.lang.String("foo");
row["foo"] = cust;
return false;
---
Here the data set has one output column - foo - and has no parameters and any other stuff.
When I attach this data set to the new table, the content of the table is blank.
I have run into this issue with another report and am trying to isolate the cause. I read in another post that datasets with empty columns cause this 'empty report' issue. In this case I am initializing the column value and still get the same behavior.
What am I missing here?
Thanks for any info.
Shantanu
Find more posts tagged with
Comments
bholenath
Shantanu,
What version of BIRT you are using ? Also try placing your .class files in the directory "org.eclipse.birt.report.viewer_<version>birtWEB-INFclasses"
The java classes used by Scripted DS must be deployed under this directory. You can find this directory under your eclipseplugins.
Hope this helps.
Cheers,
Amit
ssen
<blockquote class='ipsBlockquote' data-author="bholenath"><p>Shantanu,<br />
What version of BIRT you are using ? Also try placing your .class files in the directory "org.eclipse.birt.report.viewer_<version>birtWEB-INFclasses"<br />
The java classes used by Scripted DS must be deployed under this directory. You can find this directory under your eclipseplugins.<br />
<br />
Hope this helps.<br />
<br />
Cheers,<br />
Amit</p></blockquote>
<br />
I am using Birt 2.3.1. Actually, here I am not using any custom java classes at all - I am just trying to populate the rows in the fetch event using a String and testing to see if the data is populated in the table. <br />
<br />
In this case, the table is blank - no data row is seen when I do the preview.<br />
<br />
Thanks,<br />
Shantanu
ssen
I found that if I set a counter that ensures that the fetch handler is executed twice, then it works e.g. I set a variable count = 0 in the open handler and set the following in the
fetch handler.
var cust = new java.lang.String("HELLO");
row["foo"] = cust;
++count;
if (count < 2) return true;
else
return false;
In this case the row is correctly initialized and it shows the
table content - most likely the init is happening the
second time this is invoked.
Is this the expected behavior?
Does not look very clean to me.
Or do I have to do the row["foo"] initialization in a
different handler to ensure that it works without using this
counter?
Thanks for any info.