How to an option always appears non-market on run report

markyTmarkyT Member Posts: 120
Hello, I think this/s easy. I've a report with an option on request form. Each time that I mark the option it remains marked for the next time. Is there any way to this option always appears non-market on run report?.
Thank you.

Comments

  • SavatageSavatage Member Posts: 7,142
    Go into the designer

    View->Request Form->f9

    add code
    on init or onopenform..(didn't test)
    Myoption := Myoption::"Non-Market"; or whatever the option is called.
  • DenSterDenSter Member Posts: 8,304
    You could also try turning off all the save options on the request form.
  • garakgarak Member Posts: 3,263
    DenSter wrote:
    You could also try turning off all the save options on the request form.


    <- thats also possible, but markyT doen't forgett,if you have other controls on the req.form, where the user can define anything and this should be stored for the next run, these are also be reseted to the "default"
    Do you make it right, it works too!
  • markyTmarkyT Member Posts: 120
    Thanks both for reply. Both options are ok; but in case: Myoption := Myoption::"Non-Market"; what function is "Not-Market", you mean True or false or so?.
    Thanks for help.
  • garakgarak Member Posts: 3,263
    What Harry mean is:

    1. Option Variable like "MyOptionVar" with Options " ,Option1,Option2"
    2. On the RequestForm a textBox or RadioButtons with the SourceEXPr = MyOptionVar
    3. OnInit() MyOptionVar := MyOp0tionVar::"";

    So, the Option BLANK is ever the default.
    Do you make it right, it works too!
  • markyTmarkyT Member Posts: 120
    Perfect!!, well, ni my case it's a boolean type, then I've put "no" and It runs perfectly, and it goes on OnOpenForm.
    Thanks both for help.
  • DenSterDenSter Member Posts: 8,304
    That trigger will work, but in my opinion a better place for this type of thing is the OnInitReport trigger. Make it a habit to always put variable initialization for reports in that trigger, and your objects will be cleaner and easier to maintain. Then use the OnPreReport to process variables from the request form. Use form triggers only for display code.
Sign In or Register to comment.