Fortes Report com print direto sem o preview nao atualiza os dados

Delphi

26/09/2023

Olá Pessoal, boa tarde
Tenho um formulario com uma DBGrid, em cima do registro selecionado, eu clica botão com codigo abaixo, quando mando para video(Preview), eu vou
selecionando outros registros na Grid da certinho sem problemas, mas quando mando direto impressora(Print), ele fica imprimindo sempre o primeiro,.
ou seja os RLLabel do formulario relatorio nao atualiza.

O DBGRID esta em um formulario, e é chamado outro form, no caso abaixo FrmReciEntrada, os RLLabel estão recebendo os novos dados, ,mas quando mando
comando Print em vez preview nao atualiza.


procedure TFrmLanVeiculos.btnReciEntradaClick(Sender: TObject);
var
xPlaca:String;
begin
if (Application.MessageBox(Pchar(''Imprimir o Recibo de Entrada Nº ''+InttoStr(DM_Dados.qryVeiculosVEI_COD.Value)+'' ? ''),
''Confirmação'', MB_ICONQUESTION + MB_USEGLYPHCHARS) = mrYes) then Begin

FrmReciEntrada.RLLabel6.caption:=dm_Dados.qryVeiculosVEI_COD.AsString;
FrmReciEntrada.RLLabel8.caption:=dm_Dados.qryVeiculosVEI_ENTRADA.AsString;
FrmReciEntrada.RLLabel6.caption:=dm_Dadda.RLLabel10.caption:=dm_dados.qryVeiculosVEI_HORA_E.AsString;
xPlaca:=dm_dados.qryVeiculosVEI_PLACA.AsString;
xPlaca:=copy(xPlaca,1,3)+''-''+copy(xPlaca,4);
FrmReciEntrada.RLLabel12.caption:=xPlaca;
FrmReciEntrada.RLLabel13.caption:=dm_dados.qryVeiculosVEI_MARCA.AsString;

if radioGroup1.itemindex=0 then
FrmReciEntrada.RLReport1.Preview()
else
FrmReciEntrada.RLReport1.Print;
End;
Edson

Edson

Curtidas 0
POSTAR