Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Fill one or more fields to build report
vintech
Hi,
I am new to BIRT report development. This is what I am trying to do:
- When the report is run, I want to prompt the user with 3 fields to input data (Field 1, Field 2 and Field 3).
- The user can input data in any one or multiple fields (and build the report) Example:
* Input data in Field 2 and build report OR
* Input data in Field 1 and Field 3 and build report OR
* Input data in all three fields and build report
.
.
.
Can anyone please tell me if this can be done in BIRT. If yes, can you please guide me in the right direction.
Thanks
Find more posts tagged with
Comments
mwilliams
Hi vintech,
Can you explain a little more so I'm sure I understand? Thanks.
vintech
Hi Michael,
I have created a report where the user is required to input values ("where clause") in three fields ;Customer Name, Service, Start-date. Right now the only why I can generate a report is when all these three fields are specified by the user (meaning all three are mandatory).
So I get a report with a bunch of data where Customer-name=A and Service=Gold and start-date= 12/12/07.
The query here is (in simple terms):
select phone,contact,a ,b,c where Customer-name=A and Service=Gold and start-date= 12/12/07
Often times, the user just wants to specify one field say service and leave the other fields blank and generate a report. So it will be a report with a bunch of data where Service=silver (the other two fields should be ignored).
The query here is (again in simple terms):
select phone,contact,a,b,c where service=silver
Please let me know if you need more details.
bhanley
To produce the most efficient query possible under these circumstances, you could examine each parameter in the beforeOpen script on the Data Set. This will allow you to evaluate which parameters do and do not have values assigned. Based on that information, you can build a WHERE clause to exactly suit your needs.<br />
<br />
This post discusses modifying a query at run-time based on parameter values: <br />
<a class='bbc_url' href='
http://www.birt-exchange.com/forum/designing-birt-reports/13580-birt-scripted-query-question.html#post42438'>http://www.birt-exchange.com/forum/designing-birt-reports/13580-birt-scripted-query-question.html#post42438</a>
;