Skip to main content



      Home
Home » Archived » BIRT » URGENT: A charting challenge
URGENT: A charting challenge [message #139817] Mon, 06 March 2006 13:16 Go to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 #140858 is a reply to message #140840] Tue, 07 March 2006 11:08 Go to previous messageGo to next message
Eclipse UserFriend
Thanks, that worked fine!

Can you please answere also my 2nd question from previous post?:

By the way, is it possible to open report #2 not using the frameset..., but
just with the run... option?
If yes, how?

Thanks a lot!
Re: URGENT: A charting challenge [message #140907 is a reply to message #140858] Tue, 07 March 2006 11:37 Go to previous messageGo to next message
Eclipse UserFriend
Sorry I missed that question. What do you mean by run... option? You mean
open the report like in preview vs open in like in web view (with the
toolbar)?

Thanks,

David

"Mr. Burns" <Mr._Burns@web.de> wrote in message
news:dukb68$ln7$1@eclipse.org...
> Thanks, that worked fine!
>
> Can you please answere also my 2nd question from previous post?:
>
> By the way, is it possible to open report #2 not using the frameset...,
> but just with the run... option?
> If yes, how?
>
> Thanks a lot!
>
Re: URGENT: A charting challenge [message #140930 is a reply to message #140907] Tue, 07 March 2006 11:51 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 #141258 is a reply to message #141010] Wed, 08 March 2006 03:07 Go to previous messageGo to next message
Eclipse UserFriend
Hello David,

thanks for reply.
But the subreport #2 does not start using same url as the original report as
you said.
The subreport always starts with the 'framset?...' option.

So I added an enhancement:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=130862
Re: URGENT: A charting challenge [message #141271 is a reply to message #141010] Wed, 08 March 2006 03:08 Go to previous messageGo to next message
Eclipse UserFriend
This is a multi-part message in MIME format.
--------------090704020907030008040204
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Thanks for the replies I was able to get it working in the designer as
well. To better control the url context, I am using the Birt API to
generate reports. I was able to successfully get the drill-through
working in the Birt designer, but I am having a problem running the
report with the Birt Api. I am getting the attached exception.

Are there some extra steps, or specific plugins that are needed to get
this solution to work with the Birt Api? I am only using the required
(minimum set) of plugins currently.

What could be causing the null pointer exception. I am using the second
release candidate version of Birt.

David


--------------090704020907030008040204
Content-Type: text/plain;
name="birt_exception.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="birt_exception.txt"

Mar 7, 2006 5:24:25 PM org.eclipse.birt.chart.reportitem.BIRTActionRenderer processAction
SEVERE: Exception
java.lang.NullPointerException
at org.eclipse.birt.chart.reportitem.BIRTActionRenderer.process Action(BIRTActionRenderer.java:98)
at org.eclipse.birt.chart.render.BaseRenderer.processTrigger(Ba seRenderer.java:2787)
at org.eclipse.birt.chart.render.Bar.renderSeries(Bar.java:970)
at org.eclipse.birt.chart.render.AxesRenderer.renderPlot(AxesRe nderer.java:2175)
at org.eclipse.birt.chart.render.AxesRenderer.render(AxesRender er.java:381)
at org.eclipse.birt.chart.factory.Generator.render(Generator.ja va:1209)
at org.eclipse.birt.chart.reportitem.ChartReportItemPresentatio nImpl.onRowSets(ChartReportItemPresentationImpl.java:456)
at org.eclipse.birt.report.engine.presentation.LocalizedEmitter .startExtendedContent(LocalizedEmitter.java:655)
at org.eclipse.birt.report.engine.presentation.LocalizedEmitter .startForeign(LocalizedEmitter.java:434)
at org.eclipse.birt.report.engine.presentation.WrappedEmitter.s tartForeign(WrappedEmitter.java:209)
at org.eclipse.birt.report.engine.presentation.DefaultPaginatio nEmitter.startForeign(DefaultPaginationEmitter.java:313)
at org.eclipse.birt.report.engine.executor.ExtendedItemExecutor .execute(ExtendedItemExecutor.java:100)
at org.eclipse.birt.report.engine.executor.ReportExecutorVisito r.visitExtendedItem(ReportExecutorVisitor.java:81)
at org.eclipse.birt.report.engine.ir.ExtendedItemDesign.accept( ExtendedItemDesign.java:30)
at org.eclipse.birt.report.engine.executor.ReportExecutor.execu te(ReportExecutor.java:125)
at org.eclipse.birt.report.engine.executor.ReportExecutor.execu te(ReportExecutor.java:89)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run (RunAndRenderTask.java:175)
at com.serena.dashboard.framework.SerenaBIRTPortlet.run(SerenaB IRTPortlet.java:500)

--------------090704020907030008040204--
Re: URGENT: A charting challenge [message #141334 is a reply to message #141271] Wed, 08 March 2006 04:28 Go to previous messageGo to next message
Eclipse UserFriend
Are you trying to render in HTML or PDF? Looks like the ExecutionContext of
the report engine does not have any ActionHandler (getActionHandler()
returns null, causing an exception).

Thanks,

David

"David Vukosa" <dvukosa@serena.com> wrote in message
news:dum3e3$mds$1@eclipse.org...
> Thanks for the replies I was able to get it working in the designer as
> well. To better control the url context, I am using the Birt API to
> generate reports. I was able to successfully get the drill-through
> working in the Birt designer, but I am having a problem running the
> report with the Birt Api. I am getting the attached exception.
>
> Are there some extra steps, or specific plugins that are needed to get
> this solution to work with the Birt Api? I am only using the required
> (minimum set) of plugins currently.
>
> What could be causing the null pointer exception. I am using the second
> release candidate version of Birt.
>
> David
>
>


------------------------------------------------------------ --------------------


> Mar 7, 2006 5:24:25 PM
> org.eclipse.birt.chart.reportitem.BIRTActionRenderer processAction
> SEVERE: Exception
> java.lang.NullPointerException
> at
> org.eclipse.birt.chart.reportitem.BIRTActionRenderer.process Action(BIRTActionRenderer.java:98)
> at
> org.eclipse.birt.chart.render.BaseRenderer.processTrigger(Ba seRenderer.java:2787)
> at org.eclipse.birt.chart.render.Bar.renderSeries(Bar.java:970)
> at
> org.eclipse.birt.chart.render.AxesRenderer.renderPlot(AxesRe nderer.java:2175)
> at
> org.eclipse.birt.chart.render.AxesRenderer.render(AxesRender er.java:381)
> at
> org.eclipse.birt.chart.factory.Generator.render(Generator.ja va:1209)
> at
> org.eclipse.birt.chart.reportitem.ChartReportItemPresentatio nImpl.onRowSets(ChartReportItemPresentationImpl.java:456)
> at
> org.eclipse.birt.report.engine.presentation.LocalizedEmitter .startExtendedContent(LocalizedEmitter.java:655)
> at
> org.eclipse.birt.report.engine.presentation.LocalizedEmitter .startForeign(LocalizedEmitter.java:434)
> at
> org.eclipse.birt.report.engine.presentation.WrappedEmitter.s tartForeign(WrappedEmitter.java:209)
> at
> org.eclipse.birt.report.engine.presentation.DefaultPaginatio nEmitter.startForeign(DefaultPaginationEmitter.java:313)
> at
> org.eclipse.birt.report.engine.executor.ExtendedItemExecutor .execute(ExtendedItemExecutor.java:100)
> at
> org.eclipse.birt.report.engine.executor.ReportExecutorVisito r.visitExtendedItem(ReportExecutorVisitor.java:81)
> at
> org.eclipse.birt.report.engine.ir.ExtendedItemDesign.accept( ExtendedItemDesign.java:30)
> at
> org.eclipse.birt.report.engine.executor.ReportExecutor.execu te(ReportExecutor.java:125)
> at
> org.eclipse.birt.report.engine.executor.ReportExecutor.execu te(ReportExecutor.java:89)
> at
> org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run (RunAndRenderTask.java:175)
> at
> com.serena.dashboard.framework.SerenaBIRTPortlet.run(SerenaB IRTPortlet.java:500)
>
Re: URGENT: A charting challenge [message #141399 is a reply to message #141010] Wed, 08 March 2006 07:17 Go to previous messageGo to next message
Eclipse UserFriend
Hello David,

A bigger problem of running the subreport (by default) using the
frameset?... option is that a 2nd and further executions of subreport won't
be updated.
So if the subreport is started the 1st time, everything seems to be OK. But
clicking the bar in the main report again, which causes to run the subreport
the second time causes that the *.rptdocument will be loeaded into the
browser which shows the result of the 1st execution of the subreport. If
data changed between the 1st execution and 2nd execution, it won't have any
effect on the result in the browser!
Re: URGENT: A charting challenge [message #141408 is a reply to message #141399] Wed, 08 March 2006 07:28 Go to previous messageGo to next message
Eclipse UserFriend
This sounds like a bug, I would suggest to file a bugzilla entry for it.

Thanks,

David

"Mr. Burns" <Mr._Burns@web.de> wrote in message
news:dumi0g$bhs$1@eclipse.org...
> Hello David,
>
> A bigger problem of running the subreport (by default) using the
> frameset?... option is that a 2nd and further executions of subreport
> won't be updated.
> So if the subreport is started the 1st time, everything seems to be OK.
> But clicking the bar in the main report again, which causes to run the
> subreport the second time causes that the *.rptdocument will be loeaded
> into the browser which shows the result of the 1st execution of the
> subreport. If data changed between the 1st execution and 2nd execution, it
> won't have any effect on the result in the browser!
>
>
Re: URGENT: A charting challenge [message #141428 is a reply to message #141408] Wed, 08 March 2006 07:33 Go to previous messageGo to next message
Eclipse UserFriend
Hello David,

I pointed this out also in my bugzilla entry:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=130862
Re: URGENT: A charting challenge [message #141676 is a reply to message #141334] Wed, 08 March 2006 11:02 Go to previous messageGo to next message
Eclipse UserFriend
I am trying to render in HTML. Is there any way around the null pointer
exception?

David
Re: URGENT: A charting challenge [message #142242 is a reply to message #141676] Thu, 09 March 2006 11:15 Go to previous messageGo to next message
Eclipse UserFriend
That's strange, I have no idea why this is happening, it should normally
work fine. I think only debugging can tell what's the origin of the problem.

Thanks,

David

"David Vukosa" <dvukosa@serena.com> wrote in message
news:dumv7e$g5j$1@eclipse.org...
>I am trying to render in HTML. Is there any way around the null pointer
>exception?
>
> David
>
Re: URGENT: A charting challenge [message #142526 is a reply to message #141408] Fri, 10 March 2006 03:28 Go to previous message
Eclipse UserFriend
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)
Previous Topic:pdf preview compresses report to roughly 3/4 the page....
Next Topic:How to access a row of a result set
Goto Forum:
  


Current Time: Sun Jul 27 13:45:41 EDT 2025

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

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

Back to the top