ActiveReports 16 .NET Edition
ActiveReports 16 User Guide / How To / Page Report/RDL Report How To / Page/RDL Report Scenarios / Create Red Negatives Report
In This Topic
    Create Red Negatives Report
    In This Topic

    A Red Negatives report shows negative values in red color if those values meet the requirements set in a conditional expression. The following steps demonstrate how to create a report with negative values in red negatives.

    These steps assume that you have already added a Page Report/RDL Report template to your project, connected it to a data source and added a DataSet. See Basic Concepts, Connect to a Data Source and Add a Dataset for more information.

    1. From the Visual Studio toolbox, drag and drop a Table data region onto the design surface and place fields inside the cells of the details row.
    2. In the same Table, select any cell (Textbox) that displays integer values and right click to select Properties.
    3. In the Properties Window that appears, set the following expression in the Color property: =iif(Fields!FieldName.Value < 0, "Red", "Black")
      Note: In the expression above, FieldName refers to field that the textbox contains. For example, if a textbox contains the Rollup field, the expression looks like: =iif(Fields!Rollup.Value < 0, "Red", "Black")
    4. Go to the Preview tab and view the result.

    The following image illustrates a report that contains negative values in red:

    A Red Negatives report

    A Red Negatives report

    See Also