PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • This lesson will teach you the following concepts
  • Overview of "Reports and Queries"
  • Starting "Reports and Queries"
  • Distribute "Reports and Queries" with your applications
  • Configuring the project
  • Configuring the analysis
  • Configuring reports
  • Configuring queries
  • Creating the executable and distributing the application
  • Installing and using "Reports and Queries"
  • Installing the application
  • Application test
  • Conclusion
Lesson 4.15. Distribute "Reports and Queries" with your applications
This lesson will teach you the following concepts
  • What is "Reports & Queries" used for?
  • How to distribute "Reports and Queries".
  • How to use "Reports and Queries".

Estimated time: 10 mn

Express

"Reports & Queries" is not available in the Express version.


Previous LessonTable of contentsNext Lesson
Overview of "Reports and Queries"
"Reports & Queries" allows the users to modify and create the reports and queries found in your applications.
The user thinks that information is missing in the standard report? "Reports and Queries" allows the user to add this information from the print preview. This modification may be useful for the other users? The report can be made available to all users who are using the application in network. Same for the queries.

Note

"Reports and Queries" is free and it can be distributed with your applications developed with WINDEV. See the license for more details about the distribution and use conditions.
Starting "Reports and Queries"
In order for the end users to customize the reports of your application or to create their own reports and their own queries, all they 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 and Queries" by clicking .
  • add the automatic help 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.
Distribute "Reports and Queries" with your applications
To distribute "Reports and Queries" with your own WINDEV application, you must:
  • specify in the project that the application allows "Reports and Queries" to be run.
  • in the analysis, define (if necessary) the files and items that can be used in "Reports and Queries".
  • define the reports and queries that can be modified in "Reports and Queries".
  • create the executable and the setup program including "Reports and Queries".
We are going to present these different steps in details by using the "WD Full Application" project.

Answer

If you did not perform the operations in the previous lessons, you can follow this lesson by opening a corrected project: in the WINDEV home page (Ctrl + <), click "Tutorial" and select "Full application (Answer)".

Configuring the project

  • To use "Reports and Queries" from your application, you must configure the project associated with your application.
    1. Open (if necessary) the "WD Full Application" example: in the WINDEV home page (Ctrl + <), click "Tutorial" and select "Full Application (Answer)". The project is loaded.

      Note

      If no report was created in the "WD Full Application" project, open the corrected application project: in the WINDEV home page (Ctrl + <), click "Tutorial" and select "Full Application (Answer)".
    2. Display the project description.
      Reminder: To display the project description, go to the "Project" pane, "Project" group, and click on "Description".
    3. In the "Advanced" tab, check "Allow to start "Reports and Queries"".
    4. Validate.

Configuring the analysis

We are going to open the analysis in order to configure the files and items that can be used in "Reports and Queries".
  • Open the analysis of your project: click among the quick access buttons of WINDEV menu.
By default, all data files and all items are visible and usable in "Reports & Queries". If your application contains sensitive information (passwords, ...), these data files or these items can be made invisible in "Reports and Queries".

Note

"Reports & Queries" does not allow the user to add, modify or delete records (HAdd, HModify and HDelete are not allowed). It is also not possible to create or re-create data files (HCreation and HCreationIfNotFound are not allowed).
  • To define an invisible data file in "Reports and Queries":
    1. In the data model editor, select the requested data file.
    2. Display the description window of the data file ("Description of data file" in the popup menu)
    3. In the "Reports and Queries" tab, uncheck "Visible by the end user in "Reports and Queries"".
    4. Validate.
  • To define in invisible item in "Reports and Queries":
    1. In the data model editor, select the requested data file.
    2. Display the file description window ("Description of items" in the popup menu).
    3. Select the requested item in the table.
    4. In the "Reports and Queries" tab, uncheck "Visible by the end user in "Reports and Queries"".
    5. Validate.
  • To take into account the modifications performed in the analysis, you must regenerate the analysis (on the "Analysis" pane, in the "Analysis" group, click on "Generation"). An automatic modification of data files is proposed to take the modifications into account.

Configuring reports

When creating a report, you have the ability to specify whether this report can be modified in "Reports and Queries".
  • To allow the "RPT_QRY_FindOrders_table" report (found in the "WD Full Application" project) to be modified in "Reports & Queries":
    1. Open the "RPT_QRY_FindOrders_table" report in the report editor.
    2. Display the report description ("Report description" from the popup menu).
    3. In the "Options" tab, check "Report modifiable in Reports and Queries".
    4. Next, check one of the following options:
      • "Modifiable interface" for the report interface to be modifiable in Reports and Queries.
      • "All modifiable (interface and code)" for the entire report to be modifiable in Reports and Queries.
    5. Validate and save the report.

Configuring queries

By default, a query can be modified in "Reports and Queries".
  • To allow the "QRY_OrderForm" query (found in the "WD Full Application" project) to be modified in "Reports & Queries":
    1. Open the "QRY_OrderForm" query in the query editor.
    2. Display the query description ("Query description" from the popup menu of query graph).
    3. Click the "Advanced" button (found among the "Actions").
    4. In the "Reports and Queries" tab, check "Visible in 'Reports Queries'".
    5. Validate and save the query.

Creating the executable and distributing the application

The method for creating and distributing an application that is using "Reports and Queries" is the same as the method for creating and distributing a standard application. You can specify the parameters specific to the "Reports and Queries" program when creating the setup procedure.
  • To create the setup program of your WD Full Application application:
    1. On the "Project" pane, in the "Generation" group, click "Setup procedure". The wizard for setup creation starts. Click the "Setup" link on the left of wizard.
    2. Select "Create the executable now". The executable is created.

      Note

      If the wizard proposes to create the help file, validate the different messages.
    3. The wizard for setup creation starts.
    4. Choose an "Individual setup". Go to the next step.
    5. Choose a "Standard setup". Go to the next step.
    6. Validate the proposed setup directory and go to the next step.
    7. In the screen named "Files installed", select (if necessary) the data files (.fic, .mmo and .ndx) found in the executable directory. To do so, click "Add" and select these files.
    8. Click on "Additional information" on the left.
    9. In the screen "Additional modules" screen, make sure that "Include the setup of Reports and Queries (caution: huge)" is checked.
    10. Go to the next step.
    11. In the screen named "Reports and Queries":
      • Specify whether the setup of "Reports and Queries" must be included in your setup program.
        In this case, the setup package of "Reports and Queries" (located in the subdirectory "Reports and Queries" of the WINDEV setup directory) will be used.
        It allows you to:
        • Propose to install "Reports and Queries" with the application.
        • Propose to install "Reports and Queries" when it is first used.
        Caution: Including "Reports and Queries" significantly increases the size of your setup (about 290 MB).
      • 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 reports and queries visible by the user who created them.
        • The directory of shared reports and queries corresponds to the directory of reports and queries visible by all application users.
        These directories can be modified when installing the application: all you have to do is check "Allow these directories to be modified during the setup".
    12. Click "Medium" on the left of wizard. This step allows you to select the setup media, the directory for creating the setup program if necessary, and also to protect the setup with a password.
    13. Keep the default options and validate the wizard. The setup program is generated. Don't close the window indicating the end of setup creation.
Installing and using "Reports and Queries"

Installing the application

To check the setup and use of "Reports and Queries", we are going to install the "WD Full Application" application.
The setup program of this application was generated in the previous paragraph. The setup program was created in the "Install" subdirectory of the current project.
  • In the window for the end of setup creation, click the "Test" button. If this window was closed, run the "Install.exe" program found in the directory of setup program. The application setup starts.
  • We are going to follow the different steps of setup program for the "WD Full Application" application.
    1. If UAC is enabled, a window appears and requests authorization to run the program. Validate this window.
    2. Choose the language of setup program and click "OK".
    3. The setup wizard starts. Two setup modes are available:
      • Quick setup: The setup is performed with the parameters specified by the application provider.
      • Custom setup: The wizard asks the user to define the parameters of application setup.
    4. Choose "Custom setup". The wizard asks for the setup directory of application.
    5. Validate the setup directory of application.
    6. The screen named "Reports and Queries" is used to install "Reports and Queries" (only if this program is not already installed on the current computer).
      Note: If an earlier version of "Reports and Queries" is installed on the computer, it is possible to make a backup copy of that version.
    7. Go to the next step.
    8. The next screen allows you to define the directories that will be used to save the reports and queries (if the option "Allow these directories to be modified during the setup" was checked in the wizard for creating the setup program).
    9. Go to the next step and end the application setup.
    10. The application setup, then the setup of "Reports and Queries" start.

Application test

We are now going to take the place of the application user (not easy, but worth a try).
  • To run the application test:
    1. Start the "WD Full Application" application.
    2. Select "Reports .. List of customers". The report is displayed in the print preview. Click the "Preview" pane.
    3. Two new icons are displayed on this screen:
      Used to modify the current report in the print preview.
      Used to create a new report.
  • We are going to modify this report:
    1. Click .
    2. The report is displayed in edit mode in "Reports and Queries".
    3. The user can perform the requested modifications:
      • on the style of the displayed information (change the color of a control for example).
      • on the content of the report (add a control for example). If the report is linked to a query, the user can modify this query.
        • If the report is linked to an embedded query, the modification is directly performed in the report.
        • If the report is linked to an independent query, the query is also modified. The modification will be taken into account when running the report (if a window is also using this query, the modification will not be taken into account by the window).
  • In this example, we want to highlight the date in red. To do so:
    1. Select the date control in the start of document.
    2. On the "Modification" pane, in the "Fast edit" group, click the "Color" icon and select the red color.
    3. Save your report. The directory proposed by default corresponds to the setup directory of your application.
    4. Close "Reports and Queries".
    5. Select "Reports .. List of customers" in the application. The report is displayed in "Print preview" mode and the modification becomes effective.
In this example, the modified report is available to you only. For a network application, the user has the ability to make a modified report available to all the users.
You are now familiar with "Reports & Queries".
See The user version of report editor (Reports & Queries) for more details.
Conclusion
The development step of our application is ended. The following lessons will allow you to discover:
  • how to transform your application into a multilingual application,
  • how to include your application in the Source Code Manager (SCM).
Previous LessonTable of contentsNext Lesson
Minimum version required
  • Version 24
Comments
Click [Add] to post a comment