Configuring the Change color report

This example shows how to create modal buttons and store the selection in report variables for further processing.
  1. Create a new Application Studio report named Change Color.
  2. In the Properties - Report pane, set the Immediate Writeback option to Automatic.
  3. Create a report variable named Selection.
  4. Create a report variable named Save.
  5. In the properties of the variable, specify FALSE as the default value and select False as the value of the Is Persistent option. This disables the Save button until a new color is selected.
  6. Create a global variable named Result. This global variable transfers the selection from the dialog box to the main report.
  7. Specify Change Color in the B2 cell.
  8. Specify Green in the C5 cell, Yellow in the C6 cell, Blue in the C7 cell, and Red in the C8 cell.
  9. Insert this sample data into the F5:I7 cell range:
    Key Caption Enabled Style
    ID1 Cancel TRUE secondary
    ID2 Save FALSE primary
    Note: The dialog box has two buttons. The Cancel button is a secondary button, contains a gray text, and is always enabled. The Save button is a primary button, contains a blue text, and is disabled until a value is selected.
  10. Set the A1:D12 cell range to Visible Report Area.
  11. Set the A12:D12 cell range to Footer Area.
    This range holds the web extension. Change the height of this row to at least 50 pixels to make the web extension fit in.
  12. Insert the modal buttons web extension in the A12:D12 cell range.
  13. In the Format Web Extension dialog box, specify these values:
    Theme
    Specify ="Vibrant".
    Mode
    Specify ="Light".
    List of Items
    Specify =F6:F7.
    Item Data
    Specify =F5:I7.
  14. To save the color selection define action with these settings in cell C5:
    • Actions
      Type
      Specify Set parameters.
      Condition
      Specify =TRUE.
      Mode
      Specify Hyperlink.
    • Inputs/Options
      Refresh in web
      Specify Whole report.
    • Parameters
      Name
      Specify Selection.
      Property
      Specify Value(.Text).
      Value
      Specify C5.
      Name
      Specify Save.
      Property
      Specify Value(.Text).
      Value
      Specify =TRUE.
  15. Define the same action in cells C6, C7, and C8. Replace the cell coordinates respectively.
  16. To close the dialog box, define an action with these settings in the F6 cell:
    • Actions
      Type
      Specify Close dialog.
      Condition
      Specify =TRUE.
      Mode
      Specify Web Extension.
    • Inputs/Options
      Name
      Specify Dialog result.
      Value
      Specify OK.
  17. To save the selection before closing, define an action with these settings in the F7 cell:
    • Actions
      Type
      Specify Close dialog.
      Condition
      Specify =TRUE.
      Mode
      Specify Web Extension.
    • Inputs/Options
      Name
      Specify Dialog result.
      Value
      Specify OK.
    • Parameters
      Name
      Specify Result.
      Property
      Specify Value(.Text).
      Value
      Specify =ReportVariables.Selection.Text.
  18. Click OK.
  19. Save and view the report in a web browser.