Changing the Default for a checkbox. "Print Company Address"?

I am looking to change the default for a checkbox in the Options Tab on some of the Reports. When you go to print a Report by default “Print Company Address” is unchecked. I would like to make it so that the employees don’t have to check this box each time they run a report. Where / How do I modify the defaul for the “Print Company Address” checkbox?

6406.PrintCompanyAddress.bmp (298 KB)3441.PrintCompanyAddress.bmp (298 KB)

Thanks,

Andy

You’re going to have to learn how to figure these things out. First, the Options tab is the Request Form in the report designer. So when you have the report open in design mode, you go to View, Request Form to see the design of the options tab. Then, you click on the checkbox and open the properties page. Scroll down to the SourceExpr property, and you will see which variable is tied to this control.

By default, a boolean variable has a value of FALSE (or No, which means ‘not checked’). If you want this to be changed to TRUE (or Yes, or ‘checked’), you will have to program the report to set this value. Now where you do this is important, because you want it to be set before the request form is displayed, which is during the OnInitReport trigger. Go to the first empty dataitem line of the report designer and hit F9, which opens the C/AL editor with the report triggers. This is where you would put a line of C/AL code to set the value.

See if you can figure out what the code is. Good luck :slight_smile:

The default values are all set in the OnOpenForm trigger.

You can access them using F9 or the C/AL code icon.

Is that OK now?