Invisible control in a report

dulamandulaman Member Posts: 73
Hi,

I'd like to change dynamically by using the VISIBLE function a control in a report when it fills a certain condition. Is this possible? Am I asking too much to Navision?
-- dulaman
"I don't want to believe. I want to know." (Carl Sagan)

Answers

  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    You can define a variable instead of a label and populate it whenever you want to show it.

    You cannot turn a control on and off like on a form.
  • jaisajaisa Member Posts: 6
    hi, my english is not good, but i find with the same problem.
    My solution is the next one.
    I defined Text Constants and a variable.
    TextConstant:
    Name: TextConstant1 Value: %1
    Variable:
    Name: Line

    This Line is link with the textbox in the report.

    In the C/AL Code i work
    IF Condition is true THEN
    Line := SUBSTRNO(TextConstant1,Line)
    ELSE
    Line := '';


    I hope that this example is useful.
    Jacinto Aisa
  • dulamandulaman Member Posts: 73
    Aaagh!! ](*,)

    Thank you Mark & jaisa, the answer was there but I was too tired (not to mention too stupid?) to find it out!! #-o
    -- dulaman
    "I don't want to believe. I want to know." (Carl Sagan)
  • KowaKowa Member Posts: 925
    You can also make a copy of the section, delete the control in question
    and put
    Currreport.ShOWOUTPUT(MyCondition)
    in the OnPreSection trigger of the new section
    Currreport.ShOWOUTPUT(NOT MyCondition)
    in the OnPreSection trigger of the original section
    Kai Kowalewski
  • dulamandulaman Member Posts: 73
    =D> =D> =D>

    You're a genius!
    -- dulaman
    "I don't want to believe. I want to know." (Carl Sagan)
  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    Yes, that is the simple solution. But please remember that there is a maximum no. of sections and your report shoud be maintainable.
Sign In or Register to comment.