Einzelnen Beitrag anzeigen

merlin17

Registriert seit: 15. Dez 2002
Ort: Mittelfranken
980 Beiträge
 
Delphi 10 Seattle Enterprise
 
#8

Re: Rave Druckvorschau anpassen!

  Alt 17. Dez 2004, 15:48
Christof,
Code:
procedure TRvPreview.DruckenBtn(Sender: TObject);
var
  DoPrint: boolean;
  I1: integer;
  ForceCopies: integer;
begin
  if soAllowPrintFromPreview in ReportSystem.SystemOptions then begin
    RvRenderPrinter.NDRStream := RvRenderPreview.NDRStream;
    RvRenderPrinter.Pages := RvRenderPreview.Pages;
    if ssAllowPreviewSetup in ReportSystem.SystemSetups then begin
      with TRpSetupForm.Create(self) do try
        PreviewSetup := true;
        ReportSystem := Self.ReportSystem;
        FilePrinter := RvRenderPrinter;
        DoPrint := (ShowModal = mrOK);
        RvRenderPrinter.IgnoreFileSettings := true;
      finally
        Free;
      end; { with }
    end else begin
      DoPrint := true;
    end; { else }

    if DoPrint then begin
      if (RvRenderPrinter.MaxCopies <= 1) and (RvRenderPrinter.Copies > 1) then begin
        ForceCopies := RvRenderPrinter.Copies;
        RvRenderPrinter.Copies := 1;
      end else begin
        ForceCopies := 1;
      end; { else }
      for I1 := 1 to ForceCopies do begin
        if Assigned(RvRenderPrinter.NDRStream) then begin
          RvRenderPrinter.Render(RvRenderPrinter.NDRStream);
        end else begin
          RvRenderPrinter.Render(InputStream);
        end; { else }
      end; { for }
      AfterPreviewPrintEvent;
      RvRenderPrinter.NDRStream := nil
    end; { if }
  end; { if }
  SetButtonState;
end;
man sollte aber das NDR.System mit den anderen Engines verstanden haben, um den internen Ablauf von Rave zu verstehen...
dann gehen dinge, die sind absolut toll, z.B. streaming der reports über Http/soap etc.etc.;
ist am Anfang aber heavy, gebe ich zu (vor allem in der be-Version on Source...)

thomas, TeamNevrona
- TeamNevrona cannot respond to questions received via email -
http://rave-notes.blogspot.com
  Mit Zitat antworten Zitat