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)
Computed column on scripted data set?
EricB
I think it would be very useful to have Computed Columns on a Scripted Data Set. Does anyone know if this enhancement is already in the works?
Right now, the only way I see to accomplish it is with a Joint Data Set where the Data Set joins to itself. From there, the computed column can be added to the Joint Data Set.
Thanks,
Eric
Find more posts tagged with
Comments
johnw
All columns in a Scripted Data Set are computed columns. The only difference is you are assigning the value in the Fetch event instead of in an expression. You can accomplish the same thing by using a new Data Binding at the Table level as well.
EricB
<blockquote class='ipsBlockquote' data-author="'johnw'" data-cid="96919" data-time="1330443159" data-date="28 February 2012 - 08:32 AM"><p>
All columns in a Scripted Data Set are computed columns. The only difference is you are assigning the value in the Fetch event instead of in an expression. You can accomplish the same thing by using a new Data Binding at the Table level as well.<br /></p></blockquote>
Hi johnw,<br />
<br />
Thanks for the response. Here are a few additional details about the scenario I'm working with: <br />
<br />
Regarding the Scripted Data Set being all computed columns: that may be so, but in terms of the report-design experience, it's cumbersome for us to look at it that way. In our use of BIRT, we implement the Scripted Data Source with Java, not script. The Java-implemented Data Set is provided to the report-builder and they use that Data Set to build reports. In this scenario, the report-builder is unable to modify the Java that's backing the Data Set. This is where it would be nice to let the report-builder "extend" the Scripted Data Set with a "Computed Column" which can be implemented with an expression, much in the way a JDBC Data Set can be extended by just add a Computed Column, implemented by an expression.<br />
<br />
Regarding the table-level comment: I wanted to use a table-level binding and that would have been a fine alternative except that I can't use it to source a dynamic Report Parameter list. That's what I was trying to do when I ran in to this. As far as I can tell, a dynamic Report Parameter list can only be sourced from a Data Set.<br />
<br />
Thanks,<br />
<br />
Eric
johnw
I would submit this as an Enhancement Request in the BIRT Bugzilla
http://www.eclipse.org/birt/phoenix/reportabug.php
. Its sounds like a reasonable Enhancements and you have a good use case to support it.
EricB
<blockquote class='ipsBlockquote' data-author="'johnw'" data-cid="96944" data-time="1330455439" data-date="28 February 2012 - 11:57 AM"><p>
I would submit this as an Enhancement Request in the BIRT Bugzilla <a class='bbc_url' href='
http://www.eclipse.org/birt/phoenix/reportabug.php.'>http://www.eclipse.org/birt/phoenix/reportabug.php.</a>
; Its sounds like a reasonable Enhancements and you have a good use case to support it.<br /></p></blockquote>
Thanks johnw! I've created enhancement request 372793: <a class='bbc_url' href='
https://bugs.eclipse.org/bugs/show_bug.cgi?id=372793'>https://bugs.eclipse.org/bugs/show_bug.cgi?id=372793</a>
;
prasad.kamble
<p>Hii,</p>
<p> Can anyone tell me how to pass database url through parameters of datasource .</p>
<p> Please give your opinions..</p>
pricher
<p>Hi,</p>
<p> </p>
<p>In the Data Source editor dialog box, click on Property Binding in the list on the left side. Edit the JDBC Driver URL property binding by adding the following script:</p>
<p> </p>
<p><span style="font-family:'courier new', courier, monospace;">params["pURL"].value</span></p>
<p> </p>
<p>where pURL is a string parameter that contains the URL value.</p>
<p> </p>
<p>I have attached a sample that works with MySQL.</p>
<p> </p>
<p>Hope this helps,</p>
<p> </p>
<p>P.</p>