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)
BIRT hidden text fields from Database
Apeksha
<p>I have a parameter on the page, for which I need to fetch the value from database and which is only for display purposes. The only way I could see BIRT fetch data from database was a dataset, but for that it has to be a list box. This is a text field. I can do it in a not so nice way, by having the value populated by a list box as hidden and then using the same to populate the text box. But was just wondering is there a better way to do it.</p>
Find more posts tagged with
Comments
Matthew L.
<p>The parameter on the page, is that a Report Parameter or an input field from within a report design (do you have an example report you could post)?</p>
<p> </p>
<p>Also, depending on what the "parameter on the page" is, the "not so nice way" you mentioned might not be as bad of a solution.</p>
<p>If it's a Report Parameter, I have a suggestion based on using the API to query the Data Set and populate the Text Box: <a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/topic/35930-running-a-query-in-the-initalize/?p=133369'>(Topic_35930)_OS_BIRT_2.6.2_QueryDataFromAlmostAnywhere.rptdesign</a></p>
;
<p> </p>
<p>However if it's an input field on the report, you could bind the element to the Data Set and filter the binding to get the value you are looking for.</p>
Apeksha
<p>hello Mathew, Thanks for your reply. Basically this parameter is not an input parameter. Basically the situation is as below : The BIRT reports run on a few tables which are refreshed from production database every 30 mins. So I need to show the last refresh time on the report input screen. It is a field just for display purposes, but the value can be fetched only from the database.</p>
Matthew L.
<p>If you are pulling a value from the database, and you are only interested in the last value from the column.</p>
<p>You could create a Computed Column in the Data Set, set the aggregation to LAST, and set the expression to the refresh time column.</p>
<p>This way the computed column always has the last refresh time in it, then just place a data element in the report mapped to the computed column of the data set.</p>
<p> </p>
<p>This should give you the last refresh time every time you run the report.</p>