Comments usually go into the Documentation() trigger in your report object, but sometimes you want to be able to also put comments in the RDLC layout.

For example when you have put controls behind each other and depending on a certain expression you change the visibility. In that case, when a modification needs to be done, the developer might not be aware that the change is also required in the hidden object. Adding a comment in the RDLC design might make this more clear.

This can be achieved for example by using the Report Properties window, in the Code tab. Here you can enter comments using the Visual Basic synthax, using the sign.

Sometimes you also see the REM command for comments, although it still works it is not really used that much.

Another way, although I prefer the first way, is to work with hidden textboxes, as in the next example:

Although it might be more clear to the developer where exactly they need to pay attention, even hidden textboxes can have an effect on the layout of the report at runtime, so only do this with care (and a lot of testing).

Leave a Reply

Post Navigation