Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Best practice for dynamically modifying a report
Best practice for dynamically modifying a report [message #652638] Fri, 04 February 2011 19:30 Go to next message
Mike Wulkan is currently offline Mike Wulkan
Messages: 141
Registered: July 2009
Senior Member
Hi,

First let me start out by saying a big "thank you" for all the help you have been providing me recently.

Now for the question Wink

I have a Pie chart with data represented in items/second. I would like to add some form of interactivity that would allow the user to change the units to items/hour or items/day etc...

Obviously the math is easy to do in the script but I am looking for guidance as to:
1) the best way to interact with the user. Something like buttons to launch a script would do.
2) After changing the variable that would determine the units in the script I would need to refresh the report and I don't know how to do that easily.

Am I on the right track?
Re: Best practice for dynamically modifying a report [message #652651 is a reply to message #652638] Fri, 04 February 2011 20:09 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Mike,

I have written quite a bit about chart interactivity on Birtworld.

http://birtworld.blogspot.com/2008/10/dynamically-adding-ser ies-to-birt-chart.html
http://birtworld.blogspot.com/2009/08/using-script-to-modify -birt-chart.html
http://birtworld.blogspot.com/2009/12/calling-client-side-ja vascript-from.html
http://birtworld.blogspot.com/2010/05/more-on-chart-interact ivity.html

What you will probably need most is calling-client-side js and use that
in a combination with the report developed here:
http://birtworld.blogspot.com/2007/03/birt-milestone-5-new-a nd-notable.html

HTH

Jason


On 2/4/2011 2:30 PM, Mike Wulkan wrote:
> Hi,
>
> First let me start out by saying a big "thank you" for all the help you
> have been providing me recently.
>
> Now for the question ;)
>
> I have a Pie chart with data represented in items/second. I would like
> to add some form of interactivity that would allow the user to change
> the units to items/hour or items/day etc...
>
> Obviously the math is easy to do in the script but I am looking for
> guidance as to:
> 1) the best way to interact with the user. Something like buttons to
> launch a script would do.
> 2) After changing the variable that would determine the units in the
> script I would need to refresh the report and I don't know how to do
> that easily.
>
> Am I on the right track?
Re: Best practice for dynamically modifying a report [message #652912 is a reply to message #652651] Mon, 07 February 2011 15:07 Go to previous messageGo to next message
Mike Wulkan is currently offline Mike Wulkan
Messages: 141
Registered: July 2009
Senior Member
Thanks Jason, these links are a goldmine... quick question though...

The script that reloads the page does so on a timer. How would I reference the function "reloadpage" manually from another script such as interactivity of an image button somewhere else in the report? For example a refresh button or just when the user changes a checkbox selection or something along those lines.
Re: Best practice for dynamically modifying a report [message #652984 is a reply to message #652912] Mon, 07 February 2011 19:07 Go to previous message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Just add a text element to the report that is set to html type and enter
something like this:

<INPUT type="button" value="Refresh" onclick="reloadpage()" />

Jason


On 2/7/2011 10:07 AM, Mike Wulkan wrote:
> Thanks Jason, these links are a goldmine... quick question though...
>
> The script that reloads the page does so on a timer. How would I
> reference the function "reloadpage" manually from another script such as
> interactivity of an image button somewhere else in the report? For
> example a refresh button or just when the user changes a checkbox
> selection or something along those lines.
Previous Topic:Y axis showing exponential value
Next Topic:Chart error in webviewer sample+Tomcat/JDK1.5
Goto Forum:
  


Current Time: Thu Oct 30 12:59:15 GMT 2014

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

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