[DUG] D2006 Rave reports

Cleon Pinto capinto at gmail.com
Fri Sep 8 21:29:02 NZST 2006


i haven't tried this but it may do the trick, i found it on their
newsgroups (news.nevrona.com)


***Start copy paste***

procedure TfrmPrinting.CallReportEngine(const RptName, RptType: string);
var
  i : integer;
  MyRpt : TRaveReport;
begin
  i := 0;
  with InterfaceRpt do
  begin
    Open;
    MyRpt := ProjMan.FindRaveComponent(RptName, nil) as TRaveReport;
    MyRpt.Printer := frmOfficeMain.GetINIValue(RptType);
    while i < ParamList.Count do
    begin
      SetParam(ParamList.Strings[i],ParamList.Strings[i + 1]);
      Inc(i);
      Inc(i);
    end;
    ExecuteReport(RptName);
    Close;
  end;
end;

CallReportEngine - is a private method of TfrmPrinting. All report
requests end up here.

GetINIValue - retrieves the printer name assigned to that report type
from the application .ini file. You can hardcode this instead.

ParamList - is how I can pass different parameter sets to the Rave engine.

***end copy paste***


On 9/8/06, John Bird <johnkbird at paradise.net.nz> wrote:
> To put the question simpler.....
>
> Rave changing default printer without Rave Dialog:
>
> I can get the list of printers and the default no problem from
> printer.printers and printer.printerindex.
> But if I alter the PrinterIndex Rave Reports ignores it as it always seems
> to revert to the default printer.
> Is there any way around that, or is there a property I have missed?
>
> John
>
>
> _______________________________________________
> Delphi mailing list
> Delphi at ns3.123.co.nz
> http://ns3.123.co.nz/mailman/listinfo/delphi
>


More information about the Delphi mailing list