How to Hide blank pages in report?

Stimulsoft Reports.NET discussion
Post Reply
faraz_nazem
Posts: 9
Joined: Sat Sep 24, 2016 4:29 pm

How to Hide blank pages in report?

Post 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?
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: How to Hide blank pages in report?

Post by Alex K. »

Hello,

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

Thank you.
faraz_nazem
Posts: 9
Joined: Sat Sep 24, 2016 4:29 pm

Re: How to Hide blank pages in report?

Post 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.
Attachments
Report4.mrt
(10.56 KiB) Downloaded 552 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: How to Hide blank pages in report?

Post 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.
faraz_nazem
Posts: 9
Joined: Sat Sep 24, 2016 4:29 pm

Re: How to Hide blank pages in report?

Post by faraz_nazem »

Thank you,
it works fine :)
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: How to Hide blank pages in report?

Post by Alex K. »

Hello

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

Thank you.
Post Reply