Referencing a report parameter to hide a section's visibility

Forum Forums SI 2015 Reporting Referencing a report parameter to hide a section's visibility

This topic contains 3 replies, has 2 voices, and was last updated by  Richard Guinness 2 years ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #11490

    Richard Guinness

    Hi – I’ve created a new report parameter (boolean) and I’m trying to use it to allow me to easily hide or show my terms & conditions within a client proposal report.

    I’ve tried the following:

     Sub grpTermsAndConditions_Format

    ‘ Hide Terms And Conditions if necessary

    ReportUtilities.SetSectionVisibility(rpt, “grpTermsAndConditions”, showTerms)

    End Sub

    But have no success. I know that

    ReportUtilities.SetSectionVisibility(rpt, “grpTermsAndConditions”, false)

    works fine. So I expect I’m missing something very simple… perhaps to do with the declaration at the top of the file:

    Private showTerms As Boolean

    or the position of the Sub grpTermsAndConditions_Format

    Any help v much appreciated!


    Richard Guinness

    Is Naresh on here?


    Narayana Karthik


    You have missed the code to read the “ShowTerms” param value.

    I am assuming your report parameter “show terms & conditions” key is “ShowTerms”.

    In the ActiveReport Report start event procedure “Sub ActiveReport_ReportStart” add the following code to read the param value


     Dim showTermsParam As object = ReportUtilities.ReturnParameterValue(“ShowTerms”)

    If Not showTermsParam Is Nothing Then

    If Not Boolean.TryParse(showTermsParam.ToString, showTerms) Then

    showTerms = true

    End If

    End If


    Once you added the above code, “showTerms” report param will work in your custom report.

    Hope it helps.


    Narayana Karthik




    Richard Guinness

    Thank you Narayana! That’s done it. Really useful, thank you.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.