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)
Optimization
Pujan
In my report I have to populate couple of dropdowns and in production we have too much data, so its taking significant time to show the parameter page and also when we navigate to the next page of the report.
How can I optimize to avoid the delay. Also does BIRT load the data in cache ? & when we navigate to the next page of the report ? does it call the query again or there is a caching mechanism.
Please help.
Find more posts tagged with
Comments
mwilliams
Hi Pujan,
So, you are using dynamic parameters? Also, when you say the next page of the report, are you talking about after you already ran the report and you click on next page in the viewer?
Pujan
Hello Michael,
Yes I am using dynamic parameters.
And next page on the report = report is generated and when I go to next page in the viewer of the report.
Is it possible that initially I load 100 records and then having like - "More" on the parameter page and when the user clicks on "More" - then more data gets populated.
I am not sure but have to get soln to this issue since its significant delay.
Thanks
Pujan
mwilliams
Pujan,<br />
<br />
As far as I know, the query should not be running again each time you click "next page".<br />
<br />
For performance, you can check out this presentation on building high performance BIRT reports and see if there's anything in it that helps you speed up your performance.<br />
<br />
<a class='bbc_url' href='
http://www.birt-exchange.org/devshare/designing-birt-reports/371-designing-high-performance-birt-reports/#description'>Designing
High Performance BIRT Reports - Other Resources - BIRT Exchange</a>
Pujan
I checked the link - but it doesn't have any information that can help speed up the process.
problem is not when the report runs - but when the parameter screen shows. I have to around 5-6 dropdowns. All have around 10-20 results except 1 having 26000 records. And when loading this many records in drop-down its taking too much time.
So is there a way to populate the results in dropdown on-demand. Like initially I load 1000 records, then when the user clicks "More" - next 1000 are loaded.
Is it possible to imlement this kind of functionality and how ?
Please help asap - since I have deployed the report on production and need to address this issue immediately.
Pujan
Currently I am using cascading parameter. (First the list of primary clients is loaded and then based on the selection of a primary client ? all its household members are loaded). The primary client list is very long around 26000 records. So the best way I think as of now would be instead of loading entire list ? make the parameter display type as Combo ? this way I?ll have a drop-down( has only 1 value ? Select all) and another is textbox ? where they type the client name and based on the name I get the associated code of the client ( I have to pass this code to the household query ? so the list of household members gets populated of this client).
For this I have to set the code as a value of a Primary Client Parameter( or any other hidden parameter) and pass to the household query. The issue is how to set this parameter value. In which event should I do. I tried in after open? but it didn?t work.
So can anyone please help me on this.
Pujan
Another soln I thought -
I have created a subquery ? as a simplest way to get the data in 2nd dataset based on user input. I have written this in HouseholdDataSet ? before Open Event.
In this besides the value of 1st parameter, I am trying to get the value of Location (ChooseLocation - which is a multivalue parameter), but no matter what I select, I am getting only the default value (%). Also, the data is not getting refreshed (eg: All the data is depending on the AgnCd, so if I change the agnCd, then the data in drop-downs should change) ? but for some reason it?s not taking the recent value of the report parameter - agnCd.
All these was working in 2.3.1 version, but after updating to 2.3.2, it not working anymore. I am not sure if something else wrong with my code/report, or it?s the updated version.
Anything has changed related to this functionality in new version OR this is a bug and if there is any patch to fix this issue ?.
I am attaching the report for your reference.
Can you please help.
mwilliams
Pujan,
Not sure if this will help, but try using this call for the parameter value:
agencyCode = params["AgnCd"].value;
instead of this call:
agencyCode = reportContext.getParameterValue("AgnCd");
I think I may have seen an issue with using the reportContext way before, but it's been long enough now that I'm not sure if that was the issue. Let me know if that helps.
Pujan
Still the same issue - even if I use param["AgnCd"].value
mwilliams
Pujan,
If you can recreate this issue with the sample, classic models database, I would be able to run the report and test to try to help figure out the issue. Thanks.
Pujan
Hello Michael,
Is it possible to do web meeting ?
Also, the problem of getting data is only with multivalue parameter (Location). I am getting the right data back for single value (AgencyCode and primaryClient).
Thanks
Pujan
Pujan
I remove the query from beforeopen and just tried to print the values from the multi-value param, but still its giving me the default value only.
Could it be some kind of cache. problem
mwilliams
Pujan,
It could be. Have you tried running this deployed in your application yet? Or just in the designer?
mwilliams
Pujan,<br />
<br />
I do see something in your script that may cause you problems once the parameter issue is figured out.<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
else{
locCodeQuote = "'" + locCode + "'";
this.queryText += " and loc_cd IN (" + locCodeQuote;
if ( i != locCodeLength -1 ) {
this.queryText += ",";
}
this.queryText += " ) ) order by sort_key";
}
</pre>
<br />
Every step through the parameter array will add "and loc_cd IN (" to your query. You should move that outside the 'for' statement into it's own 'if' statement. The "order by sort_key" part would also be repeated. You may want to move this outside the loop and take that out of the if '%' part of this if/else statement as well.
Pujan
Hello Michael,
I make the changes in the query.
I have recreated the issue with Sample DB. Please find attached the rpt file.
Hope to get a soln asap.
Thanks
Pujan
Pujan
Hello Michael,
There was an issue with the query - so please find the updated sample report. Please ignore the previous attachement
Thanks
Pujan
mwilliams
Pujan,
Run this and look at the log.
mwilliams
Pujan,<br />
<br />
Since your issue is only with the parameter page now, you might be able to solve your issue by creating your own custom parameter page. Take a look at this post from the devShare to help you get started.<br />
<br />
<a class='bbc_url' href='
http://www.birt-exchange.org/devshare/deploying-birt-reports/298-2-2-birt-tag-library/#description'>2.2
BIRT Tag Library - Tips & Tricks - BIRT Exchange</a>