PAGUE 6 MESES
LEVE 12 MESES
GARANTIR DESCONTO

Fórum Preciso da ajuda de vcs em relacao ao RAVE. #205283

09/01/2004

0

Bom Dia Pessoal,

Eh o seguinte, preciso da ajuda de vcs com o RAVE, ai vai as questoes:

OBS: Estou usando impressora matricial, e estou fazendo o relatorio no modo programado, nao uso o design do RAVE.

1.) Como faco para desabilitar as funcoes de impressora, tipo compactar e descompactar;

2.) Como faco para imprimir em mais de 80 colunas, so consegui fazer com que ele imprima em 80 colunas;

3.) E como defino o numero de linhas do relatorio, quando ele termina de imprimir a ultima linha do relatorio eu
coloquei 4 Println(´´); para imprimir 4 linhas em branco e se posicionar na proxima pagina
(minha pagina eh dividida no meio ´papel razao´ eh uma pagina normal dividida no meio 33 linhas)
mas ele salta como se a pagina tivesse 66 linhas.

Esse eh o codigo do relatorio, soh estou usando o ´RVSystem´;

Agradeco a todos que puderem me dar uma maozinha, OBRIGADO.

procedure TFrm_RELRES.BB_OKClick(Sender: TObject);
begin
RVSystem1.SystemPreview.FormState := wsMaximized;
RVSystem1.DefaultDest := rdPreview;
RVSystem1.SystemPrinter.Units := unCM;
RVSystem1.Execute;
end;

procedure TFrm_RELRES.RvSystem1Print(Sender: TObject);
begin
nLin := 6;
nPapel := 0;

SQLD_TB_RES_C.Close;
SQLD_TB_RES_C.Params[0].AsString := DM_CAIXA.xValida;
SQLD_TB_RES_C.open;

SQLD_TB_RES_D.Close;
SQLD_TB_RES_D.Params[0].AsString := DM_CAIXA.xValida;
SQLD_TB_RES_D.open;
xData := copy(SQLD_TB_RES_C.Fields[2].AsString,7,2)+´/´+copy(SQLD_TB_RES_C.Fields[2].AsString,5,2)+´/´+copy(SQLD_TB_RES_C.Fields[2].AsString,1,4);
xHora := FormatDateTime(´hh:mm´,Time);

DM_CAIXA.SQLQ_TB_CLI.CLOSE;
DM_CAIXA.SQLQ_TB_CLI.SQL.TEXT := ´SELECT * FROM TB_CLI WHERE A1_COD = ´´´+SQLD_TB_RES_C.Fields[3].AsString+´´´ ´;
DM_CAIXA.SQLQ_TB_CLI.OPEN;
xNome := copy(DM_CAIXA.SQLQ_TB_CLIA1_NOME.AsString,1,25);
xEndereco := DM_CAIXA.SQLQ_TB_CLIA1_END.AsString;

while SQLD_TB_RES_D.Eof = false do
begin
//Imprime o cabecalho
with sender as TBaseReport do
begin
if nLin > 1 then
begin
Println(´=====================================================================================´);

Print(´Reserva: ´);
Print(Format(´¬-07s´, [SQLD_TB_RES_C.Fields[1].AsString]));
Print(´Emissao: ´);
Print(Format(´¬-11s´, [xData]));
Print(´Hora: ´);
Print(Format(´¬-06s´, [xHora]));
Print(´Vendedor: ´);
Print(Format(´¬-07s´, [SQLD_TB_RES_C.Fields[6].AsString]));
Println(Format(´¬20s´, [SQLD_TB_RES_C.Fields[7].AsString]));

Print(´Cliente: ´);
Print(Format(´¬-07s´, [SQLD_TB_RES_C.Fields[3].AsString]));
Print(Format(´¬-26s´, [xNome]));
Println(Format(´¬-40s´,[xEndereco]));

Println(´-----------------------------------------------------------------------------------´);
Println(´Codigo Descricao do Produto Qtd Vlr Unit. Vlr Total´);
Println(´-----------------------------------------------------------------------------------´);
nLin := 6; //como o cabecalho tem 6 linhas comeca a imprimir os itens na linha sete
end;

{imprime os itens}
while (SQLD_TB_RES_D.Fields[1].AsString <> ´´) and (nLin < 24) do
begin
nZ3_QUANT := StrToFloat(SQLD_TB_RES_D.Fields[8].AsString);
nZ3_UNITAR := StrToFloat(SQLD_TB_RES_D.Fields[9].AsString);
nZ3_TOTAL := StrToFloat(SQLD_TB_RES_D.Fields[10].AsString);

nTotalBruto := (nTotalBruto + (nZ3_QUANT * nZ3_UNITAR));
nTotalLiq := nTotalLiq + nZ3_TOTAL;
nDescontos := nTotalBruto - nTotalLiq;

Print(Format(´¬-16s´, [SQLD_TB_RES_D.Fields[3].AsString]));
Print(Format(´¬-37s´, [SQLD_TB_RES_D.Fields[4].AsString]));
Print(Format(´¬09.2f´, [nZ3_QUANT]));
Print(Format(´¬10.2f´, [nZ3_UNITAR])); {preco unitario}
Println(Format(´¬10.2f´,[nZ3_TOTAL])); {preco total}
SQLD_TB_RES_D.Next;
nLin := nLin + 1;
end;

{imprime rodape}
Println(´´);
Print (´Responsavel ________________________________ TOTAL BRUTO ===> ´);
Println(Format(´¬11.2f´,[nTotalBruto]));
Println(Format(´¬-80s´, [DM_CAIXA.xMensagem]));
Print (´ DESCONTOS =====> ´);
Println(Format(´¬11.2f´,[nDescontos]));
Print (´ TOTAL LIQUIDO => ´);
Println(Format(´¬11.2f´,[nTotalLiq]));
Print(´=====================================================================================´);
Println(´ ´);
Println(´ ´);
Println(´ ´);
Println(´ ´);
nLin := 6; //numero de linhas que contem o cabecalho
end;
end;

end;


Claudio_f

Claudio_f

Responder

Utilizamos cookies para fornecer uma melhor experiência para nossos usuários, consulte nossa política de privacidade.

Aceitar