Page 1 of 1

How to Hide blank pages in report?

Posted: Sat Sep 24, 2016 5:00 pm
by faraz_nazem
hi,
I have a business object like this:

Code: Select all

    
public class MyDocuments
    {
        public string Fname { get; set; }
        public string Lname { get; set; }
        .
        .
        .
        public byte[] Image1{ get; set; }
        public byte[] Image2 { get; set; }
        public byte[] Image3 { get; set; }
        .
        .
        .
         public byte[] ImageN { get; set; }
    }
I have a report with a page for each image property (page2,page3,page4) ,
each page after page1 have a image control bound to a image property of my business object.
I need to hide (in any possible way) page when its related image is null, to hide the blank pages
when showing or printing report.
How can i do this?

Re: How to Hide blank pages in report?

Posted: Sun Sep 25, 2016 9:42 am
by Alex K.
Hello,

Can you please send us a simple report which reproduces the issue for analysis.

Thank you.

Re: How to Hide blank pages in report?

Posted: Wed Nov 02, 2016 12:50 pm
by faraz_nazem
Hi,
I'm sorry I'm late reply.
in this report, i want to invisible each page if related property is null.

Re: How to Hide blank pages in report?

Posted: Wed Nov 02, 2016 2:08 pm
by HighAley
Hello.

You could set the Enabled property of the page to false at the Before Print event.
Maybe we don't understand your issue right.
Could you send us a screenshot of the issue and specify which property you need to check?

Thank you.

Re: How to Hide blank pages in report?

Posted: Sat Nov 05, 2016 9:44 am
by faraz_nazem
Thank you,
it works fine :)

Re: How to Hide blank pages in report?

Posted: Sun Nov 06, 2016 2:35 pm
by Alex K.
Hello

We are always glad to help you!
Let us know if you need any additional help.

Thank you.