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

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » How to Set Subreport Column Visible False? (a2k (9.0.6926) SP-3 Jet 4.0 SP

    Author
    Topic
    #452384

    I have a report with Subreport.

    I use this Report to print two types of transactions:

    Subreport Transaction type 1, I want to print:

    Date Invoice Type Amount
    

    Subreport Transaction type 2, I want to print:

    Date Invoice          Amount
    

    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

    Viewing 0 reply threads
    Author
    Replies
    • #1116843

      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.

      • #1116874

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

        Thank, John

        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
        
        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
        
    Viewing 0 reply threads
    Reply To: How to Set Subreport Column Visible False? (a2k (9.0.6926) SP-3 Jet 4.0 SP

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: