🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #2635

QReport Printing Problem

#2635
From: Gary
Date: Tue, 29 Apr 2003 22:35
33 lines
1979 bytes
When I attempt to print a report with the following code:

   ReportForm = new TReportForm(Application, Qstr1, Qstr2);
   ReportForm->QuickRep1->Preview();
   ReportForm->Close();
   ReportForm = NULL;

I must manually feed the printer (It's a Cannon Desk Jet)
I can't find any way to "Load" the printer in code.

If however I attempt to just Print like so:

   ReportForm = new TReportForm(Application, Qstr1, Qstr2);
   ReportForm->QuickRep1->Print();
   ReportForm->Close();
   ReportForm = NULL;

Things go terrably wrong.
First I Get a Wpspsw error which I can Close or Ignore
(and lose unsaved info etc etc)
Then the report will print normaly

afterwards I get a Spool32 Error which I can Close or Ignore
(and lose unsaved info etc etc)
Which then crashes any future printing until I reboot.

Any help with getting this to work would be great.
The help file says I should write the code like this:

   ReportForm->QuickRep1.Print;
But it will not compile this way.

Help please????
Technical Details
Message-ID: <3eaefec2@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!priapus.visi.com!news-out.visi.com!petbe.visi.com!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,23a46fcabf3b8e1c,start
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2003-04-29 15:40:05 PST
Reply-To: "Gary" <gcdesroches@mindspring.com>
From: "Gary" <gcdesroches@mindspring.com>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: QReport Printing Problem
Date: Tue, 29 Apr 2003 17:35:24 -0500
Lines: 35
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 216.80.157.243
Message-ID: <3eaefec2@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1051655874 216.80.157.243 (29 Apr 2003 15:37:54 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!priapus.visi.com!news-out.visi.com!petbe.visi.com!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail