Search code examples
genexus

Rendering checkbox in PDF Report


I need to show checked and unchecked checkboxes in a PDF report, generated with GeneXus. The checkbox layout (checked or unchecked) depends by the boolean value of the relative variable. How I can do that? I'm using a Procedure.

Thanks!


Solution

  • The solution can be this:

    • include two image in the project (unchecked checkbox and checked checkbox)
    • adding one image variable in the procedure for each checkbox
    • putting the image variable in the report layout
    • change the image in the variable with code like this:

      if(&booleanVariable) &imageVariable.FromImage(checked_Image) else &imageVariable.FromImage(unchecked_Image) endif

    I hope this can be useful for you.