Hi All,
I have a textbox control and a label control set in one report.
I set it’s visible property to ‘NO’.
I want it to be ‘Yes’ by checking some condition (dynamic).
Any body help me on how to set the visible property of the textbox/label to ‘Yes’ dynamically after meeting the condition statement ??
I think it has to be done by codding, but I do not get any way for it.
Any body help please…
Regards,
Abdul
Yes, you can create 2 sections
1 with above lable and 2 without lable
based on the condition show on of those sections…
hi,
done as you have suggested. successful !!.
what I exactly did is, I set these two controls in one section, and used CurrReport.SHOWOUTPUT feature.
Thank you [:D]
Regards
Teeyech
Hi Abdul,
Actually first you make the Auto Declaration as ‘Yes’ in Property of those controls and do not set the visible property “No” manually let it be “Yes”.
In report Init method just write the code like YourControl.Visible(No); for both lable as well as text. Then when you meet the condition just write the below code
YourControl.Visible(true); for both.
Regards,
Abbas
Hi Abbas,
Thank you buddy… this was what I was searching for, to enable/disable control.
I will try this too. and how about the area?? even if the controls are not visible in the printout, the area(location) allocated for those control will show as ‘blank’ ??[:O]
I practicing it too…
Thank you so much.
Regards,
Teeyech.
Hi Abbas,
There is no property option as ‘Auto Declaration’ for the txtbox and label in my navision. I am using 4.0 SP3 Navision
And, I set the auto enter option in to ‘yes’ instead. But, it does not allow me to set the visible property of the controls in code unit.
Below is the error message:
You have specified an unknown variable.
txtlinedsicount
Define the variable under ‘Global C/AL symbols’.
’
code I tried is:
lbllinediscount.Visible(FALSE);
txtlinedsicount.Visible(FALSE);
"Trans. Sales Entry".RESET;
IF “Trans. Sales Entry”.“Discount Amount”<>0 THEN
BEGIN
lbllinediscount.Visible(TRUE);
txtlinedsicount.Visible(TRUE);
END
Please help.
Hi Abbas,
Abdul is working on NAV and not AX
Hi mohana,
so, there is no option in the nav to enable or disable control dynamically in report ?.