PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

  • 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: Configuring the reports
  • Step 3 bis: Configuring the 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 a query of the application
  • 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/iPadApple WatchUniversal Windows 10 AppWindows Mobile
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 replaces "WDEtat User". This module is now free and it can be distributed with your WINDEV applications. See the license for more details about the distribution and use conditions.
Note: This help page is intended for the developer of the WINDEV application.
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 files and the items that can be handled by Reports & Queries and (if necessary) the names of the 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 end-user computers.
Note: 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). The languages used are different: Spanish, Romanian, Chinese, Swedish, ...
If the end user wants to create reports or queries, he must handle the names of data files and items. These names are used in the analysis by the developer of the application. 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. Display the description window of the project ("Project .. Project description").Display the description window of the project: on the "Project" pane, in the "Project" group, click "Description".
  2. In the "Advanced" tab, check "Allow to start "Reports and Queries"".
  3. Validate.
Notes:
  • 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 the 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: all you have to do is make the requested data files and/or items "invisible" in Reports & Queries.
Note: 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 requested data file.
  2. Display the description window of the file items ("Description of data file" from the popup menu).
  3. In the "Reports and Queries" tab, uncheck "Visible by the end user, in "Reports and Queries"".
  4. Validate.
Note: All the items of the data files will automatically become invisible.
To define an invisible file item in Reports & Queries:
  1. In the data model editor of WINDEV, select the data file containing the requested item.
  2. Display the description window of the file ("Description of items" from the popup menu).
  3. Select the requested item.
  4. In the "Reports and Queries" tab, uncheck "Visible by the end user, in "Reports and Queries"".
  5. Validate.
Note: ..VisibleEndUser can also be used to find out or modify the visibility of an item in Reports & Queries.
Caution: To take into account the modifications performed in the WINDEV analysis, you must generate the WINDEV analysis ("Analysis .. Generation").Caution: To take into account the modifications performed in the WINDEV analysis, you must regenerate the WINDEV analysis: on the "Analysis" pane, 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,
  • Caption of item.
Note: 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 requested data file.
  2. Display the description window of the file items ("Description of data file" from the popup menu).
  3. In the "Reports and Queries" tab, specify the name of the data file and its caption in the different languages supported by the analysis.
    Note: 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 containing the requested item.
  2. Display the description window of the file ("Description of items" from the popup menu).
  3. Select the requested item.
  4. In the "Reports and Queries" tab, type the name of the 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 generate the WINDEV analysis ("Analysis .. Generation").Caution: To take into account the modifications performed in the WINDEV analysis, you must regenerate the WINDEV analysis: on the "Analysis" pane, in the "Analysis" group, expand "Generation" and click "Generation".

Step 3: Configuring the reports

To make a report of your application modifiable in Reports & Queries:
  1. Open the report in the report editor.
  2. Display the description window of the report ("Report description" from the popup menu of the report).
  3. In the "Details" tab, check "Report modifiable in Reports & Queries".
  4. Check:
    • "Modifiable interface" in order for the interface of the report to be modifiable in Reports & Queries.
    • "All modifiable (interface and code)" in order for the entire report to be modifiable in Reports & Queries.
  5. Validate and save the report.
To make several reports of your application modifiable in Reports & Queries:
  1. Select "Project .. Edition audit .. Wizard for including new features". The wizard starts.On the "Project" pane, in the "Audit and performances" group, expand "Edition audit" and select "Wizard for including new features". The wizard starts.
  2. Display the wizard step named "Reports and Queries".
  3. Select "Allow to start "Reports and Queries"". Go to the next step.
  4. For each relevant report, check:
    • "Interface of reports modifiable/Query visible" in order for the interface of the report to be modifiable in Reports & Queries.
    • "Total control of reports (modifiable interface and code)" in order for the report to be entirely modifiable in Reports & Queries.
  5. Validate.
Notes:

Step 3 bis: Configuring the 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. Display the description window of the query ("Query description" from the popup 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.
To make several queries of your application visible in Reports & Queries:
  1. Select "Project .. Edition audit .. Wizard for including new features". The wizard starts.On the "Project" pane, in the "Audit and performances" group, expand "Edition audit" and select "Wizard for including new features". The wizard starts.
  2. Display the wizard step named "Reports and Queries".
  3. Select "Allow to start "Reports and Queries"". Go to the next step.
  4. For each relevant query, check "Query visible" in order for the query to be visible in Reports & Queries.
  5. Validate.
Note: 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 result of the query.
  • use the query as base for building other queries.
  • perform a copy of the query ("Save as" option).
  • use the query as data source of a report.

Step 4: Creating the executable and distributing the application

The method for creating and distributing a WINDEV application that is using Reports & Queries is the same as the method for creating and distributing a standard application. The parameters specific to Reports & Queries can be specified when creating the setup procedure.
Once your WINDEV application is entirely described (windows, reports, queries, ...), create the corresponding executable. See Creating an executable for more details.
Then, create the setup program (see Setup program for more details). In the wizard for creating the setup program, in the "Additional modules" step:
  1. Check "Include the setup of Reports and Queries". The setup package of Reports and Queries is automatically sought. This setup package is found in the "Install\Reports and Queries" sub-directory of the setup directory of WINDEV.
    Caution: Including Reports and Queries significantly increases the size of your setup (about 160 MB).
    The setup package of Reports and Queries can also be distributed separately. If Reports and Queries is not included in the setup, it can be downloaded from the application (via the automatic menu, from the print preview of a report or by RunReportsAndQueries). By default, the software is downloaded on an FTP site of PC SOFT. You have the ability to customize the download address of the software (site of a company for example). See "Customizing the download address" for more details.
  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 the users of the application.
  3. Allow (or not) these directories to be modified when installing the application.
Note: fReportsAndQueriesDir is used to find out the directory of custom and/or shared reports and queries.

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

The method for installing an application that is using Reports & Queries is the same as the method for installing 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 (WX22/latest for example)
Notes:
  • If the download package is found at the root, write "." into the Dir entry.
  • The file to download is named "WD220PACKER.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 preview window. The end users will be able to start Reports & Queries by clicking .
  • add the "?" menu into the main window of your application ("Windows .. Main menu .. Add the "?" menu"). In the wizard for creating this menu, check "Create, modify a report" and "Create, modify a query".add the "?" menu into the main window of your application: on the "Window" pane, 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).
These parameters are available in "Project .. Project description", "Files" tab.To configure the options of the data files:
  • On the "Project" pane, 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 the 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 the 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 users of the application, 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 sought:
  • 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.
Note: A mention displayed in the title of the preview window informs the 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 the 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 ( ).
  • by running the report test ( ).
    In this case, the initialization process of the 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 reports displayed. When the source of the report is edited, the names of the data files and items will be viewed in Spanish.
Note: 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 a query of the application

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 result of the query.
  • use the query as base for building other queries.
  • perform a copy of the query ("Save as" option). A new query will be created.
  • use the query as data source of a 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 the 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.
  • run 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.
Notes:
  • 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 required version
  • Version 9
Comments
Click [Add] to post a comment