You are reading help file online using chmlib.com
|
Rave Reports Developer Guide Render NDR to PRN |
Top Previous Next |
QUESTION: I have previously saved NDR files and I want to save them to printer (PRN) files. How would I do that?
SOLUTION: This solution applies to Rave Reports version 5.1.2 or later. The following code starts with having a RvSystem component on your form named RvSystem1.
It is important to note that the current printer (default) will be used to generate the printer file. This means that the generated file can ONLY be sent to that printer since the contents of printer files are specific to the printer they were generated for.
Also, the copy binary command on some operating systems may have problems if you use the PRN extension. COPY filename.ext PRN: /B
Be advised that both "DoNativeOutput" and "RenderObject" are not required for this NDR file conversion and need not be set.
Delphi: Procedure TForm1.Button1Click(Sender: TObject); Begin RvSystem1.DefaultDest := rdPrinter; RvSystem1.SystemFiler.FileName := 'Test.NDR'; RvSystem1.SystemOptions := RvSystem1.SystemOptions + [soNoGenerate]; RvSystem1.SystemSetups := RvSystem1.SystemSetups - [ssAllowSetup]; RvSystem1.SystemFiler.StreamMode := smFile; RvSystem1.OutputFileName := 'test1.ptr'; RvSystem1.Execute; ShowMessage('Printer File created'); End;
C++Builder: void __fastcall TForm1::Button1Click(TObject *Sender) { RvSystem1->DefaultDest = rdPrinter; RvSystem1->SystemFiler->FileName = "Test.NDR"; RvSystem1->SystemOptions = RvSystem1->SystemOptions + [soNoGenerate]; RvSystem1->SystemSetups = RvSystem1->SystemSetups - [ssAllowSetup]; RvSystem1->SystemFiler->StreamMode = smFile; RvSystem1->OutputFileName = "test1.ptr"; RvSystem1->Execute; ShowMessage("Printer File created"); } |
You are reading help file online using chmlib.com
|