ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Reports & Queries
  • Overview
  • Distributing Reports & Queries with your WINDEV application
  • Translating the names of data files and items
  • Detailed steps
  • Step 1: Configuring the project
  • Step 2: Configuring the analysis: Visible data files and items
  • Step 2 bis: Configuring the analysis: Translating the names of files and items
  • Step 3: Report settings
  • Step 3 bis: Configuring queries
  • Step 4: Creating the executable and distributing the application
  • Step 5: Installing the WINDEV application on the end-user computers
  • Customizing the download address
  • Using Reports & Queries
  • Starting Reports & Queries
  • Configuring the options of data files
  • Principle for using reports
  • Modifying a report
  • Using a modified report
  • Using a new report
  • Multilingual names of items and files
  • Principle for using queries
  • Modifying an application query
  • Using a new query
  • Multilingual names of items and files
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
Overview
This chapter presents the operations that must be performed in order for a WINDEV application to be handled by Reports & Queries.
"Reports & Queries" is free and can be distributed with your WINDEV applications. For more details, see the license about the distribution and use conditions.
Remark: This help page is intended for WINDEV application developers.
Distributing Reports & Queries with your WINDEV application
To distribute Reports & Queries with your own WINDEV application, the provider of the WINDEV application must:
  • Specify in the project that the application allows Reports & Queries to be run.
  • Define in the analysis the data files and items that can be handled by Reports & Queries and (if necessary) the names of data files and items available in the different languages.
  • Define the reports that can be modified in Reports & Queries.
  • Define the queries that are visible in Reports & Queries.
  • Create the executable and the setup program of the WINDEV application.
  • Install the WINDEV application on the computers of end users.
Remark: To reduce the size of the setup program, "Reports & Queries" can be downloaded from your application:

Translating the names of data files and items

"Reports & Queries" is distributed in different countries (it is available in English and in French). Many different languages can be used: Spanish, Romanian, Chinese, Swedish, etc.
If end users want to create reports or queries, they must use the names of data files and items. These names are used in the analysis by the application developer. In most cases, these names are in English, which is not suitable for a Chinese or Romanian user.
You now have the ability to specify a translation for the names of data files and items in the analysis.
Detailed steps

Step 1: Configuring the project

To use Reports & Queries from your WINDEV application, you must configure the project associated with your application.
  1. Open the project description window: on the "Project" tab, in the "Project" group, click "Description".
  2. In the "Advanced" tab, check "Enable "Reports and Queries"".
  3. Validate.
Remarks:
  • By default, the WINDEV projects allow Reports & Queries to be run.
  • The initialization code of the project is run during the test of a report or query from Reports & Queries. In this case, InTestMode returns False.

Step 2: Configuring the analysis: Visible data files and items

By default, all data files and their items can be handled by Reports & Queries. The end user can use this data in his custom reports and queries.
To limit the data that can be used in Reports & Queries (if your application contains sensitive data for example), the WINDEV analysis must be modified: simply make the desired data files and/or items "invisible" in Reports & Queries.
Remark: The reports and the queries created from WINDEV and based on invisible data files and/or items can be run and/or modified from Reports & Queries.
To define an invisible data file in Reports & Queries:
  1. In the data model editor of WINDEV, select the desired data file.
  2. Open the description window of the file items ("Description of data file" in the popup menu).
  3. In the "Reports and Queries" tab, uncheck "Visible to the end user in "Reports and Queries"".
  4. Validate.
Remark: All file items will automatically become invisible.
To define an invisible data file item in Reports & Queries:
  1. In the data model editor of WINDEV, select the data file that contains the desired item.
  2. Open the data file description window (select "Description of items" in the context menu).
  3. Select the desired item.
  4. In the "Reports and Queries" tab, uncheck "Visible to the end user in "Reports and Queries"".
  5. Validate.
Remark: The VisibleEndUser property can also be used to get or change the visibility of an item in Reports & Queries.
Caution: To take into account the modifications performed in the WINDEV analysis, you must regenerate the WINDEV analysis: on the "Analysis" tab, in the "Analysis" group, expand "Generation" and select "Generation".

Step 2 bis: Configuring the analysis: Translating the names of files and items

By default, when the data files and the items are handled by the end user when creating a report or a query, all the names used correspond to the ones defined by the developer in the analysis. In most cases, these names do not correspond to the language of the user. You have the ability to propose a translation for the following elements in the WINDEV analysis:
  • Name of data file,
  • Caption of data file,
  • Name of item,
  • Item caption.
Remark: If your project is going to be translated, don't forget to translate this information. This information is automatically checked out and checked in by WDMSG.
To define the multilingual parameters of a data file in Reports & Queries:
  1. In the data model editor of WINDEV, select the desired data file.
  2. Open the description window of the file items ("Description of data file" in the popup menu).
  3. In the "Reports and Queries" tab, specify the name of data file and its caption in the different languages supported by the analysis.
    Remark: The name used must not correspond to a file name already found in the analysis.
  4. Validate.
To define the multilingual parameters of a file item in Reports & Queries:
  1. In the data model editor of WINDEV, select the data file that contains the desired item.
  2. Open the data file description window (select "Description of items" in the context menu).
  3. Select the desired item.
  4. In the "Reports and Queries" tab, type the name of item and its caption in the different languages supported by the analysis.
  5. Validate.
Caution: To take into account the modifications performed in the WINDEV analysis, you must regenerate the WINDEV analysis: on the "Analysis" tab, in the "Analysis" group, expand "Generation" and click "Generation".

Step 3: Report settings

To make a report editable in Reports & Queries:
  1. Open the report in the report editor.
  2. Open the report description window ("Report description" in the context menu of the report).
  3. In the "Options" tab, check "Allow editing report in Reports and Queries".
  4. Check:
    • "Edit interface only" to make only the report's interface editable in Reports & Queries.
    • "Edit all (interface and code)" to make the report fully editable in Reports & Queries.
  5. Validate and save the report.
Remarks:

Step 3 bis: Configuring queries

By default, a query is neither visible nor modifiable in Reports & Queries. It can only be made visible in Reports & Queries. It cannot be made modifiable.
To make a query of your application visible in Reports & Queries:
  1. Open the query in the query editor.
  2. Open the query description window ("Query description" in the context menu of the query).
  3. Click the "Advanced" button.
  4. In the "Reports & Queries" tab, check "Visible in 'Reports Queries'".
  5. Validate and save the query.
Remark: The queries can only be viewed in Reports & Queries. They cannot be modified. Reports & Queries allows you to perform the following operations on a query:
  • run and view the query result.
  • use the query as base for building other queries.
  • perform a copy of query ("Save as" option).
  • use the query as data source of report.

Step 4: Creating the executable and distributing the application

WINDEV applications that use Reports & Queries are created and distributed in the same way as standard applications. The parameters specific to Reports & Queries can be specified when creating the setup procedure.
Once you have defined all the elements of your WINDEV application (windows, reports, queries, etc.), create the corresponding executable. For more details, see Creating an executable.
Then, create the setup program (for more details, see Setup program). In the setup program creation wizard, in the "Additional modules" step:
  1. Check "Include the setup of Reports and Queries". The setup package of Reports & Queries is automatically searched. This setup package is located in the "Install\Reports and Queries" subdirectory of the WINDEV installation directory.
    Caution: Including Reports and Queries significantly increases the size of your setup (about 160 MB).
    The setup package of Reports & Queries can also be distributed separately. If Reports & Queries is not included in the setup, it can be downloaded from the application (via the automatic menu, from the report viewer or with RunReportsAndQueries). By default, the software is downloaded on an FTP site of PC SOFT. You can customize the software download address (e.g. company website, etc.). For more details, see "Customizing the download address".
  2. Specify (if necessary) the directories corresponding to the reports and queries modified or created by the end user:
    • the directory of custom reports and queries corresponds to the directory of the reports and queries visible by the user who created them.
    • the directory of shared reports and queries corresponds to the directory of the reports and queries visible by all application users.
  3. Allow or prevent the modification of these directories when installing the application.
Remark: fReportsAndQueriesDir gets the directory of custom and/or shared reports and queries.

Step 5: Installing the WINDEV application on the end-user computers

The setup of an application that uses Reports & Queries is identical to the setup of a standard application.
During the setup, if "Reports & Queries" was included in the setup program, the user will only have to specify whether he wants to install Reports & Queries.
If Report & Queries was not included in the setup program, this software can be downloaded when using the automatic menu, when previewing a report or when starting the software.
Window proposing the download

Customizing the download address

If Report & Queries was not included in the setup program, this software can be downloaded when using the automatic menu, when previewing a report or when starting the software.
By default, the download address corresponds to an FTP site of PC SOFT.
To use another site:
  1. Create a text file named LoginFTP.INI. This file and the application executable must be found in the same directory.
  2. This file must contain the following elements:
    [FTP]
    Login = Login of the user on the FTP server
    PSW = Password of the user on the FTP server
    Serv = FTP server (ftp.windev.com for example)
    Dir = Download directory (WX28/latest for example)
Remarks:
  • If the download package is found at the root, write "." into the Dir entry.
  • The file to download is "WD2024 PACKER.exe".
Using Reports & Queries

Starting Reports & Queries

To allow the end users to customize the reports of your application or to create their own reports and their own queries, all you have to do is start Reports & Queries.
To allow the end users to start Reports & Queries:
  • display your reports in the report viewer. End users will be able to start "Reports & Queries" by clicking .
  • add the "?" menu into the main window of your application: on the "Window" tab, in the "Bars and menus" group, expand "Main menu" and select "Add the '?' menu". In the wizard for creating this menu, check "Create, modify a report" and "Create, modify a query".
  • use RunReportsAndQueries in your application.
If "Report and Queries" is not installed, a window allows you to download the software.

Configuring the options of data files

The end users can configure the data files handled by the project opened in "Reports & Queries". You can configure:
  • the directory of data files used for test.
  • the live data (that is used to see the data when handling the report in the editor).
To configure the options of the data files:
  • On the "Project" tab, in the "Project" group, click "Description".
  • Select the "Files" tab.
Principle for using reports

Modifying a report

When modifying a report, the corresponding file (".WDE" file) is automatically checked out from the application library and copied into the directory of "Custom reports and queries" (defined when creating the setup procedure of WINDEV application).
This is the report that will be modified by the end user.

Using a modified report

The test of the modified report can be directly run in "Reports & Queries". In this case, the initialization process of project will be run.
By default, only the user who modified a report will use this modified report in the WINDEV application.
In order for a modified report to be used by the other application users, the end user must select "File .. Share the element with the other users". The file corresponding to the modified report (".WDE" file) will be automatically deleted from the directory of "Custom reports and queries" and copied into the directory of "Shared reports and queries".
When a report is run from the WINDEV application, the report file is searched:
  • first, in the directory of "Custom reports and queries".
  • then, in the directory of "Shared reports and queries".
  • finally, in the library of the WINDEV application.
Remark: An indication in the title of the report viewer window informs users that the report used corresponds to a modified report.
To restore the report to its initial version, the end users will have to physically delete the file of modified report (".WDE" file) from the "Custom reports and queries" directory and/or from the "Shared reports and queries" directory.

Using a new report

The end users will be able to print their new reports from Reports and Queries:
  • by starting a print job ().
  • by testing the report ().
    In this case, the initialization process of project is run.
Therefore, no programming is required to print the report.
In order for the reports created by Reports & Queries to be directly printed from a WINDEV application, this feature must be implemented in your application.
You can for example include a window allowing the end user to:
  • select a report created in Reports & Queries.
  • run this report.

Multilingual names of items and files

Multilingual names and captions have been defined for your data files and for your items: when modifying or creating a report, the end user will have the ability to access to the names and captions corresponding to the current language.
For example, the application is used in Spanish. The user asks to modify one of the displayed reports. When the source of the report is edited, the names of data files and items will be viewed in Spanish.
Remark: If the report is included in the executable, the captions and the names of items and data files will be displayed in the initial language.
Principle for using queries

Modifying an application query

The application queries can only be viewed in Reports & Queries. They cannot be modified. Reports & Queries allows you to perform the following operations on a query:
  • run and view the query result.
  • use the query as base for building other queries.
  • perform a copy of query ("Save as" option). A new query will be created.
  • use the query as data source of report.

Using a new query

The end users will be able to run their new queries:
  • from Reports & Queries directly by clicking .
    In this case, the initialization process of project will be run.
  • from the WINDEV application.
In order for the queries created by Reports & Queries to be directly run from a WINDEV application, this feature must be implemented in your application.
You can for example include a window allowing the end user to:
  • select a query created in Reports & Queries.
  • start the execution of this query and display its result in a table (with BuildBrowsingTable, for example).

Multilingual names of items and files

Multilingual names and captions have been defined for your data files and for your items: when creating a query, the user will have the ability to access to the names and captions corresponding to the current language.
For example, the application is used in Spanish. The user wants to create a query. When creating the query, the names of data files and items will be viewed in Spanish.
Remarks:
  • If the query is included in the executable, the captions and the names of items and data files will be displayed in the initial language.
  • The SQL code of the query remains in the initial language.
Minimum version required
  • Version 9
Comments
Click [Add] to post a comment

Last update: 09/08/2023

Send a report | Local help