Custom Query Report Layouts

After creating a Custom Query report through either the Report Designer Query Editor or the Query Editor built into the browser-based administration interface, you can then design the report layout.

NOTE: This exercise introduces Report Designer’s basic design features. Familiarize yourself with these basic features to become proficient enough in the interface to try more advanced features. Refer to the Report Designer for WinForms in the following document: https://devexpress.github.io/dotnet-eud/interface-elements-for-desktop/articles/report-designer.html for a detailed overview of Report Designer’s features.

  1. Select the desired Custom Query report to design from the list.
  2. Click Design Report Layout.
  3. Create a report header.
    1. Place the pointer in the upper section of the layout grid.
    2. Right click and select Report Header in the Insert Band menu. A new Report Header band appears on the grid.
  4. Resize Page 1 and add a page break.
    1. Place the mouse pointer on the bottom border of the new band and, using the vertical ruler as a guide, extend the band to fill the first page (e.g., you can extend the border down to the 8" mark to fill the first page).
    2. Click and drag a Page Break from the Standard Controls region to the bottom of the band.
  5. Insert and design a chart.
    1. Click and drag a Chart from the Standard Controls region to the band to launch the Chart Designer.

    2. In the Chart Designer below the Chart menu, click the + that pertains to the Series option and select the Bar option.

    3. Click the Data tab and expand Query Results.
    4. Click and drag Category to the Argument cell.
    5. Click and drag cat_size to the Value cell.
    6. Click the Options tab and replace Series 1 with Category Size in the Name field.
    7. Click the XY-Diagram option below the Chart menu.
    8. Check the Rotated box in the Options tab.
    9. Select Titles below the Chart menu, then click the +, and select Title.
    10. Replace Chart Title in the Lines field under the Options tab with a more descriptive name (e.g., File Extensions by Category).
    11. Select Category Size below the Chart menu.
    12. Click the Properties tab, then scroll down and expand View under the Elements heading.
    13. Change the Color Each setting to Yes.
    14. Click OK.
    15. Click the arrow in the upper right-hand corner of the newly-placed chart to access the Chart Tasks menu, then select Run Designer.
    16. Click the legend and uncheck the Visibility box under the Options tab so that the legend no longer appears.
    17. Click OK.
    18. Expand the view of the chart in the Report Designer to take up more of the page.
  6. Insert labels.
    1. Click and drag Label from the Toolbox to a position centered below the chart.
    2. Double-click within the label and specify the label name (e.g., Total Size).
    3. Adjust the font size and style to your preferences.
  7. Create new fields.
    1. Expand the Query Results from the Field List.
    2. Right-click Query Results and select Add Calculated Field.
    3. In the Design region of the Property Grid for calculatedField1, change the (Name) setting to cfTotalSize.
    4. While still in the Property Grid, click the ellipses (...) pertaining to the Expression field under the Data heading to launch the Expression Editor.
    5. Select Functions in the bottom-left column.
    6. Type sum in the empty field at the top of the middle column to locate the Sum function, then double click Sum to place the function in the top text box of the Expression Editor.
    7. Select Fields in the bottom-left column, then double-click cat_size in the middle column.

    8. Click OK to save the new field and close the Expression Editor.
    9. Right-click Query Results and select Add Calculated Field.
    10. In the Design region of the Property Grid for claculatedField1, change the (Name) setting to cfTotalSize_String.
    11. While still in the Property Grid, click the ellipses (...) by the Expression field under the Data heading.
    12. Type Byte in the top text box of the Expression Editor so that ByteString() appears.
    13. Double-click cfTotalSize you created earlier from the middle column and click OK.
  8. Place the new fields.
    1. From the Field List, hold down the Control key and select the two new fields you just created, then drag them to the Total Size label on the grid.
    2. Adjust the size so that both fields appear to the right of the Total Size label.

    3. Adjust the font size and style to your preferences.
  9. Preview the report.
    1. Click Download All Data.
    2. When the warning dialog box appears, click Yes.
    3. Click the Print Preview tab to view how the report will look at this point.
    4. Make any desired format changes.
  10. Create a header for Page 2.
    1. Click the Report Designer tab.
    2. Scroll down below the page break so that you are working on Page 2 of the report.
    3. Right-click at the top of the page and select PageHeader in the Insert Band menu.
    4. Click and drag a Table from the Tool Box to the location of the new page header.
    5. Replace the names of the three new table cells with the following names:
      • Category
      • Size
      • File Count
    6. Select and right-click the File Count cell, then select Column to Right in the Insert menu.
    7. Change the table cell name to Percent of Total.
    8. Resize the table cells to your preferred width.
    9. Adjust the font size and style to your preferences.
    10. Resize the depth of the page header so it is limited to the depth of the table.
  11. Create a new calculated field for Percent of Total.
    1. Right-click Query Results and select Add Calculated Field.
    2. Change the (Name) setting for calculatedField1 in the Design region of the Property Grid to cfPercentofTotal.
    3. While still in the Property Grid, click the ellipses (...) by the Expression field under the Data heading.
    4. Double-click cat_string from the middle column of the Expression Editor.
    5. Hit the space bar and then enter the following string: * /100.
    6. Double-click cfTotalSize from the middle column of the Expression Editor to complete the string.
    7. Click OK.
  12. Insert the table content.
    1. Click below the header, hold down the Control key, and from the Field List, select the following fields in this order:
      • category
      • cat_size_string
      • file_count
      • cfPercentofTotal
    2. Drag the fields to a location below the header.
    3. Line up the tables cells with the headings.
    4. Click the Print Preview tab to view how the report will look.
    5. Make any necessary adjustments.
  13. Click Save to Database in the Save menu.

By saving the report to the database, you enable the File Reporter Report Generator to use the design for updated reports. You can also save the report as a file to import it into another file, such as a Word document or PowerPoint presentation.