table with more than one expression does not work accordingly
GlauberF opened this issue · 2 comments
I have a simple table and I need to group it with groups expression, but it doesn't work or I'm doing it wrong.
See the images of how I'm defining the template.
in the content I need to group by code(item_codigo_interno
), because I can't repeat the item with the same code, so I use expression.
however, doing this way, the total that should be at the end of each expression group is lost.
in short, the total should be below item 59
and item 59 above total and below item 58
test data used
[
{
"tipo" : "produto"
"ven_id" : "dbdcba72-cdf8-4e76-a668-0e8a503d774c"
"codigo_interno" : "81"
"data_emissao" : "2023-03-13 11:49"
"data_validade" : "2023-03-13 11:49"
"data_negociacao" : "2023-03-13 11:49"
"data_prazo_entrega" : "2023-03-13 16:14"
"numero_pedido_compra" : null
"tipo_negociacao" : "Pedido de venda"
"status_negociacao" : "Faturado"
"item_id" : "0aa7f321-a30d-4254-9371-4393c79ed4f4"
"item_codigo_interno" : "58"
"item_descricao" : "PISO LAMINADO AC3 FXM2093"
"item_quantidade" : 10.0
"item_vlr_unitario" : 23.0
"item_vlr_total" : 230.0
"destinatario_nome" : "Glauber"
"destinatario_cpf_cnpj" : "07000000002"
"destinatario_endereco" : "Rua Alberto Biavatti, 100 - Parque de Exposições - 89711-196 - Concórdia/SC - Brasil"
"vendedor_nome" : "Glauber"
"vendedor_email" : "glauber@any.com.br"
"numero_documento_fiscal" : 69
"id_estabelecimento" : "00000000-61bc-8ed0-a6ec-2155a040475d"
},
{
"tipo" : "produto"
"ven_id" : "03e37632-6bb9-4a42-bd20-766a2a6244ff"
"codigo_interno" : "82"
"data_emissao" : "2023-03-13 11:51"
"data_validade" : "2023-03-13 11:51"
"data_negociacao" : "2023-03-13 11:50"
"data_prazo_entrega" : "2023-03-13 16:14"
"numero_pedido_compra" : null
"tipo_negociacao" : "Pedido de venda"
"status_negociacao" : "Faturado"
"item_id" : "0aa7f321-a30d-4254-9371-4393c79ed4f4"
"item_codigo_interno" : "58"
"item_descricao" : "PISO LAMINADO AC3 FXM2093"
"item_quantidade" : 10.0
"item_vlr_unitario" : 23.0
"item_vlr_total" : 230.0
"destinatario_nome" : "Glauber"
"destinatario_cpf_cnpj" : "07000000002"
"destinatario_endereco" : "Rua Alberto Biavatti, 100 - Parque de Exposições - 89711-196 - Concórdia/SC - Brasil"
"vendedor_nome" : "Glauber"
"vendedor_email" : "glauber@any.com.br"
"numero_documento_fiscal" : 70
"id_estabelecimento" : "00000000-61bc-8ed0-a6ec-2155a040475d"
},
{
"tipo" : "produto"
"ven_id" : "ab7738d5-8f56-4304-af68-2fb491ff24f3"
"codigo_interno" : "83"
"data_emissao" : "2023-03-13 11:53"
"data_validade" : "2023-03-13 11:53"
"data_negociacao" : "2023-03-13 11:53"
"data_prazo_entrega" : "2023-03-13 16:14"
"numero_pedido_compra" : null
"tipo_negociacao" : "Pedido de venda"
"status_negociacao" : "Faturado"
"item_id" : "d5c4c05a-62f2-4752-bfc7-7e3f42833c62"
"item_codigo_interno" : "59"
"item_descricao" : "PISO LAMINADO AC3 FXM2250"
"item_quantidade" : 10.0
"item_vlr_unitario" : 15.0
"item_vlr_total" : 150.0
"destinatario_nome" : "Glauber"
"destinatario_cpf_cnpj" : "07000000002"
"destinatario_endereco" : "Rua Alberto Biavatti, 100 - Parque de Exposições - 89711-196 - Concórdia/SC - Brasil"
"vendedor_nome" : "Glauber"
"vendedor_email" : "glauber@any.com.br"
"numero_documento_fiscal" : 71
"id_estabelecimento" : "00000000-61bc-8ed0-a6ec-2155a040475d"
},
{
"tipo" : "produto"
"ven_id" : "f7f833c2-9402-484f-8008-6eef98b07a8a"
"codigo_interno" : "84"
"data_emissao" : "2023-03-13 11:55"
"data_validade" : "2023-03-13 11:55"
"data_negociacao" : "2023-03-13 11:54"
"data_prazo_entrega" : "2023-03-13 16:14"
"numero_pedido_compra" : null
"tipo_negociacao" : "Pedido de venda"
"status_negociacao" : "Faturado"
"item_id" : "d5c4c05a-62f2-4752-bfc7-7e3f42833c62"
"item_codigo_interno" : "59"
"item_descricao" : "PISO LAMINADO AC3 FXM2250"
"item_quantidade" : 10.0
"item_vlr_unitario" : 15.0
"item_vlr_total" : 150.0
"destinatario_nome" : "JESSICA"
"destinatario_cpf_cnpj" : "07000000002"
"destinatario_endereco" : "RUA PRIMO FACHINELLO, 78 - BELA VISTA - CASA - 89683-000 - Ponte Serrada/SC - Brasil"
"vendedor_nome" : "Glauber"
"vendedor_email" : "glauber@any.com.br"
"numero_documento_fiscal" : 72
"id_estabelecimento" : "00000000-61bc-8ed0-a6ec-2155a040475d"
},
{
"tipo" : "produto"
"ven_id" : "54aaa2d8-e5b6-4cae-a8e1-cb0e01775879"
"codigo_interno" : "85"
"data_emissao" : "2023-03-13 11:56"
"data_validade" : "2023-03-13 11:56"
"data_negociacao" : "2023-03-13 11:56"
"data_prazo_entrega" : "2023-03-13 16:14"
"numero_pedido_compra" : null
"tipo_negociacao" : "Pedido de venda"
"status_negociacao" : "Faturado"
"item_id" : "0aa7f321-a30d-4254-9371-4393c79ed4f4"
"item_codigo_interno" : "58"
"item_descricao" : "PISO LAMINADO AC3 FXM2093"
"item_quantidade" : 10.0
"item_vlr_unitario" : 23.0
"item_vlr_total" : 230.0
"destinatario_nome" : "JESSICA"
"destinatario_cpf_cnpj" : "07000000002"
"destinatario_endereco" : "RUA PRIMO FACHINELLO, 78 - BELA VISTA - CASA - 89683-000 - Ponte Serrada/SC - Brasil"
"vendedor_nome" : "Glauber"
"vendedor_email" : "glauber@any.com.br"
"numero_documento_fiscal" : 73
"id_estabelecimento" : "00000000-61bc-8ed0-a6ec-2155a040475d"
}
]
With this error description it will be very hard to reproduce your problem. There is no report template and the report seems quite complex. Again it would help to have a report template where the problem can be reproduced (with a template as simple as possible which still causes the issue) with the test data included in the report template.
I assume this is the same problem as Issue #26 which we will fix in our next release in April. Then you could try again to test if your problem is also fixed.
Alright, however there's another problem that I noticed which might also be related to this, but I'm not sure. There are situations where the report generated in PDF with expression groups comes out correctly with the totals, but in the Excel file, it doesn't. It ends up carrying the same total value for all of them. And if it were a layout error, it wouldn't be correct in the PDF either. Please see the image below.
Even in the xls, there are no totalizers in the other groups below as shown in the pdf.