Relatório com Gráfico

Delphi

25/08/2005

Pessoal, estou imprimindo um relatório com um gráfico, o problema, é que n to conseguindo acertar uma posição em Y para a impressão do gráfico.
Se aumentar ou diminuir o nr de registros que aparece antes do gráfico, já n dá mais certo.
Será que alguém poderia me ajudar?

Obrigada.


Códigos da função e da chamada do gráfico abaixo:


procedure TfrmPrincipal.PrintBitmapScaled(BaseReport: TBaseReport;
                              X1: double;
                              Y1: double;
                              DesiredWidth: double;
                              DesiredHeight: double;
                              Bitmap: TBitmap);
  var
    Calc: double;

  begin { PrintBitmapScaled }
    If Bitmap.Empty = True then Exit;
    With BaseReport do begin
      If DesiredWidth <= 0.0 then begin
        Calc := DesiredHeight * (Bitmap.Width / XDPI) / (Bitmap.Height / YDPI);
        PrintBitmapRect(X1,Y1,X1 + Calc,Y1 + DesiredHeight,Bitmap);
      end else if DesiredHeight <= 0.0 then begin
        Calc := DesiredWidth * (Bitmap.Height / YDPI) / (Bitmap.Width / XDPI);
        PrintBitmapRect(X1,Y1,X1 + DesiredWidth,Y1 + Calc,Bitmap);
      end else begin
        PrintBitmapRect(X1,Y1,X1 + DesiredWidth,Y1 + DesiredHeight,Bitmap);
      end; { else }
    end; { with }
  end;  { PrintBitmapScaled }


        frmPrincipal.PrintBitmapScaled(ReportObj,2.8,PosicaoY,
                                      ReportObj.PageWidth - 5.0 - (ReportObj.MarginLeft+ReportObj.MarginRight),
                                      0.0,Grafico);




Ffpradella

Ffpradella

Curtidas 0
POSTAR