beforeGeneration [message #185889] |
Fri, 18 August 2006 07:38  |
Eclipse User |
|
|
|
Originally posted by: kukawkap.poczta.gazeta.pl
Hello,
can anybody tell when the beforeGeneration function is called?
As I wrote earlier I found that changes in function work for the second
line but with data from first. Is it called after displaying the chart
or before. When after, then witch function should I use to make changes
in Dial Chart, before it will be displayed.
Thanks in advice
Przemek Kukawka
|
|
|
Re: beforeGeneration [message #186126 is a reply to message #185889] |
Sat, 19 August 2006 12:43   |
Eclipse User |
|
|
|
Przemek,
For a more complete reading on the event handler please see Jason
Weathersby's excellent description of scripting at:
http://www.eclipse.org/birt/phoenix/deploy/reportScripting.p hp
If you have reviewed this link you may have noticed that the chart
engine is not covered under this description. To start the basic
principles for reporting still stand for charting still apply.
I did go in and build a simple project that logs all of the events which
occur in a report. To describe the output, this is a very simple report
with a scriptedDataSource and ScriptedDataSet. It returns four rows of
data which are fed into a bar chart which performs grouping on the text
data and sums the numeric data.
The output log describes the event handler which is firing along with
the method called on that event handler. If you have a look at the
output below, you will see that the data source and sets gather all of
the data, then they pass that data to the chart, which first calls the
beforeGeneration method. Then it calls the afterGeneration method.
From that point forward the chart is in Rendering mode. I have not
spent a lot of time analyzing the results, I am preparing for a
presentation on BIRT next week, but if you would like more info let me
know and I will see about posting something to the web site or the
BirtWorld blog.
Scott Rosenbaum
BIRT PMC
Output of the event log.
ReportEH => initialize : START LOGGING
ReportEH => beforeFactory
ReportEH => beforeRender
ScriptedDataSourceEH => beforeOpen
ScriptedDataSourceEH => afterOpen
ScriptedChartDataSetEH => beforeOpen
ScriptedChartDataSetEH => describe
ScriptedChartDataSetEH => open
ScriptedChartDataSetEH => afterOpen
ScriptedChartDataSetEH => fetch
ScriptedChartDataSetEH => onFetch
ScriptedChartDataSetEH => fetch
ScriptedChartDataSetEH => onFetch
ScriptedChartDataSetEH => fetch
ScriptedChartDataSetEH => onFetch
ScriptedChartDataSetEH => fetch
ScriptedChartDataSetEH => onFetch
ScriptedChartDataSetEH => fetch
ScriptedChartDataSetEH => beforeOpen
ScriptedChartDataSetEH => describe
ScriptedChartDataSetEH => open
ScriptedChartDataSetEH => afterOpen
ScriptedChartDataSetEH => fetch
ScriptedChartDataSetEH => onFetch
ScriptedChartDataSetEH => fetch
ScriptedChartDataSetEH => onFetch
ScriptedChartDataSetEH => fetch
ScriptedChartDataSetEH => onFetch
ScriptedChartDataSetEH => fetch
ScriptedChartDataSetEH => onFetch
ScriptedChartDataSetEH => fetch
ChartEH => beforeGeneration
ChartEH => afterGeneration
ChartEH => beforeRendering
ChartEH => beforeDrawBlock
ChartEH => afterDrawBlock
ChartEH => beforeDrawBlock
ChartEH => afterDrawBlock
ChartEH => beforeDrawBlock
ChartEH => beforeDrawSeries
ChartEH => afterDrawSeries
ChartEH => afterDrawBlock
ChartEH => beforeDrawBlock
ChartEH => beforeDrawSeries
ChartEH => beforeDrawDataPoint
ChartEH => afterDrawDataPoint
ChartEH => beforeDrawDataPointLabel
ChartEH => afterDrawDataPointLabel
ChartEH => beforeDrawDataPoint
ChartEH => afterDrawDataPoint
ChartEH => beforeDrawDataPointLabel
ChartEH => afterDrawDataPointLabel
ChartEH => beforeDrawDataPoint
ChartEH => afterDrawDataPoint
ChartEH => beforeDrawDataPointLabel
ChartEH => afterDrawDataPointLabel
ChartEH => beforeDrawDataPoint
ChartEH => afterDrawDataPoint
ChartEH => beforeDrawDataPointLabel
ChartEH => afterDrawDataPointLabel
ChartEH => afterDrawSeries
ChartEH => beforeDrawAxisLabel
ChartEH => afterDrawAxisLabel
ChartEH => beforeDrawAxisLabel
ChartEH => afterDrawAxisLabel
ChartEH => beforeDrawAxisLabel
ChartEH => afterDrawAxisLabel
ChartEH => beforeDrawAxisLabel
ChartEH => afterDrawAxisLabel
ChartEH => beforeDrawAxisLabel
ChartEH => afterDrawAxisLabel
ChartEH => beforeDrawAxisLabel
ChartEH => afterDrawAxisLabel
ChartEH => beforeDrawAxisLabel
ChartEH => afterDrawAxisLabel
ChartEH => beforeDrawAxisLabel
ChartEH => afterDrawAxisLabel
ChartEH => beforeDrawAxisLabel
ChartEH => afterDrawAxisLabel
ChartEH => beforeDrawAxisLabel
ChartEH => afterDrawAxisLabel
ChartEH => beforeDrawAxisLabel
ChartEH => afterDrawAxisLabel
ChartEH => beforeDrawAxisLabel
ChartEH => afterDrawAxisLabel
ChartEH => afterDrawBlock
ChartEH => beforeDrawBlock
ChartEH => beforeDrawLegendEntry
ChartEH => afterDrawLegendEntry
ChartEH => afterDrawBlock
ChartEH => afterRendering
ScriptedChartDataSetEH => beforeClose
ScriptedChartDataSetEH => close
ScriptedChartDataSetEH => afterClose
ScriptedChartDataSetEH => beforeClose
ScriptedChartDataSetEH => close
ScriptedChartDataSetEH => afterClose
ReportEH => afterRender
ReportEH => afterFactory
ReportEH => clearLoggers : FACTORY CLEAR LOGGERS
Przemysław Kukawka wrote:
> Hello,
> can anybody tell when the beforeGeneration function is called?
> As I wrote earlier I found that changes in function work for the second
> line but with data from first. Is it called after displaying the chart
> or before. When after, then witch function should I use to make changes
> in Dial Chart, before it will be displayed.
>
> Thanks in advice
> Przemek Kukawka
|
|
|
Re: beforeGeneration [message #186386 is a reply to message #186126] |
Mon, 21 August 2006 10:26  |
Eclipse User |
|
|
|
Originally posted by: kukawkap.poczta.gazeta.pl
This is a multi-part message in MIME format.
--------------010202060400010407040507
Content-Type: text/plain; charset=ISO-8859-2; format=flowed
Content-Transfer-Encoding: 8bit
Hi Robert,
thanks a lot for Your tests and answer.
I looks like the beforeGeneration is called on beginning of creating
the chart. So, the changes made there should be available already by
the first occurrence of chart. But by me, the changes made in function
beforeGeneration will be showed in 2nd line.
In appendix I send my report with the database and results in pdf.
Could You look in my script, what I'm doing wrong?
Przemek Kukawka
Scott Rosenbaum wrote:
> Przemek,
>
> For a more complete reading on the event handler please see Jason
> Weathersby's excellent description of scripting at:
>
> http://www.eclipse.org/birt/phoenix/deploy/reportScripting.p hp
>
> If you have reviewed this link you may have noticed that the chart
> engine is not covered under this description. To start the basic
> principles for reporting still stand for charting still apply.
>
> I did go in and build a simple project that logs all of the events which
> occur in a report. To describe the output, this is a very simple report
> with a scriptedDataSource and ScriptedDataSet. It returns four rows of
> data which are fed into a bar chart which performs grouping on the text
> data and sums the numeric data.
>
> The output log describes the event handler which is firing along with
> the method called on that event handler. If you have a look at the
> output below, you will see that the data source and sets gather all of
> the data, then they pass that data to the chart, which first calls the
> beforeGeneration method. Then it calls the afterGeneration method.
>
> From that point forward the chart is in Rendering mode. I have not
> spent a lot of time analyzing the results, I am preparing for a
> presentation on BIRT next week, but if you would like more info let me
> know and I will see about posting something to the web site or the
> BirtWorld blog.
>
> Scott Rosenbaum
> BIRT PMC
>
> Output of the event log.
>
> ReportEH => initialize : START LOGGING
> ReportEH => beforeFactory
> ReportEH => beforeRender
> ScriptedDataSourceEH => beforeOpen
> ScriptedDataSourceEH => afterOpen
> ScriptedChartDataSetEH => beforeOpen
> ScriptedChartDataSetEH => describe
> [..cut...]
> ScriptedChartDataSetEH => onFetch
> ScriptedChartDataSetEH => fetch
> ChartEH => beforeGeneration
> ChartEH => afterGeneration
> [..cut..]
> ReportEH => clearLoggers : FACTORY CLEAR LOGGERS
>
>
> Przemys
|
|
|
Powered by
FUDForum. Page generated in 0.24675 seconds