Please help - Kinda lost [message #255474] |
Fri, 14 September 2007 10:26  |
Eclipse User |
|
|
|
Originally posted by: sheldon.oreilly.gmail.com
Hi All.
I really need some help please. I am looking into Birt 2.2 for a project
we are doing at my company.
The scenario is that
1) our client would use Eclipse to design reports.
2) the reports designs (.rptdesign) would be deployed to the webserver.
3) then through the our web interface (think J2EE mapping web app) the
reports can be accessed by the user.
But the kicker is: While the query is known at design time (Oracle DB
BTW), such as SELECT * FROM SCHOOLS;
The actual values (WHERE Clause) would not be known till run-time. E.g.
The user selects from the map six schools in an area and then wishes to
produce the report based only on the six selected schools.
A Report (UI) parameter will not suffice - the user should not have to
enter the school names explicitly.
My attempts so far is this:
Use the Birt viewer and simply use a ? parameter in the design query and
then pass the runtime values in through the URL - But i cant figure out
how to make the report interpret this:
SELECT * FROM SCHOOLS WHERE SCHOOLNAME = ?
as
SELECT * FROM SCHOOLS WHERE SCHOOLNAME = inParamA AND inParamB AND
inParamC ...
Plus this approach seems less the ideal do to url lenght limitations.
Another way was I figured was to use Engine API in a servlet to get the
query string from the design and then alter it and set it back. But i
dont really see anything like this in the API or the oodles of web
searching that I've done.
Can someone please advise me. What may the best approach (above or other)
and some clue on how to implement it/
Scripting, java code, etc is a viable solution for me, only requirement I
have is that the client needs to be able to easily use the Eclipse
designer to create the reports(no scripting) on their end.
Thanks
Sheldon
|
|
|
Re: Please help - Kinda lost [message #255486 is a reply to message #255474] |
Fri, 14 September 2007 11:27  |
Eclipse User |
|
|
|
Originally posted by: jasonweathersby.alltel.net
Sheldon,
You can do this using the beforeOpen script on the dataset like.
this.queryText = this.queryText + " mywhereclause" ; or if in a parameter
this.queryText = this.queryText + " " + prams["mywhereclause"];
You can use a standard string parameter or multiple parameters. Another
option to look at is is use the Tag libraries to build your own
parameter page.
Jason
Sheldon wrote:
> Hi All.
>
> I really need some help please. I am looking into Birt 2.2 for a
> project we are doing at my company.
> The scenario is that
> 1) our client would use Eclipse to design reports.
>
> 2) the reports designs (.rptdesign) would be deployed to the webserver.
> 3) then through the our web interface (think J2EE mapping web app) the
> reports can be accessed by the user.
>
> But the kicker is: While the query is known at design time (Oracle DB
> BTW), such as SELECT * FROM SCHOOLS;
>
> The actual values (WHERE Clause) would not be known till run-time.
> E.g. The user selects from the map six schools in an area and then
> wishes to produce the report based only on the six selected schools.
>
>
> A Report (UI) parameter will not suffice - the user should not have to
> enter the school names explicitly.
>
>
>
> My attempts so far is this:
>
> Use the Birt viewer and simply use a ? parameter in the design query and
> then pass the runtime values in through the URL - But i cant figure out
> how to make the report interpret this:
> SELECT * FROM SCHOOLS WHERE SCHOOLNAME = ?
> as
>
> SELECT * FROM SCHOOLS WHERE SCHOOLNAME = inParamA AND inParamB AND
> inParamC ...
>
> Plus this approach seems less the ideal do to url lenght limitations.
>
>
>
> Another way was I figured was to use Engine API in a servlet to get the
> query string from the design and then alter it and set it back. But i
> dont really see anything like this in the API or the oodles of web
> searching that I've done.
>
> Can someone please advise me. What may the best approach (above or
> other) and some clue on how to implement it/
>
> Scripting, java code, etc is a viable solution for me, only requirement
> I have is that the client needs to be able to easily use the Eclipse
> designer to create the reports(no scripting) on their end.
>
>
> Thanks
> Sheldon
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.10196 seconds