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)
Dataset execution through Event
crowt999
All
I have a dataset in my report that retrieves performance specific data related to a fund / benchmark. From that I am doing a simple chart that compares the returns of the fund to the benchmark.. Quite simple.
The problem I am trying to solve exists where I have > 1 benchmark for the fund. I need to change some parameters in my query, and retrieve the data again. This can be 1 or many times, so I would prefer not to have numerous hidden tables in my report just to retrieve data. This is not realistic anyway, as I might have a random number of retrieves to do.
My idea is the following: in the "initialize" or "beforeFactory" of the report, I get a handle to my dataSet, then "retrieve" it. Code in the onFetch puts the data into arrays Iv'e set up. Then, determine if there is an additional benchmark I need to retrieve for, and if so, change the parms in my query, and "retrieve" the same dataset again with new parms. (this would be adding the additional data needed to arrays)
Once this is complete, it is then quite easy to script a dataset that builds from the arrays... So the question is how can I trigger the retrieval of the dataSet through script alone ?
Does anyone out there know if this sounds feasible ??
Any/All help is greatly appreciated
Dean
Find more posts tagged with
Comments
johnw
You cant really execute a data set before it has been run. The only way to do that is to create a dynamic parameter populated by a dataset in your report, and use a parameter extraction task on the current report runnable to retrieve your dataset results. The drawback is that you can only get 1 column. But this gives you the advantage of being able to modify the report in the initialize or beforeFactory based on the results of that data. See this article on BIRTWorld: <a class='bbc_url' href='
http://birtworld.blogspot.com/2008/04/data-driven-reports.html'>http://birtworld.blogspot.com/2008/04/data-driven-reports.html</a><br
/>
<br />
You could also nest a table within a table, and your inner table has the data set parameter binding set to a value in the outer table. This would let you have that dynamic number of tables based on data, and is much simpler than the above method.<br />
<br />
John<br />
<br />
<blockquote class='ipsBlockquote' data-author="'crowt999'" data-cid="67230" data-time="1281473365" data-date="10 August 2010 - 01:49 PM"><p>
All<br />
<br />
I have a dataset in my report that retrieves performance specific data related to a fund / benchmark. From that I am doing a simple chart that compares the returns of the fund to the benchmark.. Quite simple.<br />
<br />
The problem I am trying to solve exists where I have > 1 benchmark for the fund. I need to change some parameters in my query, and retrieve the data again. This can be 1 or many times, so I would prefer not to have numerous hidden tables in my report just to retrieve data. This is not realistic anyway, as I might have a random number of retrieves to do.<br />
<br />
My idea is the following: in the "initialize" or "beforeFactory" of the report, I get a handle to my dataSet, then "retrieve" it. Code in the onFetch puts the data into arrays Iv'e set up. Then, determine if there is an additional benchmark I need to retrieve for, and if so, change the parms in my query, and "retrieve" the same dataset again with new parms. (this would be adding the additional data needed to arrays)<br />
<br />
Once this is complete, it is then quite easy to script a dataset that builds from the arrays... So the question is how can I trigger the retrieval of the dataSet through script alone ? <br />
<br />
Does anyone out there know if this sounds feasible ??<br />
<br />
Any/All help is greatly appreciated<br />
Dean<br /></p></blockquote>
crowt999
Thanks for the ideas John! I will check them out.. I like the nesting of the table idea....
crowt999
John,
It seems that the once the dataset is retrieved the first time in the nested table scenario, it does not get executed a second time. I am guessing this is because of effeciencies of this version (2.5.2) that the engine knows the dataset is retrieved, and does not do it a second time (then consequently 3rd, 4th etc)
Does anyone know how to force the retrieval/refresh of a dataset after the first time retrieved ?
Thanks
Dean