terça-feira, 25 de agosto de 2020

DICAS 3048 - WINDEV TUTORIAL 71 - DISTRIBUIAO RELATORIOS QUERIES-CONSULTAS



https://youtu.be/broPAlII2Q0


Bom Dia/Boa Tarde/Boa Noite

Esse Ao Vivo vai estrear as 14:00 do dia 02/09/2020 

DICAS 3048 - WINDEV TUTORIAL 71 - DISTRIBUIAO RELATORIOS QUERIES-CONSULTAS 
Lesson 4.15. Distribute "Reports and Queries" with your applications

ASSUNTOS

O QUE VAMOS APRENDER
APRESENTACAO
CONFIGURANDO PROJETO REPORT AND QUERY 
CONFIGURAR REPORT A NIVEL DE ANALISE
CONFIGURAR REPORT A NIVEL DE RELATORIO
MOSTRANDO COMO USAR QUERY SQL NO REPORT AND QUERY
FAZENDO O INSTALADOR
EXECUTANDO O PROGRAMA 
TESTANDO ALTERACAO DE RELATORIO


Video original da Franca

https://youtu.be/Kx4x9sWSxA4


Playlist Windev TUTORIAL

https://youtu.be/3DshsXJ8I2M










Lesson 4.15. Distribute "Reports and Queries" with your applications
This lesson will teach you the following concepts
  • What is "Reports and Queries" used for?
  • How to distribute "Reports and Queries".
  • How to use "Reports and Queries".
Lesson duration

Estimated time: 10 mn

Express

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


Previous LessonTable of contentsNext Lesson
Overview of "Reports and Queries"
"Reports and Queries" allows the users to modify and create the reports and queries found in your applications.
The user thinks that some information is missing in the standard report? "Reports and Queries" allows the user to add this information from the report viewer. 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.

Remark

"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 and Queries".
To allow end users to start "Reports and Queries":
  • display your reports in the report viewer. 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 WINDEV's home page (Ctrl + <), click "Tutorial" and select "Full application (Answer)".

Configuring 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 WINDEV's home page (Ctrl + <), click "Tutorial" and select "Full Application (Answer)". The project is loaded.

      Remark

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

Configuring 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 and Queries". If your application contains sensitive information (passwords, ...), these data files or these items can be made invisible in "Reports and Queries".

Remark

"Reports and Queries" does not allow the user to add, modify or delete records (HAddHModify 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 "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 and Queries":
    1. Open the "RPT_QRY_FindOrders_table" report in the report editor.
    2. Open 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 and 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.

      Remark

      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 step entitled "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.
        You can:
        • 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 350 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).
      Remark: 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 report viewer. Click the "Preview" pane.
    3. Two new icons are displayed on this screen:
      Used to modify the current report in the report viewer.
      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 "Quick 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 "Report viewer" and the modification is applied.
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 and Queries".
See The user version of report editor (Reports and 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).


DICAS 2978 - WINDEV TUTORIAL 1 - 1.1B - WINDEV TEMA ESCURO E IDIOMA DO AMBIENTE
DICAS 2979 - WINDEV TUTORIAL 2 - 1.2- CRIAR JANELA E INSERIR TEXTO E EXIBIR
DICAS 2980 - WINDEV TUTORIAL 3 - 2.1- VARIAVEIS PARTE 1
DICAS 2981 - WINDEV TUTORIAL 4 - 2.2- VARIAVEIS ESCOPO - PARTE 2
DICAS 2982 - WINDEV TUTORIAL 5 - 2.1- VARIAVEIS OPERADORES PARTE 3
DICAS 2983 - WINDEV TUTORIAL 6 - 2.1.D - VARIAVEIS STRINGS PARTE 4
DICAS 2984 - WINDEV TUTORIAL 7 - 2.1.E - VARIAVEIS ARRAYS PARTE 5
DICAS 2985 - WINDEV TUTORIAL 8 - 2.2.A - CONDICOES IF-SWITCH PARTE 1
DICAS 2986 - WINDEV TUTORIAL 9 - 2.2.B - CONDICOES PARTE 2
DICAS 2987 - WINDEV TUTORIAL 10 - 2.3.A - LOOP PARTE 1
DICAS 2988 - WINDEV TUTORIAL 11 - 2.3.B - LOOP EXEMPLOS PARTE 2
DICAS 2989 - WINDEV TUTORIAL 12 - Lesson 2.4. The procedures - PARTE 1
DICAS 2990 - WINDEV TUTORIAL 13 - Leçon 2.4.b. Procedures Parametros - PARTE 2
DICAS 2991 - WINDEV TUTORIAL 14 - PROCEDURES REFERENCIA - PARTE 3
DICAS 2992 - WINDEV TUTORIAL 15 - PROCEDURES OPCIONAIS OU OBRIGATORIAS - PARTE 4
DICAS 2993 - WINDEV TUTORIAL 16 - PROCEDURES EXEMPLOS - PARTE 5
DICAS 2994 - WINDEV TUTORIAL 17 - PERGUNTAS E RESPOSTA - PARTE 1
DICAS 2995 - WINDEV TUTORIAL 18 - PERGUNTAS E RESPOSTA - PARTE 2
DICAS 2996 - WINDEV TUTORIAL 19 - WINDEV E OS BANCOS DE DADOS
DICAS 2997 - WINDEV TUTORIAL 20 - PROJETO E ANALISE - CRIACAO
DICAS 2998 - WINDEV TUTORIAL 21 - PROJETO E ANALISE - ARQUIVOS DADOS CLIENTE - PARTE 2
DICAS 2999 - WINDEV TUTORIAL 22 - PROJETO E ANALISE - ARQUIVOS DADOS CRIACAO ARQUIVO PEDIDO - PARTE 3
DICAS 3000 - WINDEV TUTORIAL 23 - PROJETO E ANALISE - IMPORTANDO CVS-ARQUIVO TEXTO - PARTE 4
DICAS 3001 - WINDEV TUTORIAL 24 - PROJETO E ANALISE - IMPORTANDO ARQUIVO PRODUTO - PARTE 5
DICAS 3002 - WINDEV TUTORIAL 25 - PROJETO E ANALISE - LINK - PARTE 6
DICAS 3003 - WINDEV TUTORIAL 26 - RAD COMPLETO
DICAS 3004 - WINDEV TUTORIAL 27 - VISAO GERAL
DICAS 3005 - WINDEV TUTORIAL 28 - Adicionar e Modificar Janelas PRODUTOS - PARTE A
DICAS 3006 - WINDEV TUTORIAL 29 - Adicionar e Modificar Janelas PRODUTOS Formulario - PARTE B
DICAS 3007 - WINDEV TUTORIAL 30 - Adicionar e Modificar Janelas PRODUTOS ALINHAR CAMPOS - PARTE C





Teste

Teste
teste