Home » Archived » BIRT » List parameters (multiple selection)?
List parameters (multiple selection)? [message #127002] |
Thu, 09 February 2006 07:49  |
Eclipse User |
|
|
|
Originally posted by: kzed.hactar.net
Hi,
our client requested a couple dozen kinds of report types for the
business database, and we want to use BIRT for the reporting.
My problem is that most of these requests specify report paremeters
like "a selection of products" or "specified retailers"; that is,
parameters that would result in a list, not a single value. Based on the
current documentation and my googling, BIRT doesn't seem to be able to
do this right now.
At the moment, our options look like:
0. Hack: add 10 (N) parameters, each referencing the same data set.
Customer would select as much as he wants and leave the rest blank.
(Ouch.)
1. Create a frontend page for the reports, that would pass on the
resulting list in the URL. Pro: simple and lets the customer select as
many items as he wants. Con: doesn't integrate with the report viewer
UI, nor the designer.
2. Extend BIRT. Pro: would be elegant. Con: looks like entirely too
much nasty, messy work.
Any opinions or suggestions?
Thanks,
Mate Nagy
A-V
|
|
|
Re: List parameters (multiple selection)? [message #144705 is a reply to message #127002] |
Thu, 16 March 2006 15:15   |
Eclipse User |
|
|
|
Originally posted by: twindham.ugaais.com
Mate,
I don't know if this will help, but it sounds like we have similar problems,
and here's what I did.
It's a total hack, but it was suggested to me by Jason Weathersby:
this.queryText = "SELECT " +
"Agent_Entity_ID, " +
"Agent_First_Name, " +
"Agent_Last_Name, " +
"State_ID, " +
"Company_ID, " +
"Agency_Name, " +
" FROM vwScoreSummary " +
" WHERE Company_ID = 1 ";
if(params["agentID"] != null) {
this.queryText += " AND dbo.vwScoreSummary.Agent_Entity_ID IN (" +
params["agentID"] + ")";
}
if(params["stateID"] != null) {
this.queryText += " AND dbo.vwScoreSummary.State_ID IN (" +
params["stateID"] + ")";
}
The report has to have report parameters defined "agentID" and "stateID" and
both parameters have the property "Allow null vlaue" checked. So, now you
can pass 0 or more parameters in the url like in the following examples:
http://localhost:8080/birt/frameset?__report=reportName.rptd esign&agentID='0000025046','0000345234'&stateID='17','3'
http://localhost:8080/birt/frameset?__report=reportName.rptd esign&agentID='0000025046','0000345234'
http://localhost:8080/birt/frameset?__report=reportName.rptd esign&stateID='17','3'
Good luck,
Trace Windham
"Mate Nagy" <kzed@hactar.net> wrote in message
news:dsfdog$36q$1@utils.eclipse.org...
> Hi,
> our client requested a couple dozen kinds of report types for the
> business database, and we want to use BIRT for the reporting.
> My problem is that most of these requests specify report paremeters
> like "a selection of products" or "specified retailers"; that is,
> parameters that would result in a list, not a single value. Based on the
> current documentation and my googling, BIRT doesn't seem to be able to
> do this right now.
> At the moment, our options look like:
>
> 0. Hack: add 10 (N) parameters, each referencing the same data set.
> Customer would select as much as he wants and leave the rest blank.
> (Ouch.)
> 1. Create a frontend page for the reports, that would pass on the
> resulting list in the URL. Pro: simple and lets the customer select as
> many items as he wants. Con: doesn't integrate with the report viewer
> UI, nor the designer.
> 2. Extend BIRT. Pro: would be elegant. Con: looks like entirely too
> much nasty, messy work.
>
> Any opinions or suggestions?
>
> Thanks,
> Mate Nagy
> A-V
|
|
|
Re: List parameters (multiple selection)? [message #146033 is a reply to message #144705] |
Mon, 20 March 2006 11:30  |
Eclipse User |
|
|
|
Originally posted by: twindham.ugaais.com
Sorry about the poor description on my last post.
That section of code that starts with
"this.queryText=..."
belongs in the script section of the report on the beforeOpen method that
shows up when the DataSet is selected in the Outline view in Eclipse.
Hope that helps,
Trace
"Trace Windham" <twindham@ugaais.com> wrote in message
news:dvch5h$bg6$1@utils.eclipse.org...
> Mate,
>
> I don't know if this will help, but it sounds like we have similar
> problems, and here's what I did.
>
> It's a total hack, but it was suggested to me by Jason Weathersby:
>
> this.queryText = "SELECT " +
> "Agent_Entity_ID, " +
> "Agent_First_Name, " +
> "Agent_Last_Name, " +
> "State_ID, " +
> "Company_ID, " +
> "Agency_Name, " +
> " FROM vwScoreSummary " +
> " WHERE Company_ID = 1 ";
>
> if(params["agentID"] != null) {
> this.queryText += " AND dbo.vwScoreSummary.Agent_Entity_ID IN (" +
> params["agentID"] + ")";
> }
>
> if(params["stateID"] != null) {
> this.queryText += " AND dbo.vwScoreSummary.State_ID IN (" +
> params["stateID"] + ")";
> }
>
> The report has to have report parameters defined "agentID" and "stateID"
> and both parameters have the property "Allow null vlaue" checked. So, now
> you can pass 0 or more parameters in the url like in the following
> examples:
>
> http://localhost:8080/birt/frameset?__report=reportName.rptd esign&agentID='0000025046','0000345234'&stateID='17','3'
>
> http://localhost:8080/birt/frameset?__report=reportName.rptd esign&agentID='0000025046','0000345234'
>
> http://localhost:8080/birt/frameset?__report=reportName.rptd esign&stateID='17','3'
>
> Good luck,
> Trace Windham
>
> "Mate Nagy" <kzed@hactar.net> wrote in message
> news:dsfdog$36q$1@utils.eclipse.org...
>> Hi,
>> our client requested a couple dozen kinds of report types for the
>> business database, and we want to use BIRT for the reporting.
>> My problem is that most of these requests specify report paremeters
>> like "a selection of products" or "specified retailers"; that is,
>> parameters that would result in a list, not a single value. Based on the
>> current documentation and my googling, BIRT doesn't seem to be able to
>> do this right now.
>> At the moment, our options look like:
>>
>> 0. Hack: add 10 (N) parameters, each referencing the same data set.
>> Customer would select as much as he wants and leave the rest blank.
>> (Ouch.)
>> 1. Create a frontend page for the reports, that would pass on the
>> resulting list in the URL. Pro: simple and lets the customer select as
>> many items as he wants. Con: doesn't integrate with the report viewer
>> UI, nor the designer.
>> 2. Extend BIRT. Pro: would be elegant. Con: looks like entirely too
>> much nasty, messy work.
>>
>> Any opinions or suggestions?
>>
>> Thanks,
>> Mate Nagy
>> A-V
>
>
|
|
|
Goto Forum:
Current Time: Wed Apr 30 18:24:32 EDT 2025
Powered by FUDForum. Page generated in 0.05629 seconds
|