Table Information

This section provides information about tables that you might find useful when using Advanced Reports.

Target Table Role in Advanced Reports

This section describes how target tables are used when creating Advanced Reports.

When you submit the Advanced Report Profile, the Advanced Engine starts. An instance of the Concentration Engine is submitted for each underlying Report Profile in the Advanced Report Rules. When the underlying Report Profiles finish, the data for each Report Profile is stored in a text file. The location of this file (working folder/logs/ccentrat/) is sent back to the Advanced Reporting Engine. The Advanced Reporting Engine grabs each text file and converts each file into an Access table—namely, the target table named in the Advanced Report Rule. Thus, each text file is put into its own table. The other four default tables are already created (PCRE_TOC, PCRE_PARM, PCRE_PKG, and PCRE_RPTS). Each text file is then automatically deleted from the server.

Each mdb file (the database that contains each of these tables) is compressed and stored on the server in ADVZ format (Advanced Report format).

The Save to Access function in the Advanced Report Profile saves a copy of the uncompressed file on the user’s local machine. The four default tables are then populated as the reports are imaged. For example, if any Advanced Reporting Options are added to one or more of the Advanced Report Rules, these options and option values are added to the PCRE_PARM table.

The PCRE_PARM Table

The PCRE_PARM (default table) displays options, option types, and values used in latest submission of Advanced Report Profile. Four option types are: code (C), numeric (N), text (S), and date (D).

All of these values have a parmset value of 0 to distinguish them from any user-defined or report-specific option values.

This table also contains the following default data values:

  • pcre_event_name. The event name from PACE_MASTER.DBO.EVENTS for the Advanced Reporting Engine.

  • pcre_run_mode. The run mode for the report: ADV for Advanced Reporting, CR for Client Reporting.

  • pcre_sd_inst. The schedule_def instance of the Advanced Reporting request.

  • pcre_sq_inst. The schedule_queue instance of the Advanced Reporting request.

The PCRE_PKG Table

The PCRE_PKG (default table) displays runtime information, such as Advanced Report Profile name, Start and End Date (when report was run by User), the Effective Date used in the report, and profile ID, as shown below.

The PCRE_PKG Table

The PCRE_RPTS Table

The PCRE_RPTS (default table) displays each underlying PACE Report Profile Name and the Rules used with those profiles

PCRE_RPTS Table

For each profile, the following information is provided:

  • Profile Instance

  • Table associated with the underlying Report Profile

  • Effective dates from the underlying Report Profile

  • Report Rule Name

  • Source Rule Name

  • Field Rule Name

  • Grouping Rule Name within Report Profile

  • Selected Entity or Client

The PCRE_TOC Table

The PCRE_TOC (default table) displays the following information for each Advanced Report Rule in the Advanced Report Profile:

  • Name of each Advanced Report Rule

  • Sequence #

  • Number of pages

  • Start page

  • Name of Project associated with each Advanced Report Rule

The PCRE_ENTITIES Table

The PCRE_ENTITIES table is located in the PCRETEMPLATE.MDB file. This table allows you to add entities to an Advanced report profile even if the Advanced report rule does not contain an OLAP profile. You can create a report that gets data directly through the API but still can add entities to the profile.

The SAMPLE Table

This is the target table used during the design phase for the Get Fields function and also in conjunction with the Advanced Report Tester. A sample is shown below.

Work With the Visual Basic .NET Code

To use the Visual Basic .NET code for a project:

  1. Click the ProjectName.vb tab in the ActiveReports design session to view the code for the project that can be used to define report options. Select the object and procedure from the drop‑down menus.

  2. To change the page orientation, select the (Project Name Events) object and the ReportStart procedure and enter one of the following lines of code.
    Me.PageSettings.Orientation = PageOrientation.Landscape
    Me.PageSettings.Orientation = PageOrientation.Portrait

  3. To add dynamic page numbering when there is more than one designer, create a label in the report footer section of the report, and change the (Name) property of the label to lblPageNumber. Format the label to change font size, position, and alignment.

  4. Select the project name object and the declarations procedure and enter the following code:
    Private m_start_page as long

  5. Select the PageFooter object and the format procedure and enter the following code:
    Dim m_conString As String = m_report_info.DatabaseLocation
    m_conString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source = " & m_conString & " ;Persist Security Info=False"
    Dim c_cnn As System.Data.OleDb.OleDbDataAdapter
    Dim oDBAdapter As System.Data.OleDb.OleDbDataAdapter
    Dim oDS As DataSet
    Dim sql As String
    sql = "select [start_page] from pcre_toc where id = " &
    m_report_info.TocID
    oDBAdapter = New System.Data.OleDb.OleDbDataAdapter(sql, m_conString)
    oDS = New DataSet
    oDBAdapter.Fill(oDS)
    m_start_page = oDS.Tables(0).Rows(0).Item(0)
    lblPageNumber.Text = "Page " & Me.PageNumber + m_start_page - 1

  6. To add a subreport, add a second designer to the project. Click Add New Item on the Project menu. In the Add New Item window select ActiveReports File from the Templates panel.

  7. Click Subreport in the Toolbox toolbar. Drag the subreport object into a section of the main report.

  8. Switch to the code view of the main report designer and select the object where the subreport control was placed. Select the format procedure, and enter the following code:
    Dim rpt As New “subreportname”
    rpt = New “subreportname”
    Me.SubReport1.Report = rpt

  9. Replace subreportname with the name of the designer that is to act as the subreport.

  10. Format the designer that is to act as the subreport. Do not place any controls into the ReportHeader or ReportFooter sections of that designer, since these are not imaged through the subreport process.

  11. Save the formatting changes. To compile the project and create the DLL, click Build/Build projectname.