Skip to main content



      Home
Home » Archived » BIRT » chart scripting, and report parameters
chart scripting, and report parameters [message #189036] Fri, 01 September 2006 07:58 Go to next message
Eclipse UserFriend
Originally posted by: jhurley12.gmail.com

I have been scripting my queries including the report parameters as part of
the queryText string. To do this i would just concat the string with a call
to params["p1"] for the string parameter named p1. This works great. Now
im scripting certain aspects of my charts, and I want these scripts to be
able to access the params[] as well so i can control chart appearance with
parameters, but it doesn't seem to work. Why is this any different from
scripting the dataset's query? how can i access the report parameters from
the chart scripts?

Thanks,
Joe
Re: chart scripting, and report parameters [message #189143 is a reply to message #189036] Fri, 01 September 2006 12:12 Go to previous messageGo to next message
Eclipse UserFriend
Here is an example:
function beforeGeneration( chart, context ){

importPackage(Packages.org.eclipse.birt.chart.model.type.imp l);



chart.getTitle().getLabel().getCaption().setValue(context.ge tExternalContext().getScriptable().getParameterValue( "chartT"));


}

chartT is a report parameter.

Jason

"Joe" <jhurley12@gmail.com> wrote in message
news:ed978o$2ch$1@utils.eclipse.org...
>I have been scripting my queries including the report parameters as part of
>the queryText string. To do this i would just concat the string with a
>call to params["p1"] for the string parameter named p1. This works great.
>Now im scripting certain aspects of my charts, and I want these scripts to
>be able to access the params[] as well so i can control chart appearance
>with parameters, but it doesn't seem to work. Why is this any different
>from scripting the dataset's query? how can i access the report parameters
>from the chart scripts?
>
> Thanks,
> Joe
>
Re: chart scripting, and report parameters [message #189215 is a reply to message #189143] Mon, 04 September 2006 05:11 Go to previous message
Eclipse UserFriend
Originally posted by: jhurley12.gmail.com

Thank you!
That was exactly what I needed.

Joe

"Jason Weathersby" <jweathersby@actuate.com> wrote in message
news:ed9m50$hrr$1@utils.eclipse.org...
> Here is an example:
> function beforeGeneration( chart, context ){
>
> importPackage(Packages.org.eclipse.birt.chart.model.type.imp l);
>
>
>
> chart.getTitle().getLabel().getCaption().setValue(context.ge tExternalContext().getScriptable().getParameterValue( "chartT"));
>
>
> }
>
> chartT is a report parameter.
>
> Jason
>
> "Joe" <jhurley12@gmail.com> wrote in message
> news:ed978o$2ch$1@utils.eclipse.org...
>>I have been scripting my queries including the report parameters as part
>>of the queryText string. To do this i would just concat the string with a
>>call to params["p1"] for the string parameter named p1. This works
>>great. Now im scripting certain aspects of my charts, and I want these
>>scripts to be able to access the params[] as well so i can control chart
>>appearance with parameters, but it doesn't seem to work. Why is this any
>>different from scripting the dataset's query? how can i access the report
>>parameters from the chart scripts?
>>
>> Thanks,
>> Joe
>>
>
>
Previous Topic:Can we run Birt Report outside eclipse?
Next Topic:Regarding PDF
Goto Forum:
  


Current Time: Tue Jul 22 07:46:35 EDT 2025

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

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

Back to the top