If you create a client report definition (RDLC) layout for a report, blank lines that appear in the Classic report layout do not appear in the RDLC layout. To add blank lines to an RDLC report layout, you must add a BlankLineCounter section to the Classic report layout. Next, you must add lines to the table in the new layout and modify the expression in the Visible field in each line to specify the conditions on which to display the blank lines.

An example of a report in the standard application to which a BlankLineCounter is added in the Classic report layout and blank lines are added in the RDLC report layout is report 1, Chart of Accounts.

Before you begin this procedure, you must create a layout suggestion. For more information, see How to: Create a Layout Suggestion.

To add a BlankLineCounter section to a report

  1. In the Classic client, on the Tools menu, click Object Designer.

  2. In Object Designer, click Report, select the report that has blank lines, and then click Design.

  3. On the View menu, click Sections.

  4. In Section Designer, select the section above or below which you want to add blank lines, click the Edit menu, and then click New.

  5. In the Insert New Section window, in the Data Item field, select BlankLineCounter from the drop-down list.

  6. Under Section Type, select Body.

  7. Under Insert Section, select the location where you want to insert the blank lines, and then click OK.

  8. On the File menu, click Save.

  9. In the Save window, select the Compiled check box, and then click OK.

To add blank lines to a report.rdlc file

  1. In Object Designer, click Report, select the report that has blank lines, and then click Design.

  2. On the View menu, click Layout.

  3. In Microsoft Visual Studio, in the Report.rdlc file, select the table row where you added the BlankLineCounter section.

  4. Above the row that you selected in step 3, insert the maximum number of blank lines that you want inserted between lines.

  5. For each blank line that you added, do the following to adjust the height and the conditional visibility:

    1. Select the line.

    2. On the View menu, click Properties Window.

    3. In the Properties window, under Layout, enter 0.423cm in the Height field.

    4. In the Properties window, under Visibility, in the Hidden field, select <Expression…> from the drop-down list.

    5. Enter a conditional statement in the Edit Expression window so that the line is not hidden if the number of blank lines is great than 0 for the first line, or greater than 1 for the second line, and so on. The following statement is an example of the expression.

        CopyCode imageCopy Code
      =IIF(Fields!G_L_Account___No__of_Blank_Lines_.Value>0,FALSE,TRUE)
      
  6. Save and compile the report. For more information, see How to: Integrate Classic Client Report Designer and Visual Studio Report Designer.

See Also