Skip to main content



      Home
Home » Archived » BIRT » params["myParam"] not accessible from beforeOpen???
params["myParam"] not accessible from beforeOpen??? [message #90073] Fri, 11 November 2005 06:30 Go to next message
Eclipse UserFriend
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 #90091 is a reply to message #90073] Fri, 11 November 2005 06:46 Go to previous messageGo to next message
Eclipse UserFriend
;-)

forgot the attachment!


  • Attachment: error.jpg
    (Size: 37.61KB, Downloaded 107 times)
Re: params["myParam"] not accessible from beforeOpen??? [message #90121 is a reply to message #90091] Fri, 11 November 2005 09:20 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: akravets.kligerweiss.com

I get the same error when I use params array...

Mr. Burns wrote:
> ;-)
>
> forgot the attachment!
>
>
>
Re: params["myParam"] not accessible from beforeOpen??? [message #90226 is a reply to message #90073] Fri, 11 November 2005 11:43 Go to previous messageGo to next message
Eclipse UserFriend
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!
>
>
>
>
Re: params["myParam"] not accessible from beforeOpen??? [message #94741 is a reply to message #90226] Mon, 28 November 2005 11:44 Go to previous message
Eclipse UserFriend
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!
>>
>>
>>
>>
>
>
Previous Topic:Non-category axes in Line charts, or lines in Scatter charts
Next Topic:Changing the axis label of a bar graph
Goto Forum:
  


Current Time: Tue Jul 22 14:54:00 EDT 2025

Powered by FUDForum. Page generated in 0.32506 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top