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 REPORT DESIGNER in RUN TIME
sandeep_sn
Hi,
Is there any possible to put the query in the report from the application side in run time from the end user and save the report with that query.
So if the report is read from other application, the query should be retrieved from the report template.
In short the query should be saved in the template given by the end user in run time.
Please let me know as soon as possible.
Regards,
S.Sandeep
Find more posts tagged with
Comments
CBR
In general it is possible to pass in any query using report parameters and stuff like that.
The problem is:
How do you want to display the results? BIRT has to know the number of columns, their names and datatypes at design time because you create a table/ list or chart to present the data in the report. If the query you pass in has a different number of columns, different names, order or datatype. BIRT will execute the query but right after that it will fail with a error because it can't present the data in the static table designed before (because the returned column don't match the one defined in the table)
So:
If you can guarantee that the query you wan't to pass in has exactly the same number of columns, the same order and datatypes just overwrite the query text with a parameter you get from the enduser of the report at runtime. If you can't guarantee that it's much more complicate but not impossible because you can create a table that matches your query at runtime. There are already some good tutorials on how to create a table at runtime in a report (but it's not a easy thing to do)
sandeep_sn
<blockquote class='ipsBlockquote' data-author="'cbrell'" data-cid="83454" data-time="1317219295" data-date="28 September 2011 - 07:14 AM"><p>
In general it is possible to pass in any query using report parameters and stuff like that.<br />
<br />
The problem is:<br />
How do you want to display the results? BIRT has to know the number of columns, their names and datatypes at design time because you create a table/ list or chart to present the data in the report. If the query you pass in has a different number of columns, different names, order or datatype. BIRT will execute the query but right after that it will fail with a error because it can't present the data in the static table designed before (because the returned column don't match the one defined in the table)<br />
<br />
So:<br />
If you can guarantee that the query you wan't to pass in has exactly the same number of columns, the same order and datatypes just overwrite the query text with a parameter you get from the enduser of the report at runtime. If you can't guarantee that it's much more complicate but not impossible because you can create a table that matches your query at runtime. There are already some good tutorials on how to create a table at runtime in a report (but it's not a easy thing to do)<br /></p></blockquote>
<br />
<br />
<br />
Hi,<br />
Thanks for the immediate response.<br />
Can you explain me how can we over rite the query which is saved in the database?
johnw
Yes, you can if you write an application to do it yourself with the Design Engine API, which is fully documented in the Dev Share section of the BIRT Exchange, and in the Documentation section, or if you purchase BIRT Report Studio. But I may be misunderstanding your question, can you explain in detail what you are asking?