PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • HFSQL view associated with a report
  • Memory area associated with a report
  • Embedded query/Independent query
  • Limits
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
The SourceName property is used to:
  • Get the name of the report data source.
  • Change the report data source.
Reminder: the name of the data source for the report can correspond to:
  • the name of a data file (reports based on a data file, view or memory area).
  • the name of a text file (for the reports based on a text file with automatic reading of records).
  • the name of a query.
  • a Table control found in a window.
The data source of a report can be a query of a data file.
Remark: From version 19, HFSQL is the new name of HyperFileSQL.
Versions 21 and later
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
Universal Windows 10 App This property is now available in Universal Windows 10 App mode.
Example
// Change the data file associated with the report
// Switch from Customer data file to Prospect data file
RPT_CustomerReport.SourceName = Prospect
// Change the view associated with the report.
// This view is based on the Prospect data file.
RPT_CustomerReport.ViewName = MyCustomerView84
// Change the data source of "RPT_CustomerTableReport"
// (Report based on table)
RPT_CustomerTableReport.SourceName = "WIN_MyWindow.TABLE_ProspectTable"
// Change the data source of "RPT_CustomerReport"
RPT_CustomerReport.SourceName = QRY_ParisCustomerQuery
Syntax

Getting the name of the report data source Hide the details

<Result> = <Report used>.SourceName
<Result>: Character string
Name of the data source for the specified report:
  • Name of the data file associated with the report. If the report is associated with an HFSQL view or a memory area, name of the base file for the view or memory area.
  • Name of a query.
  • Name of the text file (for the reports based on a text file with automatic reading of records).
  • Name of the Table control used as report source (in the following format: WindowName.TableName).
<Report used>: Report name
Name of the report to be used.

Changing the data source of a report Hide the details

<Report used>.SourceName = <New data source>
<Report used>: Report name
Name of the report to be used.
<New data source>: Character string
New data source for the specified report:
  • Name of the data file associated with the report. If the report is associated with an HFSQL view or a memory area, name of the base file for the view or memory area.
  • Name of a query.
  • Name of the text file (for the reports based on a text file with automatic reading of records).
  • Name of the Table control used as report source (in the following format: WindowName.TableName).
Remarks

HFSQL view associated with a report

When the report is based on an HFSQL view, only the name of the data file corresponding to the view is specified in the report description. The name of the view is specified when printing the report.
  • the SourceName property is used to get the name of the data file associated with the report.
  • the ViewName property is used to get the name of the HFSQL view associated with the report.
For more details on reports based on HFSQL views, see Report on HFSQL view.

Memory area associated with a report

When the report is based on a memory area, in the report description, only the name of the data file corresponding to the memory area is specified. The name of the memory area is specified when the report is printed.
  • the SourceName property is used to get the name of the data file associated with the report.
  • the MemZoneName property is used to get the name of the memory area associated with the report.
For more details on reports based on memory areas, see Report on memory area.

Embedded query/Independent query

When creating a report, two types of queries can be used:
  • an embedded query directly created in the report editor. This internal query is not visible in the project. The name of this query has the following format: "<Report name>$Query". For example: "CustomerReport$Query".
  • an independent query already created in the project, in the query editor.

Limits

  • You cannot:
    • change the type of the data source. For example, if the data source is a query, the new data source cannot be a view.
    • change the data source of a report based on a data file.
  • The modification of the data source can only be performed in the report "Opening" event.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment