-1
I made a label printing works well, to print a label for each existing product or the Masterdata does correctly.
Except that for Label or that I wanted it to be the same product, if I repeated an agreement with the minimum amount used by the user, one question is how do I do this with Masterdata? Is it possible? I know that to print only one right product is to do a search and leave the storage in Dataset more in the same way that it will print 1 time and not a certain amount. EX: user entered the number 3 ai appears like this in another level
PRODUCT 1 PRODUCT 1 PRODUCT 1
I did so:
procedure TFm_Gerar.SELECIONARClick(Sender: TObject);
var
qtd : String;
cont,ndias : integer;
resultado,data : TDateTime;
begin
InputQuery('qtd','Informe quantas datas:',qtd);
cont:= 1;
ndias := dm.CDS_VERIFICA_PRODUTO.FieldByname('validade').AsInteger;
data := Date;
RESULTADO := data + ndias;
if messagedlg('Deseja imprimir a
data?',MtConfirmation,mbYes,mbNo],0)=mrYes then
begin
while qtd >= (IntToStr(cont)) do
begin
cont:= cont +1;
// dm.data.LoadFromFile('data.fr3');
// dm.data.Variables['qtda'] := IntToStr(qtd);
dm.data.ShowReport;
end;
end;
end;
and the procedure I have made cited continues?
– Diego Ferreira Ribeiro
I don’t understand what you’re talking about? can you improve the question?
– Valmor Flores
I do the code you gave me along with what I did?
– Diego Ferreira Ribeiro
You should try to understand based on the information I’ve given you. If you observe your method calls several times the printing routine, which for full-page reports (such as letters) would even serve, but not for labels. The approach I used is different, it is based on the same print with a range of data with the information so that it is easy to keep the report independent of the data. So you must choose one way or the other.
– Valmor Flores