Home » Archived » BIRT » URGENT: A charting challenge
URGENT: A charting challenge [message #139817] |
Mon, 06 March 2006 13:16  |
Eclipse User |
|
|
|
The functionality that I am trying to accompilsh is being able to click
on a graphical chart and pass data as parameters to another chart. For
example, clicking on a bar in chart #1 will open up chart #2 and pass
information like the value of the original bar that was clicked on, AS
WELL as parameters that were passed into chart #1.
From my understanding this functionality is not available when
associating a chart interactivity event like executing JavaScript when
the mouse is clicked. If this behavior is not available with a simple
JavaScript call in the Interactivity section of a chart is there
another, more round about way to accomplish the task?
Could I perhaps save some data as JavaScript earlier in a script that
runs while the report is generating? And then access that information
in the JavaScript that is executed when the mouse is clicked?
I was looking at other new group articles that seemed to add their own
custom event handlers. Would it be possible to use a solution similar
to the one specified in
( http://www.eclipse.org/newsportal/article.php?id=5702&gr oup=eclipse.birt)
to add a custom mouse click handler that will be able to access either
the report's parameters, data, or the specific section of the chart
being clicked on?
I did try to follow the example and add a script call which didn't seem
to work for me.
It seems this solution is more lower level and it may be possible to
access more information than I would with the javascript call in the
Interactivity section of the chart.
If this solution would be possible could you explain how to call a
script and access the report chart, parameters, and data.
I am open to any possible solution.
Thanks,
David
|
|
|
Re: URGENT: A charting challenge [message #139956 is a reply to message #139817] |
Mon, 06 March 2006 15:59   |
Eclipse User |
|
|
|
Are you using the chart as standalone or in a BIRT report? If it's in a
report, what do you mean by open chart #2? Do you mean open report #2 with
another chart in it?
Thanks,
David
"David Vukosa" <dvukosa@serena.com> wrote in message
news:duhub5$c7u$1@eclipse.org...
> The functionality that I am trying to accompilsh is being able to click on
> a graphical chart and pass data as parameters to another chart. For
> example, clicking on a bar in chart #1 will open up chart #2 and pass
> information like the value of the original bar that was clicked on, AS
> WELL as parameters that were passed into chart #1.
>
> From my understanding this functionality is not available when associating
> a chart interactivity event like executing JavaScript when the mouse is
> clicked. If this behavior is not available with a simple JavaScript call
> in the Interactivity section of a chart is there another, more round about
> way to accomplish the task?
>
> Could I perhaps save some data as JavaScript earlier in a script that runs
> while the report is generating? And then access that information in the
> JavaScript that is executed when the mouse is clicked?
>
> I was looking at other new group articles that seemed to add their own
> custom event handlers. Would it be possible to use a solution similar to
> the one specified in
> ( http://www.eclipse.org/newsportal/article.php?id=5702&gr oup=eclipse.birt)
> to add a custom mouse click handler that will be able to access either the
> report's parameters, data, or the specific section of the chart being
> clicked on?
>
> I did try to follow the example and add a script call which didn't seem to
> work for me.
>
> It seems this solution is more lower level and it may be possible to
> access more information than I would with the javascript call in the
> Interactivity section of the chart.
>
> If this solution would be possible could you explain how to call a script
> and access the report chart, parameters, and data.
>
> I am open to any possible solution.
>
> Thanks,
> David
>
|
|
|
Re: URGENT: A charting challenge [message #140091 is a reply to message #139956] |
Mon, 06 March 2006 18:12   |
Eclipse User |
|
|
|
Yes. To be more specific, I have one report (report #1) which has a
chart in it. For example this report could be a bar chart of the amount
of sales within a specific country for the current year. So the country
to display and base this report on will be passed into this report by a
parameter. Each bar will represent the number of sales for a specific
month within the country passed in via the parameter.
Then when I click on a specific bar I want to view a different report
(report #2) which is a tabular report that shows the individual sales
for the specific country over the specific month.
For example if I clicked on the bar that displayed the sales for Romania
in December, I would expect report #2 to display the individual sales
for Romania in December.
So I would need to pass in the Country and the Month from the first
report (report #1) to report #2 in order to display individual sales
using the correct country and month.
David
David Michonneau wrote:
> Are you using the chart as standalone or in a BIRT report? If it's in a
> report, what do you mean by open chart #2? Do you mean open report #2 with
> another chart in it?
>
> Thanks,
>
> David
>
> "David Vukosa" <dvukosa@serena.com> wrote in message
> news:duhub5$c7u$1@eclipse.org...
>
>>The functionality that I am trying to accompilsh is being able to click on
>>a graphical chart and pass data as parameters to another chart. For
>>example, clicking on a bar in chart #1 will open up chart #2 and pass
>>information like the value of the original bar that was clicked on, AS
>>WELL as parameters that were passed into chart #1.
>>
>>From my understanding this functionality is not available when associating
>>a chart interactivity event like executing JavaScript when the mouse is
>>clicked. If this behavior is not available with a simple JavaScript call
>>in the Interactivity section of a chart is there another, more round about
>>way to accomplish the task?
>>
>>Could I perhaps save some data as JavaScript earlier in a script that runs
>>while the report is generating? And then access that information in the
>>JavaScript that is executed when the mouse is clicked?
>>
>>I was looking at other new group articles that seemed to add their own
>>custom event handlers. Would it be possible to use a solution similar to
>>the one specified in
>>( http://www.eclipse.org/newsportal/article.php?id=5702&gr oup=eclipse.birt)
>>to add a custom mouse click handler that will be able to access either the
>>report's parameters, data, or the specific section of the chart being
>>clicked on?
>>
>>I did try to follow the example and add a script call which didn't seem to
>>work for me.
>>
>>It seems this solution is more lower level and it may be possible to
>>access more information than I would with the javascript call in the
>>Interactivity section of the chart.
>>
>>If this solution would be possible could you explain how to call a script
>>and access the report chart, parameters, and data.
>>
>>I am open to any possible solution.
>>
>>Thanks,
>>David
>>
>
>
>
|
|
|
Re: URGENT: A charting challenge [message #140441 is a reply to message #140091] |
Tue, 07 March 2006 05:40   |
Eclipse User |
|
|
|
Ok, so here is how to do it:
Open report #1
Open the chart builder
Go to the Format Chart page
Navigate to the Value Series
Click on Interactivity
Choose Type: Mouse Click, Action:URL Redirect
Click on Edit Base URL
Choose Drill-through
Choose the report #2 in Report
Click OK
(Assuming report# 2 parameters are called: CountryParam and MonthParam)
in Value Series Name, enter CountryParam
in Category Series, enter MonthParam
Click on Update
You need to name your value series after the report parameter of report 1
(country). I would do this through scripting, where you can access the
report parameter from context.getExternalContext().getScriptable() (which
returns an IReportContext).
Thanks,
David
"David Vukosa" <dvukosa@serena.com> wrote in message
news:duifjs$gdu$1@eclipse.org...
> Yes. To be more specific, I have one report (report #1) which has a chart
> in it. For example this report could be a bar chart of the amount of
> sales within a specific country for the current year. So the country to
> display and base this report on will be passed into this report by a
> parameter. Each bar will represent the number of sales for a specific
> month within the country passed in via the parameter.
>
> Then when I click on a specific bar I want to view a different report
> (report #2) which is a tabular report that shows the individual sales for
> the specific country over the specific month.
>
> For example if I clicked on the bar that displayed the sales for Romania
> in December, I would expect report #2 to display the individual sales for
> Romania in December.
>
> So I would need to pass in the Country and the Month from the first report
> (report #1) to report #2 in order to display individual sales using the
> correct country and month.
>
> David
>
>
> David Michonneau wrote:
>
>> Are you using the chart as standalone or in a BIRT report? If it's in a
>> report, what do you mean by open chart #2? Do you mean open report #2
>> with another chart in it?
>>
>> Thanks,
>>
>> David
>>
>> "David Vukosa" <dvukosa@serena.com> wrote in message
>> news:duhub5$c7u$1@eclipse.org...
>>
>>>The functionality that I am trying to accompilsh is being able to click
>>>on a graphical chart and pass data as parameters to another chart. For
>>>example, clicking on a bar in chart #1 will open up chart #2 and pass
>>>information like the value of the original bar that was clicked on, AS
>>>WELL as parameters that were passed into chart #1.
>>>
>>>From my understanding this functionality is not available when
>>>associating a chart interactivity event like executing JavaScript when
>>>the mouse is clicked. If this behavior is not available with a simple
>>>JavaScript call in the Interactivity section of a chart is there another,
>>>more round about way to accomplish the task?
>>>
>>>Could I perhaps save some data as JavaScript earlier in a script that
>>>runs while the report is generating? And then access that information in
>>>the JavaScript that is executed when the mouse is clicked?
>>>
>>>I was looking at other new group articles that seemed to add their own
>>>custom event handlers. Would it be possible to use a solution similar to
>>>the one specified in
>>>( http://www.eclipse.org/newsportal/article.php?id=5702&gr oup=eclipse.birt)
>>>to add a custom mouse click handler that will be able to access either
>>>the report's parameters, data, or the specific section of the chart being
>>>clicked on?
>>>
>>>I did try to follow the example and add a script call which didn't seem
>>>to work for me.
>>>
>>>It seems this solution is more lower level and it may be possible to
>>>access more information than I would with the javascript call in the
>>>Interactivity section of the chart.
>>>
>>>If this solution would be possible could you explain how to call a script
>>>and access the report chart, parameters, and data.
>>>
>>>I am open to any possible solution.
>>>
>>>Thanks,
>>>David
>>>
>>
>>
>>
>
|
|
|
Re: URGENT: A charting challenge [message #140818 is a reply to message #140441] |
Tue, 07 March 2006 10:47   |
Eclipse User |
|
|
|
Hello David,
I have a similar question, lets say I have a report #1 (bar chart type)
which shows one bar for each year e.g. 2004, 2005, 2006.
My report #2 has an easy query (under dataset property binding):
"select Customer, TurnOver from CustomerTable where Year = "' +
params['Year']
Now I want to click one bar in report #1 and report #2 should be opened with
the matching year.
e.g. if I clickin report #1 the bar 2006, the query to run report #2 should
be:
"select Customer, TurnOver from CustomerTable where Year = 2006"
I do not know how I can give the value of the bar (2006) into the
params['Year'] of report #2.
In the chart wizard --> value-series --> interactivity --> Edit Base URL
one can choose the parameters of report #2, but I do not know how I can pass
the value of the bar (2006) from report #1 to it.
Any ideas?
By the way, is it possible to open report #2 not using the frameset..., but
just with the run... option?
|
|
|
Re: URGENT: A charting challenge [message #140840 is a reply to message #140818] |
Tue, 07 March 2006 10:53   |
Eclipse User |
|
|
|
You can follow the instructions I put in my previous post. Basically you
don't do it inside the Edit Base URL dialog, but in the interactivity
dialog. In value series, you input the name of the parameter of the target
report.
Thanks,
David
"Mr. Burns" <Mr._Burns@web.de> wrote in message
news:duk9v3$b62$1@eclipse.org...
> Hello David,
>
> I have a similar question, lets say I have a report #1 (bar chart type)
> which shows one bar for each year e.g. 2004, 2005, 2006.
>
> My report #2 has an easy query (under dataset property binding):
>
> "select Customer, TurnOver from CustomerTable where Year = "' +
> params['Year']
>
> Now I want to click one bar in report #1 and report #2 should be opened
> with the matching year.
> e.g. if I clickin report #1 the bar 2006, the query to run report #2
> should be:
>
> "select Customer, TurnOver from CustomerTable where Year = 2006"
>
> I do not know how I can give the value of the bar (2006) into the
> params['Year'] of report #2.
> In the chart wizard --> value-series --> interactivity --> Edit Base URL
>
> one can choose the parameters of report #2, but I do not know how I can
> pass the value of the bar (2006) from report #1 to it.
>
> Any ideas?
>
> By the way, is it possible to open report #2 not using the frameset...,
> but just with the run... option?
>
|
|
| | |
Re: URGENT: A charting challenge [message #140930 is a reply to message #140907] |
Tue, 07 March 2006 11:51   |
Eclipse User |
|
|
|
Hello David,
to make it more clear:
I want to run the subreport (report #2) WITHOUT the options in the header of
the result-webpage visible.
There are options visible like show content, execute report, export data,
move to previous page, next page, etc.
So the difference is running a report by:
http://reports:8080/birt-viewer/frameset...
or
http://reports:8080/birt-viewer/run...
You can see also attachments:
What I get now running the subreport #2 is see: birt1.jpg
What I want to get is see: birt2.jpg
Hope it makes it more clear, thanks!
Attachment: birt2.jpg
(Size: 35.63KB, Downloaded 136 times)
Attachment: birt1.jpg
(Size: 41.26KB, Downloaded 148 times)
|
|
|
Re: URGENT: A charting challenge [message #141010 is a reply to message #140930] |
Tue, 07 March 2006 13:15   |
Eclipse User |
|
|
|
Ok, I understand, I don't think there is a way, it will always use the same
url as the original report. I might be wrong, but if it were possible, there
should be an option in the url builder dialog. You can probably file an
enhancement for this in bugzilla.
Thanks,
David
"Mr. Burns" <Mr._Burns@web.de> wrote in message
news:dukdn6$brk$1@eclipse.org...
> Hello David,
>
> to make it more clear:
>
> I want to run the subreport (report #2) WITHOUT the options in the header
> of the result-webpage visible.
> There are options visible like show content, execute report, export data,
> move to previous page, next page, etc.
>
> So the difference is running a report by:
>
> http://reports:8080/birt-viewer/frameset...
> or
> http://reports:8080/birt-viewer/run...
>
> You can see also attachments:
>
> What I get now running the subreport #2 is see: birt1.jpg
> What I want to get is see: birt2.jpg
>
> Hope it makes it more clear, thanks!
>
>
>
|
|
| | | | | | | | |
Re: URGENT: A charting challenge [message #142526 is a reply to message #141408] |
Fri, 10 March 2006 03:28  |
Eclipse User |
|
|
|
Hello,
I investigated a workarround until the problem gets solved by BIRT
developers.
To avoid a subreport running unsing the framset?__ ... method, there is a
different way to start a subreport:
Assume we already have a mainreport (e.g. bar-chart type) where you want to
add interactivity if one clicks a certain bar of this chart:
1. Start the chart wizard --> Format chart --> Choose the value series where
you want to add interactivity
2. Click the interactivity button
3. Choose Type: Mouseclick and Action: URL-Redirect
4. Click the button Edit base URL...
5. For Type of hyperlink choose URI (not Drill-through!!!)
6. Click the ... button to open the expression builder (see attachment
step6.jpg)
7. In the expression builder enter the full URL to your subreport using the
RUN option, e.g.:
http://birt-server:8080/birt-viewer/RUN?__format=html&__ report=MyReport.rptdesign
// here you can use the RUN option instead of the (default) frameset option
you can also transfer a parameter of the main report into the URL of the
subreport, so additional values from the main report can be transferred to
the subreport, e.g.:
" http://birt-server:8080/birt-viewer/run?__format=html&__ report=MyReport.rptdesign&MyParam="
+ params['ABC'] // ABC is a report param of the main report, using this way
you can put a report parameter from main report to the subreport
8. Click OK in the expression builder and click OK in the Hyperlink options
window
9. In the Interactivity window you can now make more parameters available in
the subreports URL, these params are the X- and Y values of the bar you
click in the main report:
a: Cathegorie serie: If you enter a param name e.g. CathSer, the subreport
URL will look like:
http://birt-server:8080/birt-viewer/run?__format=html&__ report=MyReport.rptdesign&CathSer=5
// if you clicked a bar with X-value 5 in the main report
b: Value serie: If you enter a param name e.g. ValSer, the subreport URL
will look like:
http://birt-server:8080/birt-viewer/run?__format=html&__ report=MyReport.rptdesign&ValSer=123
// if you clicked a bar with Y-value 123 in the main report
c: Name of value serie: If you enter a param name e.g. NameValSer, the
subreport URL will look like:
http://birt-server:8080/birt-viewer/run?__format=html&__ report=MyReport.rptdesign&NameValSer=Amount
// if you clicked a bar with value serie name Amount in the main report
10. If you click update in the interactivity window and close the
interactivity window you just have to click finish in the report wizard and
save it.
Voila - you can run a subreport using the run... instead of the frameset...
option
Attachment: step7.jpg
(Size: 48.94KB, Downloaded 138 times)
Attachment: step6.jpg
(Size: 19.03KB, Downloaded 137 times)
|
|
|
Goto Forum:
Current Time: Sun Jul 27 13:45:41 EDT 2025
Powered by FUDForum. Page generated in 0.07632 seconds
|