- 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: Analysis setup: Data files and visible fields
- Step 2a: Analysis setup: Translation of data file and item names
- Step 3: Configuring the reports
- Step 3b: 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 heading and data file names
- Principle for using queries
- Modifying an application query
- Using a new query
- Multilingual heading and data file names
Distributing Reports & Queries
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. 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: - Indicate at project level that the application authorizes the launch of Reports & Queries.
- 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 editable reports 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 installation program, the "Reports & Queries" software can be downloaded directly 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). A wide range of languages are 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. Step 1: Configuring the project To use Reports & Queries from your WINDEV application, you must configure the project associated with your application. - Open the project description window. To do so, go to the "Project" tab, "Project" group, and click "Description".
- On the "Advanced" tab, check "Enable Reports and Queries".
- 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: Analysis setup: Data files and visible fields 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: all you have to do is make the requested data files and/or items "invisible" in Reports & Queries. Note: Reports and queries created directly from WINDEV and based on invisible data files and/or fields can be run and/or modified from within Reports & Queries. To define an invisible data file in Reports & Queries: - In the data model editor of WINDEV, select the desired data file.
- Open the data file description window (select "Data file description" in the context menu).
- On the "Reports and Queries" tab, uncheck "Visible to the end user in "Reports and Queries"".
- Validate.
Note: All file items will automatically become invisible. To define an invisible item in Reports & Queries: - In the data model editor of WINDEV, select the data file that contains the desired item.
- Display the item description window ("Item description" option in the context menu).
- Select the desired item.
- On the "Reports and Queries" tab, uncheck "Visible to the end user in "Reports and Queries"".
- Validate.
Note: The VisibleEndUser property can also be used to identify or modify the visibility of a heading in Reports & Queries. Attention: To take into account the modifications made in the WINDEV analysis, it is of course necessary to generate the WINDEV analysis: under the "Analysis" pane, in the "Analysis" group, pull down "Generation" and select "Generation". Step 2a: Analysis setup: Translation of data file and item names 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.
Note: If your project must 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: - In the data model editor of WINDEV, select the desired data file.
- Open the data file description window (select "Data file description" in the context menu).
- On the "Reports and Queries" tab, specify the name of data file and its caption in the different languages supported by the analysis.
Note: The name used must not correspond to an existing data file name in the analysis. - Validate.
To set multilingual parameters for a heading in Reports & Queries: - In the data model editor of WINDEV, select the data file that contains the desired item.
- Display the item description window ("Item description" option in the context menu).
- Select the desired item.
- On the "Reports and Queries" tab, type the name of item and its caption in the different languages supported by the analysis.
- Validate.
Attention: To take into account the modifications made in the WINDEV analysis, it is of course necessary to generate the WINDEV analysis: under the "Analysis" pane, in the "Analysis" group, pull down "Generation" and click on "Generate". Step 3: Configuring the reports To make a report editable in Reports & Queries: - Open the report in the report editor.
- Open the report description window ("Report description" in the context menu of the report).
- On the "Options" tab, check "Allow editing report in Reports and Queries".
- 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.
- Validate and save the report.
Remarks: Step 3b: 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: - Open the query in the query editor.
- Open the query description window ("Query description" in the context menu of the query).
- Click the "Advanced" button.
- On the "Reports & Queries" tab, check "Visible in 'Reports Queries'".
- Confirm and save the query.
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 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: - Check "Include Reports and Queries setup". The installation package of Reports & Queries is automatically searched. This installation package is located in the "Install\Reports and Queries" subdirectory of the WINDEV installation directory.
Attention: Incorporating the Reports and Queries software increases the size of your installation by a considerable amount (approximately 160 MB).. The installation 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". - 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.
- Allow or prevent the modification of these directories when installing the application.
Note The fReportsAndQueriesDir function is used to access the directory of personal 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.
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: - Create a text file named LoginFTP.INI. This file and the application executable must be found in the same directory.
- 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 "WD2025 PACKER.exe".
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
. - either add the "?" menu to your application's main window: under the "Window" pane, in the "Bars and menus" group, pull down "Main menu" and select "Add '?' menu".. In the menu creation wizard, check "Create or edit a report" and "Create or edit 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 "Data 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 state used corresponds to a modified state. 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 heading and data file names You have defined multilingual names and labels for your data files and fields: when a report is modified or created, the user will have access to the names and labels 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. Note: If the report is included in the executable, the labels and names of the fields and data files will be displayed in the original 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 heading and data file names You have defined multilingual names and labels for your data files and fields: when a query is created, the user will have access to the names and labels 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.
|
|
|