query execuring several times
Options
hello,
I have two datasets in my report. Both of them return one row. I use a grid and a Data widget for each column to display on the report. I noticed that database query is executed several times. I suspect that BIRT executes the query for each data column I have on the grid. How do I make BIRT execute these queries only once and then fill all the Data elements?
Thanks
I have two datasets in my report. Both of them return one row. I use a grid and a Data widget for each column to display on the report. I noticed that database query is executed several times. I suspect that BIRT executes the query for each data column I have on the grid. How do I make BIRT execute these queries only once and then fill all the Data elements?
Thanks
0
Comments
-
Hi lektuvas,
Instead of using a grid, you can use a table. Basically, a grid has no binding to the data, so each element has to do the binding. Each time that happens, the query is run. To get around this, use a table control and bind it to the dataset. Then make sure each control is set to binding of None. This will only run the query once.Warning No formatter is installed for the format ipb0 -
Thanks for the reply.
I thought about using the table instead of a grid. But I have requirements on report design so that the single row returned by each query is not supposed to result in a row in table but all the fields of those two rows need to be scattered around the grid. I tried to achieve this by having a hidden table on the report and binding data fields to this table instead of the dataset but it seems that I can't bind a single field to the whole table.0 -
Hi lektuvas,
You could still hide the table if desired... and use the data item events to load global variables. I created a simple example that has a query with two rows of data... I then set a global variable for each element appending the row number to each to keep the two rows straight... I can then use these global variables anywhere in the grid that I like and the query is only executed once.Warning No formatter is installed for the format ipb0
Categories
- All Categories
- 109 Developer Announcements
- 49 Articles
- 100 General Questions
- 122 IM Services
- 40 OpenText Hackathon
- 31 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 897 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 122 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management