RpReport:Init() - Runtime Mode Method
<< Click to Display Table of Contents >> RpReport:Init() - Runtime Mode Method |
![]() ![]() ![]() |
Purpose
Construct a RpReport object.
Syntax - RDD Only Library
RpReport{oOwner, cFilename, [cDatapath], [aDbfSwap]} SELF
Syntax - RDD/SQL Library / Linkable Design Library
RpReport{oOwner, cFilename, [cDatapath], [aDbfSwap], [cUserID], [cPassword]} SELF
Syntax - Linkable Design Library (Report Design Init)
RpReport{oOwner, aTables} SELF
Arguments
oOwner | The window that owns the RpReport object |
cFilename | The full path and filename of the report file created by ReportPro |
cDatapath | Optional path for the database. This parameter will override the table path(s) stored in the report file. This parameter applies only to RDD tables. |
aDbfSwap | Allows you to swap out the tables used in the report. While this parameter applies primarily to RDD tables, it can also be used to substitute tables in a SQL query. |
Any value of the array that you do not wish to change should be specified as NIL. If you specify NULL_STRING, the value will be changed to the empty string value.
The format of the array is:
{{RPAlias, Table File, Index File, Index Tag, RDD, RDDAlias}, {...}, ...} |
RPAlias |
The alias which ReportPro has assigned to the table. This character value can be found in the Setup Sections dialog. This is the key used to designate which table in the data set is being replaced so it must exactly match the ReportPro alias. |
Table File |
The complete path and file name of the substituted table. |
Index File |
The index file to use in place of the index filename specified in the Setup Sections dialog. |
Index Tag |
The index tag used in conjunction with the Index File specified above. If the Index File is specified, you must specify a Tag for DBFCDX and DBFMDX RDDs. |
RDD |
The RDD to use with this table. |
RDDAlias |
When specified, this element forces ReportPro to use an already open DBF table instead of opening the one specified in the report. This element can be the alias name, the work area number or the DBServer of the already open table. |
cUserID | Optional User ID used when ReportPro connects to a SQL server. If this parameter is not specified, ReportPro will use the user ID saved in the report file. |
cPassword | Optional Password used when ReportPro connects to a SQL server. If this parameter is not specified, ReportPro will use the password saved in the report file. |
Description
Creating a RpReport object initializes a report by reading information from the specified report file. You should check the IsValid access of the returned object to make sure the report initialized correctly and a valid printer object is available.
Example
// Instantiate a report object for the invoices example report
oRpReport := RpReport{oMainWindow, "C:\RP2\INVOICES.RPT"}