sábado, 15 de agosto de 2020

DICAS 3023 - WINDEV TUTORIAL 46 - Pesquisa Multicriterio - Criando Interface - Parte D



https://youtu.be/bkw02W6uX2A


Bom Dia/Boa Tarde/Boa Noite

Esse Ao Vivo vai estrear as 16:00 do dia 26/08/2020 
DICAS 3023 - WINDEV TUTORIAL 46 - Pesquisa Multicriterio - Criando Interface - Parte D
Tutoriel WINDEV : Leçon 4.4.d. Recherche multicritère - Interface de recherche


ASSUNTOS

Explicando o que sera feito
ADICIONAR GUIA NOVA NO PAINEL MENU
GERA A TABELA EM CIMA DA QUERY
ARRUMAR OS CAMPOS DAS COLUNAS DA TABELA
MOSTRAR O CODIGO DA TABELA QUE INICIALIZA A QUERY

  

Video original da Franca

https://youtu.be/k6PNU93QdF0


Playlist Windev TUTORIAL












Creating the interface used to perform a multicriteria search

Modifying the Tab control

We are going to add a tab pane into the "WIN_Menu" window to display the result of the multi-criteria search.
  • To add a tab pane:
    1. Display (if necessary) the "WIN_Menu" window in the editor.
    2. Select the Tab control.
    3. Open the control description window ("Description" from the popup menu).
    4. In the "General" tab of description window, click the "New" button. A third tab pane appears.
    5. Click "Pane 3".
    6. In the "Description of static pane" section, type the pane caption: "Finding orders".
      Tab control description
    7. We are going to associate an image to the tab pane via the WINDEV image catalog. Click the Drop-down menu button on the right of "Image" control. Select "Catalog" from the popup menu that is displayed. The image catalog window appears.
    8. In the search area, specify "Search". Click the magnifier to start the search.
    9. Among the proposed images, select the icon representing the binoculars ( Binoculars ) and validate.
    10. Keep the options found in the setting screen of generated image and validate.
    11. Validate the Tab control description window.
      Tab control in the editor

Creating the controls used to configure the criteria and to display the result

We now want to display the result of our multicriteria search.
We are going to create a Table control based on the query then to create the different controls allowing the user to select the search criteria.
Creating the Table control
  • To create the Table control used to display the search result:
    1. In the "WIN_Menu" window, click the "Finding orders" pane. The empty tab pane appears.
    2. Create a Table control: on the "Creation" pane, in the "Data" group, expand "Table and List Box" and select "Table (Vertical)".
    3. Click the Tab control pane previously selected: the Table control creation wizard starts.
    4. The Table control will be based on the "QRY_FindOrders" query (that was created beforehand). Select "Display the data found in a file or in an existing query". Go to the next step of the wizard.
    5. Select the query that will be used as data source for the Table control:
      • Expand the "Queries" group if necessary.
      • Select the "QRY_FindOrders" query.
        Table control creation wizard
      • Go to the next step of the wizard.
    6. Select all suggested items if necessary.
      Items to display
    7. Go to the next step of the wizard.
    8. Keep the default options in the different steps of the wizard and validate the creation of the Table control.
    9. The Table control is automatically created in the "Finding orders" pane of the Tab control.
    10. Modify (if necessary) the position of Table control so that it is entirely displayed in the tab pane.
      Window in the editor
  • For better legibility, we are going to rename the captions of columns in the Table control.
    1. Open the Table control description (double-click the control).

      Remark

      The description window of a Table control includes two sections:
      • the upper section, presenting the name of control, the name of columns as well as their type.
      • the lower section, containing the different description tabs.
      If the name of Table control is selected, the lower section presents the characteristics of Table control.
      If a column is selected, the lower section presents the characteristics of columns.
    2. Click the "COL_OrdersID" column. The column title is displayed in the lower section of the screen. Replace the "Identifier of Orders" caption by "ID".
      Column title
    3. Click the "COL_FullName" column. Replace the "Full name" caption by "Customer".
      Column title
    4. Click the "COL_Caption" column. Replace the "Caption" caption by "Payment mode".
      Column title
    5. Validate the Table control description window. The control is automatically updated with the modifications performed.
    6. Enlarge the "Date" and "Status" columns in the Table control with the column width handles.
    7. Reduce the "ID" and "Payment mode" columns in order for all columns to be displayed in the Table control.
    8. Save the window by clicking Save an element among the quick access buttons. We are going to check the sizes of columns by running the window.

Remark

Live Data and controls based on queries
The Live Data is not displayed in the controls that use a query as data source for the following reason: The data displayed depends on the result of the query and can only be known at runtime.
  • We are going to run a first test of this window:
    1. Click Running the test of the window among the quick access buttons.
    2. Click the "Finding orders" tab pane. Only some orders are displayed, like during the last query test run in the editor, when parameters were specified in the test window of query.
      Window test
    3. Close the test window to go back to the editor.
  • Let's take a look at the WLanguage events associated with the Table control:
    1. Select the Table control.
    2. Open the popup menu (right click) and select "Code".
    3. The "Initializing TABLE_QRY_FindOrders" event contains the following code:
      // Parameters of 'QRY_FindOrders' query
      //MySource.ParamStatus = <Value of ParamStatus>
      MySource.ParamPaymentModeID = "1"
      MySource.ParamStartOfPeriod = "20160101"
      MySource.ParamEndOfPeriod = "20160331"
      The test parameters have been retrieved as default parameters for the execution. We are now going to modify the window in order for the parameters to be typed by the user, via controls.
    4. Close the code editor (click the cross in the top right corner of editor).


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