Previously, the events order was as follows:Hello, here I believe it is a bit of misunderstanding. In 2016 we talked about this page numbers and everything was prepared (or fixed) perfectly.
Page.Rendering -> Report.Rendering -> Page.Added.
The correct number of the page is calculated before the Page.Added event, so in the Page.Rendering and Report.Rendering events the page number was incorrect.
Upon your request we have done the fix: we have added the StiOptions.Engine.FixPageNumberInEvents = true; option.
The events order has become as follows:
Page.Added -> Report.Rendering -> Page.Rendering
That is much more logical events order and everyone was absolutely happy with that!
After that fix was implemented, we have not changed anything in the events order nor in the page number calculations.
Correct, as it was mentioned above, the Page.Rendering event is now being called after the Page.Added.Change, that was done from 2016.1 to 2018.1 was, that in 2016 version, when variable value was set, it was read correctly via RenderedPages.PageAdded() event.
In 2018.1, page numbers are ok, but variable values, set in "page.render()" event, are not read properly.
Could you please explain this point in more details?I can not set/assign page events on "rendering engine". On this level, I have only "CompiledReport.Render()" event and RenderedPages.PageAdded().
Please note, that in the Page.Added event a new EMPTY page is being added.For example. I define variable "MyVariable". Inside report rendering, I define new variable value for each page(event Render() ), e.g. MyVariable = {PageNumber} + "newOrder";
Then in "rendering engine" event "CompiledReport.Render()", or "RenderedPages.PageAdded()", I read value of variable "MyVariable" and system variable "PageNumber".
Inside this (engine) event, PageNumber and MyVariable value must have have same values, that are also rendered on currently added page
The page content will start its rendering only after the Page.BeforePrint event.
The report engine does have its complexity and some specifics, that is true. But in order to suggest you the correct events for your task, we need to understand your task better.
We are here to help you to solve the problem you faced. Could you please give us an example, so we could provide you with a good solution?
Thank you,
Edward