ActiveReports 10
Overflow Data in a Single Page(Page Report)
ActiveReports 10 > ActiveReports User Guide > Samples and Walkthroughs > Walkthroughs > Page Report/RDL Report Walkthroughs > Layout > Overflow Data in a Single Page(Page Report)

In a Page Report, ActiveReports allows you to arrange the OverflowPlaceHolder controls at any location on the same page along with the host data region to build a rich report layout. The following walkthrough demonstrates this by using a Table data region and three OverflowPlaceHolder controls on a single page to create a columnar display.

This walkthrough is split into the following activities:

Note: This topic uses the Movie table in the Reels database. By default, in ActiveReports, the Reels.mdb file is located at [User Documents folder]\GrapeCity Samples\ActiveReports 10\Data\Reels.mdb.

When you complete this walkthrough you get a layout that looks similar to the following at design time and at runtime.

Design Time Layout

Notice that the runtime report layout below is similar to the one you see at design time except for the data which you see at runtime or when you preview the report.

Runtime Layout

To add an ActiveReport to the Visual Studio project

  1. Create a new Visual Studio project.
  2. From the Project menu, select Add New Item.
  3. In the Add New Item dialog that appears, select ActiveReports 10 Page Report and in the Name field, rename the file as rptColumnarLayout.
  4. Click the Add button to open a new fixed page report in the designer.

See Adding an ActiveReport to a Project for information on adding different report layouts.

To connect the report to a data source

  1. In the Report Explorer, right-click the Data Sources node and select the Add Data Source option or select Data Source from the Add button.
  2. In the Report Data Source Dialogthat appears, select the General page and in the Name field, enter a name like ColumnData.
  3. On this page, create a connection to the Reels database. See Connect to a Data Source for information on connecting to a data source.

To add a dataset

  1. In the Report Explorer, right-click the data source node and select the Add Data Set option or select Data Set from the Add button.
  2. In the DataSet Dialog that appears, select the General page and enter the name of the dataset as MovieList. This name appears as a child node to the data source icon in the Report Explorer.
  3. On the Query page of this dialog, in the Query field enter the following SQL query.
    SQL Query
    Copy Code
    SELECT * FROM Movie
    
  4. Click the Validate DataSet icon at the top right hand corner above the Query box to validate the query.

  5. Click OK to close the dialog. Your data set and queried fields appear as nodes in the Report Explorer.

To create a layout for the report

  1. In the Visual Studio toolbox, go to ActiveReports 10 Page Report tab and drag a TextBox control onto the design surface.
  2. Select the TextBox control and go to the properties window to set the following properties. This TextBox functions as the title in the report layout.
    Property Name Property Value
    Location 0in, 0in
    BackgroundColor DarkCyan
    Font Normal, Arial, 20pt, Bold
    Size 6.5in, 0.5in
    TextAlign Center
    Value Movie Database
    VerticalAlign Middle
  3. From the Visual Studio toolbox, drag and drop a Table data region onto the design surface and set its following properties in the properties window.
    Property Name Property Value
    Location 0.125in, 1in
    BackgroundColor Azure
    RepeatHeaderOnNewPage True
    Size 3in, 0.66in
    FixedSize 3in, 3.5in
    OverflowName OverflowPlaceHolder1
    Note: Set this property after you add the OverflowPlaceHolder1 to the design surface in the next step, to handle the data that exceeds the fixed size of the Table data region.
  4. In the Table data region, right click the footer row and select Table Footer from the context menu to delete the unnecessary footer row.
  5. In the table details row, add the following fields using the field selection adorner:
    Cell Field Name
    Left Title
    Center YearReleased
    Right UserRating
  6. In the table details row, select the left cell containing the Title field and go to the Properties window to set the ShrinkToFit property to True. This will avoid clipping of longer movie titles and fit the string in the same cell in a smaller font size.
  7. In the design view, select the following rows of the Table data region by clicking the table handle to the left of the row and go to the Properties window to set the following properties:
    Row Property Name
    TableHeader BackgroundColor: PaleTurquoise
    BorderStyle: Solid
    FontSize: 10pt
    FontWeight: Bold
    TextAlign: Left
    TableDetail BorderStyle: Solid
    TextAlign: Left
    FontSize: 9pt
  8. From the Visual Studio toolbox, drag and drop three OverflowPlaceHolder controls onto the design surface and the set the following properties in the Properties window for each of them so that the data appears in a columnar format.
    Control Name Property
    OverflowPlaceHolder1 Location: 3.375in, 1in
    OverflowName: OverflowPlaceHolder2
    Note: Set this property after you add the OverflowPlaceHolder2 to the design surface.
    OverflowPlaceHolder2 Location: 0.125in, 5in
    OverflowName: OverflowPlaceHolder3
    Note: Set this property after you add the OverflowPlaceHolder3 to the design surface.
    OverflowPlaceHolder3 Location: 3.375in, 5in
    Note: Notice that the OverflowName property is set to link each OverflowPlaceHolder control to the next one.

To view the Report

OR

See Also