Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to Set Subreport Column Visible False? (a2k (9.0.6926) SP-3 Jet 4.0 SP

    I have a report with Subreport.

    I use this Report to print two types of transactions:

    Subreport Transaction type 1, I want to print:

    <pre>Date Invoice Type Amount
    </pre>


    Subreport Transaction type 2, I want to print:

    <pre>Date Invoice Amount
    </pre>


    In the Report section I know which type of transaction Iím dealing with and would like some code to set the Subreport Type column visible = false

    Where and how does it go?

    Thanks, John

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: How to Set Subreport Column Visible False? (a2k (9.0.6926) SP-3 Jet 4.

    You can put code in the On Format event of the section that contains the Type control, e.g.

    Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    Me.Type.Visible = (SubreportTransactionType = 1)
    End Sub

    where SubreportTransactionType is the name of the variable or control that determines the transaction type.

  3. #3
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to Set Subreport Column Visible False? (a2k (9.0.6926) SP-3 Jet 4.

    That did it, for others here is the code to remove the labels

    Thank, John

    <pre>Private Sub Report_Open(Cancel As Integer)

    If gloGetValue("TypeOfCheck") = "VENDOR" Then
    Me.PatientLabel.Caption = ""
    Me.MemberLabel.Caption = ""
    Me.BenefitLabel.Caption = ""
    Me.FeeLabel.Caption = ""
    End If

    End Sub
    </pre>


    <pre>Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)

    If gloGetValue("TypeOfCheck") = "VENDOR" Then
    Me.curTBEN.Visible = False
    Me.curTBenTotal.Visible = False
    Me.curTFEE.Visible = False
    Me.curFeeTotal.Visible = False
    End If

    End Sub
    </pre>


Posting Permissions

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