domingo, 16 de agosto de 2020

DICAS 3031 - WINDEV TUTORIAL 54 - IMPRIMIR PEDIDO - MENU RELATORIO - PARTE D



https://youtu.be/P4rtr-NCiCs


Bom Dia/Boa Tarde/Boa Noite

Esse Ao Vivo vai estrear as 16:00 do dia 27/08/2020 

DICAS 3031 - WINDEV TUTORIAL 54 - IMPRIMIR PEDIDO - MENU RELATORIO - PARTE D
Tutoriel WINDEV : Leçon 4.6.d. Imprimer une commande - Affichage de l'état imprimé depuis le menu

ASSUNTOS

explicando como sera o menu para chamar o relatorio
criando o menu popup
criando o codigo para chamar o relatorio 
   iDestination
   iInitReportQuery
   iPrintReport
ir tabela e adicionar o menu popup 
Mostrando o Relatorio funcionando 
     

Video original da Franca

https://youtu.be/elnVD8h7-RY


Playlist Windev TUTORIAL

=============================================

// menu popup
// Print in the report viewer
// Imprime nos relatórios do visualizador

iDestination(iViewer) 

// Initializes the report query
// Inicializa a consulta do status

iInitReportQuery(RPT_PEDIDO_FORMULARIO,TABLE_QRY_pedido_consulta) 

// Starts printing the report
// Inicializa a consulta do status

iPrintReport(RPT_PEDIDO_FORMULARIO) // Inicializa a consulta do status











Displaying the printed report from a menu option
In our application, the "RPT_Order_form" report will be printed from an option found in the popup menu of the Table control used to list the requested orders.
As already seen, the Table control proposes an automatic menu. We want to keep the options of this automatic menu and add an option that will be used to print the selected order form.
The principle is as follows:
  1. We are going to create a new popup menu. This menu will contain the WLanguage code used to print the report.
  2. We are going to link this popup menu to the Table control and specify that the default popup menu will be displayed just after the popup menu defined for the Table control.

Creating the popup menu

  • To create a popup menu in the "WIN_Menu" window:
    1. Open the "WIN_Menu" window in the editor if necessary (double-click its name in the "Project explorer" pane for example).
    2. On the "Window" pane, in the "Bars and menus" group, expand "Popup menus" and select "New popup menu".
    3. A new popup menu appears in the editor. This menu option includes a single option named "Menu option".
      Popup menu in edit mode
    4. Open the popup menu description:
      • Select "Menu option".
      • Open the popup menu (right click).
      • Select "Description of popup menu".
    5. Give a name to the popup menu ("MENU_Order") and validate.

Remark

Popup menus and windows
A popup menu is associated with a window. If a window includes several popup menus (popup menu of window, popup menus of controls, ...), all these menus are saved with the window.
  • We are now going to define the option caption and write its WLanguage code.
    1. Select "Menu option".
    2. Press the Space key on the keyboard: the caption becomes editable. Type the new caption ("Print the order form") and validate.
    3. Display the WLanguage events associated with the option:
      • Select the option.
      • Open the popup menu (right click) and select "Code".
    4. Write the following WLanguage code:
      // Print in the report viewer
      iDestination(iViewer)
      // Initializes the report query
      iInitReportQuery(RPT_Order_form, ...
      TABLE_QRY_FindOrders.COL_OrdersID)
      // Starts printing the report
      iPrintReport(RPT_Order_form)
      In this code:
      • iDestination is used to specify that the report will be printed in the report viewer.
      • iInitReportQuery is used to specify the parameters expected by the query associated with the report. In our case, the query expects the order number in parameter. This order number is found in the COL_OrdersID column of the TABLE_QRY_FindOrders Table control for the current row.
      • iPrintReport is used to print the specified report (the RPT_Order_form report in our case).
    5. Close the code window and the window containing the popup menu.
    6. Save the "WIN_Menu" window.

Associating the popup menu with the Table control

  • Last step: we are going to link the popup menu to the Table control.
    1. In the "WIN_Menu" window, display the "Finding orders" tab.
    2. Select the Table control and open its description ("Table description" from the popup menu of control).
    3. In the "UI" tab, expand the "Popup menu" combo box.
    4. Check "Add a popup menu", select the "MENU_Order" menu and select "At the beginning" to specify that the menu is placed before the system menu.
      Popup menu
    5. Click inside the window to validate the popup menu.
    6. Validate.

Print test

  • Now, all we have to do is run a real test:
    1. Run the test of "WIN_Menu" window.
    2. Select the "Finding orders" tab pane.
    3. Specify the criteria and start a search.
    4. Select one of the orders displayed in the Table control.
    5. Print the order via the popup menu.
      Report test
    6. Close the report viewer and the test window.

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








Nenhum comentário:

Postar um comentário

Teste

Teste
teste