Page-Break in Rich Text Format Control

Posted by: shrikant.nagpal on 3 March 2019, 8:25 pm EST

    • Post Options:
    • Link

    Posted 3 March 2019, 8:25 pm EST

    Hi,

    Can anyone please highlight how can we break a page(to next page) in a Rich Text Control in active Reports version 11?

    For instance:-

    We have a rich text box control. Our requirement is whatever HTML we write in this control ,must start from next page when we see the output in PDF format.

    Please revert as soon as possible.

    Thanks

    Shrikant

  • Posted 3 March 2019, 9:13 pm EST

    Hello,

    You can use the “Pagebreak” control to break the page before the RIchtTextBox.

    http://help.grapecity.com/activereports/webhelp/AR11/webframe.html#PageBreak.html

    Hope it helps.

    Thanks.

  • Posted 4 March 2019, 10:25 pm EST

    Hi Mohit,

    I tried using Pagebreak before and after the Richtextbox but it is adding the new blank page at the end of PDF file.

    This is not what is expected. We want to view our section(RichText Control) from the next page. (Currently different sections are being rendered on one page.)

    Please suggest how to use Pagebreak in this situation.

    Regards

    Shrikant

  • Posted 5 March 2019, 12:50 am EST

    Hello Shrikant,

    If you have the only “RichTextBox” in your section, you can set the “NewPage” property of the section to “Before”/“After”/“BeforeAfter”.

    Hope it will resolve your issue.

    Thanks.

  • Posted 5 March 2019, 2:56 pm EST

    Hi Mohit,

    We are using a SectionReport which is divided into PageHeader, Detail and PageFooter.

    Inside Detail, we are using multiple Rich Text Box controls. Now, we want to render the content of a Rich Text Box from the next or new page instead of rendering the entire content of different rich text boxes on a page in continuance.

    How can we use NewPage property in such scenario? We tried using NewPage property but it applies at Detail level and we can have one detail in one section Report I guess.

    Regards

    Shrikant

  • Posted 5 March 2019, 7:38 pm EST

    Hello Shrikant,

    Sorry, I thought you have only one RichTextBox in your detail section. Also, SectionReport can have only one detail section. It is very difficult for us to provide you the solution without looking into your actual report. Could you please provide the sample report so that I can run the report at my end and provide you the solution accordingly.

    Thanks.

  • Posted 6 March 2019, 9:35 pm EST

    Hi Mohit,

    We cannot provide you Report because data is publishing on report. Our Report will not work on your system as it is using services and db connectivity.

    We have given you the rough idea of our Report which is like:

    In our section Report, inside detail section, there are multiple Rich Text Boxes. After end of one Rich Text Box, we want our data of second Rich Text box to be rendered from new page while generating PDF.

    PFA the attachment link of our report:

    Query.zip

    Thanks

    Shrikant

  • Posted 7 March 2019, 11:46 pm EST

    Hello Shrikant,

    If this "it is adding the new blank page at the end of PDF file. " is the only problem while using the PageBreak then you can use the following code in report script.

    
    
    public void ActiveReport_ReportEnd()
    {
    	rpt.Document.Pages.RemoveAt(rpt.Document.Pages.Count-1);
    }
    
    
    

    Also, refer to the attached report.

    Thanks.test (2).zip

  • Posted 13 March 2019, 4:48 pm EST

    Hi Mohit,

    It is just adding one blank page at the end of the PDF and not doing the actual task of moving the Rich Text Box Content from one page to another.

    Regards

    Shrikant

  • Posted 14 March 2019, 12:21 am EST

    Hello Shrikant,

    Could you please confirm that have you refer the report in “Test(2).Zip” attached in the previous reply. I have used the 4 richtextbox and four page break, placed after each Richtextbox. And the below line remove the blank page at the last.

    
    public void ActiveReport_ReportEnd()
    {
    	rpt.Document.Pages.RemoveAt(rpt.Document.Pages.Count-1);
    }
    
    

    Also, please refer to the attached PDF generated from the above report.

    Thanks.

    RichTextBox.zip

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels