12-06-2012 05:41 PM
Hi,
I'm currently working on a Java macro to create clickable piecharts in order to generate another report focusing on the details related to the sector the user clicked on. I found the way to make the piechart clickable using ChartDirector documentation and functionnalities, but I still don't know how to generate the report automatically.
I'm trying to make it work as the yellow arrow (circled in red) in the tab of the second chapter of the report called "Functional planning - Geographical analysis" (see screenshot below).
Does anybody know how to generate a new report the same way, using Java or any Web language?
Thank you in advance for you help,
Solved! Go to Solution.
29-06-2012 08:05 PM
Claudio, Noé,
Thank you very much for those two answers, it helps me a lot ! I might ask some others questions while I'm trying to make it work for my report.
Have a good weekend
29-06-2012 07:15 PM
Hello Patrick and Kevin,
Yes, you should handle the click using Javascript to open an analysis.
The logic I recommend you implement is as follows (I suppose you are using Mega 2009 SP5) :
You can have a look at ~w0(8(wIxC910[Analysis Generic Formatter] for more information on the existing possibilities (xml analysis, standard existing analysis.). You could also make another, more simple, formatter to handle your specific case.
Have a nice week-end
Noé
29-06-2012 07:14 PM
When you click on a place in the generated report you do an event in the browser DOM. Javascript can catch it and execute the code.
To run a new report (not to open - let's say - a new chapter in the previous one) you have to consider at least:
* how you will provide parameters to the new report instance (your request seems to be like a drill-down)
* what is your generation context.
For the generation context you have (at least) two options:
* you are inside the desktop
* you are in advisor/anywhere
For the desktop, in javascript you have external.megaRoot that provides you a Mega Root javascript object, and you can do whatever you want with the standard APIs.
For Advisor it is more complex, but there are Javascript functions inside Advisor to open a new object, so you can open a new report. But will your report be available? I can't answer.
For Anywhere I'm not sure (never tryed yet), but I think you have a similar context like Advisor.
For both Advisor and Anywhere you do not have external.MegaRoot, soory.
29-06-2012 06:26 PM
Just to add a little more context and explination to what Patrick is looking for. If you look at the report ""Functional planning - Geographical analysis" in the demonstration - Adventure repository you have the ability to open a new analysis report by clicking on the "Yellow" arrows as he as highlighted with the red circle in the first post.
It is this function he is looking to use - "Click on the arrow and open a new analysis report in a new tab on the workspace"
We can't find any documentation on it and the report is a dll based report so we can't look at the code to see how it's done.
Thank you for any help in this area.
Kevin Costa
29-06-2012 06:16 PM
Hi,
This answer you gave me wasn't fully responding to my question. Indeed, I'm looking for the mean of generating a new report from the click on another report.
As I said in the first post, this functionnality already exists in the report ( c.f first post ), and I'd like to add it to my report. I already created my generated report, with a new render to make PieChart clickable. That's the only thing I need now.
So, my question is : Is report generation managed by Javascript? And if so, is it possible to obtain an example of it, to adapt it on my projet ?
Thank you
14-06-2012 10:27 PM - edited 14-06-2012 10:30 PM
Hi Noe,
Thank you for your answer, I'll take a look at this !
I'll probably finish and reference my renderer before doing anything about the click, but I'll need to take a look at the action I can launch from MEGA APIs.
I'll reply to this post if I have some additional questions!
Regards
14-06-2012 07:06 PM
Hello Patrick,
The general principle is as follows:
The click itself can launch your own javascript function, where you can call Mega APIs to launch the action of your choice.
Don't hesitate if you have more specific questions.
Regards