Results 1 to 3 of 3

Thread: [Resoved] Suppress subreport

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Indiana
    Posts
    612

    [Resoved] Suppress subreport

    Does anyone know how to suppress a subreport in VB.Net 2003 using Crystal Reports 10 at runtime?

    Thanks
    Last edited by indydavid32; Jun 15th, 2004 at 03:11 PM.
    David Wilhelm

  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744
    You can't really suppress a subreport in runtime. But whatI've done in the past is this:

    My DataTable has an extra column that will tell me whether or not I have to suppress the subreport. Then while in CR designer, right click on the subreport you want to supress and select FORMAT. Check the suppress checkbox and then click on the formula button (X2). Within your script check for the column value:

    Code:
    if {YourDataTable.YourColumn} = "YourValue" then
        true

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    Indiana
    Posts
    612
    Thanks Serge. Lucky for me, the only thing in this section of my report was the subreport so I just supressed the entire section. For anyone interested, this is how I did it.
    VB Code:
    1. crpt.ReportDefinition.Sections(7).SectionFormat.EnableSuppress = True
    David Wilhelm

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width