"New page after" by code
"New page after" by code
Hi.
Is there a way to set "New page after" by code,I need to create a report where user can select this.
Thanks.
Is there a way to set "New page after" by code,I need to create a report where user can select this.
Thanks.
"New page after" by code
Hi.
There is a method for starting of the new page in the EngineV2:
Engine.NewPage();
You can call it from any event inside the report.
Thank you.
There is a method for starting of the new page in the EngineV2:
Engine.NewPage();
You can call it from any event inside the report.
Thank you.
"New page after" by code
Thanks Edward,this works !!!
"New page after" by code
Please let us know if we could assist you any further.
Thank you.
Thank you.
"New page after" by code
Thanks Edward
I'm using this code in GroupFooter "After Print" event
It works fine but it gives me +1 page blank at the end.This is normal, I need a more complex validaton for last group of data but how I'll do that.
Thanks a lot !
I'm using this code in GroupFooter "After Print" event
Code: Select all
If var_NewPageGrp=1 Then Engine.NewPage()
Thanks a lot !
"New page after" by code
Hi
You can delete the last page from the collection of rendered pages in case if it is the empty page, for example. So you write the following code in the EndRender event of the report:
Thank you.
You can delete the last page from the collection of rendered pages in case if it is the empty page, for example. So you write the following code in the EndRender event of the report:
Code: Select all
StiPage lastPage = this.RenderedPages.Items(this.RenderedPages.Count-1);
if (lastPage.GetComponents().Count == 0)
{
this.RenderedPages.RemoveAt(this.RenderedPages.Count-1);
}
"New page after" by code
I can't convert this code to VB,I got errors ( error BC30469: Reference to a non-shared member requires an object reference.) and report is not compiled,I've tried this :
My version is 2008.2
Thanks.
Code: Select all
Dim lastPage As New Stimulsoft.Report.Components.StiPage
If lastPage.GetComponents().Count = 0 Then
Report.RenderedPages.RemoveAt(Report.RenderedPages.Count-1)
End If
Thanks.
"New page after" by code
Please modify the code as follows:
Dim lastPage As Stimulsoft.Report.Components.StiPage = Me.RenderedPages.Items(Me.RenderedPages.Count-1)
If lastPage.GetComponents().Count = 0 Then
Me.RenderedPages.RemoveAt(Me.RenderedPages.Count-1)
End If
And there is a report in the attachment.
Thank you.
Dim lastPage As Stimulsoft.Report.Components.StiPage = Me.RenderedPages.Items(Me.RenderedPages.Count-1)
If lastPage.GetComponents().Count = 0 Then
Me.RenderedPages.RemoveAt(Me.RenderedPages.Count-1)
End If
And there is a report in the attachment.
Thank you.
- Attachments
-
- 158.BeforePrintEvent.mrt
- (4.84 KiB) Downloaded 398 times
"New page after" by code
Thanks Edward
This time report is compiled but when it is run I got
"Exception has been thrown of target of an invocation"
If I remove the event code, report works as before.
Thanks
This time report is compiled but when it is run I got
"Exception has been thrown of target of an invocation"
If I remove the event code, report works as before.
Thanks
"New page after" by code
Thanks Eduard,it works.
One mention : page footer elements like text objects ( for page numbering ) are also counted in .GetComponents().Count
One mention : page footer elements like text objects ( for page numbering ) are also counted in .GetComponents().Count