I have a report for a productivity query as below:
Code: Select all
SELECT "TAB_PRODUCAO"."DATA", "TAB_SETOR"."SETOR", "TAB_FUNCIONARIO"."NOME", "TAB_TIPO"."TIPO", "TAB_PRODUCAO"."PRODUCAO", "TAB_PEDIDO"."PEDIDO", "TAB_PEDIDO"."ENTRADA", "TAB_PEDIDO"."LOTE", "TAB_PEDIDO"."DESCRICAO", "TAB_PEDIDO"."TAMANHO", "TAB_PRODUCAO"."OBSERVACAO" FROM "TAB_PRODUCAO", "TAB_PEDIDO", "TAB_FUNCIONARIO", "TAB_SETOR", "TAB_TIPO" WHERE "TAB_PRODUCAO"."ID_PEDIDO" = "TAB_PEDIDO"."ID_PEDIDO" AND "TAB_PRODUCAO"."ID_FUNCIONARIO" = "TAB_FUNCIONARIO"."ID_FUNCIONARIO" AND "TAB_FUNCIONARIO"."ID_SETOR" = "TAB_SETOR"."ID_SETOR" AND "TAB_PRODUCAO"."ID_SETOR" = "TAB_SETOR"."ID_SETOR" AND "TAB_PRODUCAO"."ID_TIPO" = "TAB_TIPO"."ID_TIPO" AND "TAB_PRODUCAO"."DATA" >= :DataInicial AND "TAB_PRODUCAO"."DATA" <= :DataFinal
It's just a query to retrieve the records "names" through their ID. It still basically just the table "TAB_PRODUCAO"
This query records have the following look:
Where I'd like to report the field called "PRODUCAO" grouping by "DATA" then "SETOR" then "NOME" and then "TIPO". I managed to do that with headers but, I'd like also to add a summarized table on each "DATA" header to show the total for each "TIPO" separated also by "NAME" and "SETOR". Something like the following:
Can I do that?