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 Posts May 4, 2016 at 8:36 am #11490 Richard GuinnessParticipant 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! May 4, 2016 at 11:27 am #11491 Richard GuinnessParticipant Is Naresh on here? May 4, 2016 at 11:51 pm #11492 Narayana KarthikParticipant Hi, 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. Regards, Narayana Karthik This reply was modified 2 years ago by Narayana Karthik. This reply was modified 2 years ago by Narayana Karthik. May 10, 2016 at 5:33 am #11503 Richard GuinnessParticipant Thank you Narayana! That’s done it. Really useful, thank you. Author Posts Viewing 4 posts - 1 through 4 (of 4 total) You must be logged in to reply to this topic.