[]
        
(Showing Draft Content)

Styles and Themes

With styles you can enhance the appearance of report controls such as tables and charts, and with themes, you can enhance the overall appearance of your reports.


Let us enhance the appearance of the following report:


Report without any style and theme

To Apply Style to a Table

Follow the below steps to apply style to a table data region.

  1. Select the Table data region.

  2. Go to the LAYOUT - Style property in the Properties pane.

  3. Select a Style, say, Light Style 1 Accent 5, from the drop down.

  4. Preview the report.

    Table with Built-In Table Style

Note: Style either uses constant values or values from Theme. Therefore, in case the Theme is changed - control view may also change if the control's Style uses values from Theme.

To Apply Theme to a Report

Follow the below steps to apply theme to a report.

  1. Select Report from the ribbon menu at the top of the design area.

  2. Click Switch Theme.

    Switch Theme Menu in Report Designer

  3. Select a theme, say, Cordial, or set the LAYOUT - Theme property of the report in the Properties pane. You can also pass expressions to display the report theme based on the organization or user context values, or the parameter values. Refer Using Expressions in Report Themes below for more details.

  4. To preview the report with, click the Preview button on the top left side of your screen. Notice that, all the text content including No Data Content inherits the font and color of the applied theme.

    Report with a Theme

Using Expressions in Report Themes

In a multi-tenant deployment, a user can dynamically change the document theme based on the user context.

Example: When a user in Tenant A runs the report, the theme should be set based on a user context value for that user/tenant, where the theme property of the report is an expression which can have organization/user context and parameter values. Whereas, when a different user in Tenant B runs the same report, the theme should be different based on that user's user context value.


So, a report will have an expression theme value that will be evaluated differently for different report parameter values or users/organizations, etc. This allows more customized reports catered towards different tenants in a multi-tenant deployment.

Steps to add an expression

  1. Log in to the Wyn application.( In this example we have taken an admin user with a username as admin).

  2. From the Documents section, select a report and click More. Then click Edit this report option. In this example, we are taking the Employee Sales Summary report.

    Report Designer is displayed.

  3. Select the report and click the Properties tab.

  4. Under the Layout section, click the Add Item Add Item against the Themes property.


    Add Item Themes Property

  5. Click the Data Binding option. A list is displayed.


    List Displayed

  6. Select the Expression option from the list.

    Layout-Themes Expression Editor is displayed.

    Layout Themes Expression Editor

  7. Enter the expression as per the user context. In this example, for the username admin, we have taken the theme as Warm and Active and the expression for this will be written as:

    {IIF(UserContext.GetValue("name") = "admin", "Warm", "Active")}

    Save Expression

  8. Click the Save button.

  9. Now save the report and preview it.

    The report theme that was set using the expression will be applied.

    Theme Applied

Now, let us log in to the Wyn application as another user say User1, who is not an Admin and follow the same steps as above from 2 to 6.

  1. Enter the expression as per the user context. In this example, for the username User1, we have taken the theme as Coral and Crisp and the expression for this will be written as:

{IIF(UserContext.GetValue("name") = "User1", "Coral", "Crisp")}

Theme User1

  1. Click the Save button.

  2. Now save the report and preview it.

    The report theme that was set using the expression will be applied.

    Theme Applied for User1

So, for the same report, different users ( admin and User1) have different themes.