Unlike forms there are no dynamic option in reports. You will need to make 2 section and hide one if you are using a label. If you are using a tablebox you can link it to a variable and change that. It depends whether your data is in the headersection or the bodysection.
If you want to show/hide the Level / Text box dynamically, you need to put them on a seperate section. For eg. you want to show/hide a Text box on Header section, Just create a new header section below the current Header and put the control on that. Write the code in OnPreSection of newly created section -
What i would do is create a function to controller the the condition of showing or not of a textbox. then only thing we need to do is set that textbox sourceexp as the function.
Comments
You can change SourceExpr of the component. And then, restore it again.
You can look at this post. It's about your qüestion.
http://www.mibuso.com/forum/viewtopic.php?t=424
See you!
Controls on the RequestOptionForm can be directly manipulated at runtime
GD
If you want to show/hide the Level / Text box dynamically, you need to put them on a seperate section. For eg. you want to show/hide a Text box on Header section, Just create a new header section below the current Header and put the control on that. Write the code in OnPreSection of newly created section -
CurrReport.Showoutput(ShowCondition)
Best of Luck
Mukesh Verma
I think this is much easier than creating another Section to set the SHOWOUTPUT function accordling to your condition.
D365 Business Central Solutions Architect
BC AL/NAV C/AL Developer
BC Repositories.com