SQL Select Statement - Query Tab
<< Click to Display Table of Contents >> SQL Select Statement - Query Tab |
![]() ![]() ![]() |
The Query tab allows you to modify the different portions of the Select statement. Each edit control on the tab represents a particular clause on the SQL Select statement. The purpose and functionality of each edit control is outlined in the following table.
Select Clause |
Description |
Select |
By default, ReportPro retrieves only physical columns from an SQL data source. Some data sources, however, support calculated columns that are not accessible through ReportPro's design environment. This edit allows you to retrieve these calculated columns and system variables. The columns you define here are accessible in the report with the RpSQLCol() function. For example, if you specify Count(*) here, you could access that column in a report with the expression: RpSQLCol(1). |
From |
This edit allows you to modify the From clause. This information is automatically maintained by ReportPro and normally should not be modified. |
Where |
ReportPro splits the Where clause in two sections. This edit allows you to modify the table join portion of the Where clause. This section is automatically maintained by ReportPro and normally should not be changed. |
Filter |
This edit allows you to specify the selection portion of the Where clause. This is where you would place any filter expression that you want to be processed by the SQL server. |
Group By |
This edit allows you to modify the Group By clause. This information is passed directly to the server and is not used by ReportPro. |
Having |
This edit allows you to modify the Having clause. This information is also passed directly to the SQL source and is not used by ReportPro. |
Order By |
This edit allows you to modify the Order By clause. If you specify a sort order, it is sent to the server as part of the Select statement regardless if you have specified a Sort Order for the current section. If you specify a sort order here and at the section level, the data will be sorted first by the SQL server and then again by ReportPro before the report is printed. |
Union |
This edit allows you to modify the Union clause. This information is passed directly to the server and is not used by ReportPro. |
Distinct |
This option forces ReportPro to issue SELECT DISTINCT .... |
Set NULLs to default value |
When this option is selected, ReportPro converts NULLs to the default value for the data type of the column. For example, when a NULL is encountered in an integer column it is converted to zero. When a NULL is encountered in a character column it is converted to "". |
Delimit With |
This edit allows you to change the character delimiter used for the column names. This information is retrieved from the ODBC driver and normally should not be modified. |
Also See: