params["myParam"] not accessible from beforeOpen??? [message #90073] |
Fri, 11 November 2005 06:30  |
Eclipse User |
|
|
|
Hello,
I want to modify the SQL statement depending on what a user enters in the
report params.
I added following script in the beforeOpen event of the dataset:
queryText = "SELECT " + params["myParam"] + " from myTable";
so the user should be able to specify the columm of myTable he wants to see.
If I try to save this modifications, an error message pops up saying (see
attachment):
ReferenceError: "params" is not defined!
But IMHO the array params[] MUST be available from this event, because it is
a precondition to have all parameters ready BEFORE execution of the SQL
query, or not?
The same code works in the afterOpen event, but of course then the SQL query
was already executed and no more able to modify.
So how can I modify the SQL statement of a dataset considering report
params?
Thanks for any help!
|
|
|
|
|
|
Re: params["myParam"] not accessible from beforeOpen??? [message #94741 is a reply to message #90226] |
Mon, 28 November 2005 11:44  |
Eclipse User |
|
|
|
Originally posted by: stuart.roe.ovic.co.uk
I appear to be having a similar problem in the beforeDrawAxisTitle function.
'Data Explorer' | 'Report Parameters' is listing an entry for 'XAttribute'
and my function currently reads:
function beforeDrawAxisTitle(Axis, Title)
{
Title.getCaption().setValue(params["XAttribute"]);
}
but the error log has 'org.eclipse.birt.chart.exception.ChartException:
$NO-RB$ ReferenceError: "params" is not defined.' entries! Is this the
same problem?
BTW: It isn't changing the chart's x-axis title when executed outside of
the designer in the viewer applet.
"Jason Weathersby" <jweathersby@actuate.com> wrote in message
news:dl2hn4$2rj$1@news.eclipse.org...
> Mr. Burns,
>
> This is a known bug.
> 109522
> I experienced a similar problem. It would fail in the designer, but the
> report would still run.
>
> Jason Weathersby
> BIRT PMC
>
>
>
> "Mr. Burns" <Mr._Burns@web.de> wrote in message
> news:dl1vd8$utt$1@news.eclipse.org...
>> Hello,
>>
>> I want to modify the SQL statement depending on what a user enters in the
>> report params.
>> I added following script in the beforeOpen event of the dataset:
>>
>> queryText = "SELECT " + params["myParam"] + " from myTable";
>>
>> so the user should be able to specify the columm of myTable he wants to
>> see.
>>
>> If I try to save this modifications, an error message pops up saying (see
>> attachment):
>>
>> ReferenceError: "params" is not defined!
>>
>> But IMHO the array params[] MUST be available from this event, because it
>> is a precondition to have all parameters ready BEFORE execution of the
>> SQL query, or not?
>>
>> The same code works in the afterOpen event, but of course then the SQL
>> query was already executed and no more able to modify.
>>
>> So how can I modify the SQL statement of a dataset considering report
>> params?
>>
>> Thanks for any help!
>>
>>
>>
>>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.32506 seconds