QuickReport - Etiquetas |
Top Previous Next |
|
Segue a rotina que usei para ordenar as etiquetas, bem simples mas funciona. (O quick coloca vertical e não horizontal...) ============================================================================ reg := DM1.TOrderImp.RecordCount; pos := 1; // posição de impressão x := 1; // Coluna 1, 2, 3 y := 1; // Conjunto de 12 tickes tx := reg mod 12; dife:=0; if tx > 0 then dife:= reg+(12-tx);
Application.ProcessMessages; while reg < dife do begin DM1.TOrderImp.insert; DM1.TOrderImpCOD.Value:=DM1.TableSeqORDEMIMP.Value; DM1.TableSeq.edit; DM1.TableSeqORDEMIMP.Value:= DM1.TableSeqORDEMIMP.Value+1; DM1.TableSeq.Post; DM1.TOrderImpDescricao.Value:='Inutilizado'; DM1.TOrderImp.post; inc(reg); end; reg := reg + (12-tx); DM1.TOrderImp.First; codigo:= DM1.TOrderImpCod.Value; Application.ProcessMessages; While pos <= reg do begin DM1.TOrderImp.Locate('cod',codigo,[]); inc(codigo); DM1.TOrderImp.Edit; DM1.TOrderImpOrdemImp.Value:=pos; DM1.TOrderImp.Post; Case x of 1 : pos := pos + 4; 2 : pos := pos + 4; 3 : if pos = (12 * y) then begin pos := pos + 1; inc(y); end else pos := pos - 7; end; if x < 3 then inc(x) else x := 1; end;
|