Quick Reports - knowing if a report has been printed ...

In one of our applications it is required that a report is printed. Currently we don't use the qr.preview() method, but simply use qr.print().

A customer has asked if we could provide a preview first.

The thing is that it is a *requirment* that the report is preinted. So, if we preview the report, we still need to ensure the report is printed, not just viewed.

Code like this would be ideal:

qr.preview();
if not qr.printed then
  qr.print();

Is it possible to know if the report was printed when in preview?

Thanks,

Mike
0
Michael
9/12/2008 2:13:04 PM
embarcadero.delphi.reporting 487 articles. 0 followers. Follow

2 Replies
1015 Views

Similar Articles

[PageSpeed] 57

//Use the OnPreview  event and set your report event:
QuickRep1.OnPreview := QuickRep1Preview;


// Force the print when a preview occurs
procedure TForm1.QuickRep1Preview(Sender: TObject);
begin
 QuickRep1.PrintIfEmpty := True;
 if QuickRep1.Printer.PrinterOK then
   Quickrep1.Print;
end;

// set PrintedReport to true if the report was printed
procedure TForm1.QuickRep1AfterPrint(Sender: TObject);
begin
  PrintedReport := True;
end;

if you want to go on with this then you can do something like keep opening the preview until the print is successfull or a timeout occurs

Quickrep1.AfterPreview := QuickRep1AfterPreview;
procedure TForm1.QuickRep1AfterPreview(Sender: TObject);
begin
  if (not PrintedReport) and (NumTries < 3) then
 begin
   Inc(NumTries);
  Quickrep1.Preview; 
 end;
end;


> {quote:title=Michael Vincent wrote:}{quote}
> In one of our applications it is required that a report is printed. Currently we don't use the qr.preview() method, but simply use qr.print().
> 
> A customer has asked if we could provide a preview first.
> 
> The thing is that it is a *requirment* that the report is preinted. So, if we preview the report, we still need to ensure the report is printed, not just viewed.
> 
> Code like this would be ideal:
> 
> qr.preview();
> if not qr.printed then
>   qr.print();
> 
> Is it possible to know if the report was printed when in preview?
> 
> Thanks,
> 
> Mike
0
Dmitry
9/12/2008 2:51:24 PM
Thanks, Dmitry, 

Interesting approach - I'll check it out.

Regards,

Mike

> {quote:title=Dmitry Savy wrote:}{quote}
> //Use the OnPreview  event and set your report event:
> QuickRep1.OnPreview := QuickRep1Preview;
> 
> 
> // Force the print when a preview occurs
> procedure TForm1.QuickRep1Preview(Sender: TObject);
> begin
>  QuickRep1.PrintIfEmpty := True;
>  if QuickRep1.Printer.PrinterOK then
>    Quickrep1.Print;
> end;
> 
> // set PrintedReport to true if the report was printed
> procedure TForm1.QuickRep1AfterPrint(Sender: TObject);
> begin
>   PrintedReport := True;
> end;
> 
> if you want to go on with this then you can do something like keep opening the preview until the print is successfull or a timeout occurs
> 
> Quickrep1.AfterPreview := QuickRep1AfterPreview;
> procedure TForm1.QuickRep1AfterPreview(Sender: TObject);
> begin
>   if (not PrintedReport) and (NumTries < 3) then
>  begin
>    Inc(NumTries);
>   Quickrep1.Preview; 
>  end;
> end;
> 
> 
> > {quote:title=Michael Vincent wrote:}{quote}
> > In one of our applications it is required that a report is printed. Currently we don't use the qr.preview() method, but simply use qr.print().
> > 
> > A customer has asked if we could provide a preview first.
> > 
> > The thing is that it is a *requirment* that the report is preinted. So, if we preview the report, we still need to ensure the report is printed, not just viewed.
> > 
> > Code like this would be ideal:
> > 
> > qr.preview();
> > if not qr.printed then
> >   qr.print();
> > 
> > Is it possible to know if the report was printed when in preview?
> > 
> > Thanks,
> > 
> > Mike
0
Michael
9/12/2008 3:13:37 PM
Reply:

Similar Artilces:

about report reports generation and emailing reports
hi i am a bit new to Bugzilla, i am using 2.18rc3version. and i am facing two problems with report generation. 1) the checksetup.pl shows all the perl modules includig optional perl modules to be installed and available including thse required for graphical report generation. but despite this i am able to get tabular reports generated but when i click for line/bar reports of the same tabular report the next page does not show the required pie/bar reports. 2) is there any facility for sending these generated reports to the client via email through Bugzilla? kindly help. regards...

Converting Crystal Reports 9 report to Crystal Reports .NET report
I have a web page that is supposed to display a crystal report.  The report is fully written and functional in crystal 9 (non-.Net)  .  Is there a way to convert my .rpt so that I can just include it in the new web site? why you don't try to compile project with .net and include your report. then if crystal report is power tool will suggests you with conversation tool    My blog is here.Please remember to 'Mark as Answer' if this post answered your question! Wow it really was that easy!  I just added the old crystal report into my .NET proj...

Are there other reporting tools other than reporting services and crystal reports
Has anyone had any experience with any reporting tools other than Reporting services and Crystal reports? If so, is there one that you would strongly recommend? Or, are these two the top choice on the market for report generation from .NET? I have heard some moaning and groaning about reporting services. Specifically in regards to the amount of time needed to design a report. Crystal reports seems kind of difficult to me, as I don't have any training with it. Basically I am looking for a reporting tool that is easy to use, and can be used from .NET....

Report Control (report viewer and report designer)
Hi there! ive looked over the forums and other websites that you referred but i dont have any luck for reports. i created a page that has simple data-entry, aside from that, i do want to have a printable report on what are the items i have added this day. i am using a report designer (rdlc) and a report viewer, which is in a aspx page. ive explored how it works for a simple select statement but i want to know how it will work for parameter passing. a referral for a tutorial website for the report viewer and report designer is very much appreciated. or if you want to share your...

A report inside a report
Hello, I have a decent understanding of .net 1.1 and up until now I have never worked with crystal reports. I need to modify an existing report at my job. The modification that needs to be made seems to be a tricky one. Right now the report is straight foward datagrid style. Each row has one value in each field. Now comes the change... There is a one to many relationship with one of the fields meaning there needs to be a display of multiple indicators per row. So each row can have multiple indicators. So I would like to list each indicator based on the id of each row. So one row can ha...

Reporting and Report Data
I have a few questions about reports.   First, can anyone tell me where the customer datat is stored. I assume it is on the momsql01  server but in which database is the live data stored? I have checked a few and cant seem to locate any accurate data about customers on the system.   Also, i am running  a unmolested 3.5 HMC install with a few customers on it. IM pulling up the reporting pages and under cumulative reports and im not seeing accurate numbers. (to be more accurate HOME>Hosted Messaging and Colab Services Reports>Cumulative Reports) If i click on a ...

How to Print Z Report in Crystal Report?
Hi How can I Create Z report on Crystal Report by Z i mean Second Row Should be to the next of the First One Like This First Row Second Row Third Row Forth Row Fifth Row Sixth Row Can anyone help me here? any one?!  You can achieve this by checking "Format with multiple column" in Section Expert. And in layout tab checked 'Accross then down'. Detail --> Format Section -->Checked 'Format with multiple column'  Detail --> Format Section --> Layoutchecked 'Accross then down' This may help.Thanks, &n...

Crystal Report Report on ASP.net page, report formatting
Hello, I am new in ASP.net/C# 2.0 and Cristal Report, I would like to create some reports using crystal report, my question is: When I build a webpage with report created by Crystal reports, can I print only the report and be well formatted (for paper print), and if, possible, printed in pdf and other format?   Thank a lot for your useful suggestions.   Hello, any help will be very appreciated.   Thank...

How can I cahnge the report header before i load the report into the report viewer?
That is basically it... Thanx in advance What are you trying to change? The report title, the items in the header, etc... Basically, in CR.NET you can't add new objects to the report during runtime. However, you can modify existing objects by setting a reference to them and then changing the properties. I have ample source code in my free ebook that teaches you how to modify the different properties of each report object. www.CrystalReportsBook.com?cpgn=asp.net HTH, Brian Bischof Brian Bischof www.CrystalReportsBook.com ...

How to call Sub report from main report with main report parameters
Using SSRS 2008 i have implemented a chart and i have passed parameters to chart properties --> jump report and i implemented a subreport. when ever i am clicking main report chart its redirecting to subreport but its not taking the parameters once again i need to select the subreport parameters then only its working.   Can any one help me how to move to the subreport along with parameters.   Thanks in advance  For further help with SSRS, you could ask at:SQL Server Team http://www.sqlteam.com/forums/ SQL Server Central http://www.sqlservercentral.com/ SQL Server at M...

display reporting services report in report viewer in remote mode
Hi  I have some problem in displaying a report done through reporting services in asp.net 2.0 report viewer server control for remote processing mode.I have created a Reporting Services project through Business Intelligence Development Studio and another Web application project in VS 2005. I have take a Report Viewer control on a form to view report created in the reporting services project. I have set the Processing mode of Report Viewer to Remote, have set ReportServerURL to "http://localhost/ReportServer" and Report Path as the "/(Reporting service proje...

scripts to convert reporting services report to pdf of 40+ reports
Dear all, I have 40+ reports in reporting services. Is there any scripts to convert these reports with passing parameters to pdf and save in the folder scheduledly? As user will be very uneasy to go to the web site and click for each report everytime in reporting service site. Thanks you for your help!!! Hi, From your description, you are wondering how to export the report to the pdf without viewing the report in browser. If so, we could achieve it via the following code.        Microsoft.Reporting.WebForms.ReportViewer rview = new Microsoft.Reporti...

ANN: Delphi HTML Reports preview
Very simple to use - buid complex reports in 10 minutes. All you need to know - SQL, HTML, CSS. Use all power of HTML4 and CSS3 in any part of report. Features: Barcodes Multiline headers Groups Cross-tabs (any level) Transformations (cross-tab with range) Pictures (+from database) Master/Detail (any level) Supports all databases and db-libraries (writing adapter for any db-acess library takes only 5 minutes) Standalone reports - no need for delphi forms/datasets. 100% native Delhi code. All Delphi versions - from Delphi 6 to XE6 (VCL). 32/64 bit. Supports Unicode for...

D6 Quick Report To XE2 Fast Report?
Not long after I upgraded to XE2, I participated in a webinar going over the features of Fast Reports and there was mention of a method for converting Quick Report forms from older versions of Delphi to Fast Reports included with XE2. I'm now trying to upgrade an older D6 application to XE2 and it has a substantial number of Quick Report forms; can someone point me to instructions for converting D6 Quick Reports to XE2? Thanks, - Chris The FastReports recommended way from their website is to use the ConverterQR2FR.pas unit in a program to convert the files: add the module Conver...

Printing a report using Crystal reports and C#
I have a web page that uses the Wizard control that steps thru and collects info from a datasource. I would like to take this info , create a SelectionRecord string, pass it to a report and print the report. I do not need to view the report, I would just like to send it to the printer. Can someone send me the C# code that would handle this and were would I place the code so it prints when I click on the Finish button of the Wizard. Keep in mind I'm fairly new to C#    ...

Web resources about - Quick Reports - knowing if a report has been printed ... - embarcadero.delphi.reporting

Latest Marketing, Tech, Social Media, and Blog Marketing Finds - The Friday Traffic Report
The Friday Traffic Report Home Blog Subscribe! About Jack and Jim Website Promotion Social, Tech, Marketing News Subscribe Now Latest Marketing, ...

Mile High Report - For Denver Broncos Fans
MileHighReport(MHR) is the ultimate independent resource for the Denver Broncos on the web. Along with MHR Radio, the official podcast of MHR, ...

the rajam report
… I kept having trouble with understanding what “mode” I was in, for lack of a better term. Specifically, it was weird that “glances” could only ...

Rasmussen Reports™: The Most Comprehensive Public Opinion Data Anywhere
Rasmussen Reports - The best place to look for polls that are spot on

Bull Report
Qualcomm to Post Results, to Seal Deal with TDK Qualcomm, Inc. is expected to release its earnings report for the first quarter of the fiscal ...

Insider Trading Report - Institutional Ownership & Insider Trades
Crude Futures Break Below $60, Supply Glut, Weak Demand... Asia Continues to Rally, India Shines, China...

U.S. News & World Report - Wikipedia, the free encyclopedia
U.S. News & World Report is an American news magazine published from Washington, D.C. Along with Time and Newsweek it was for many years a leading ...

Mass deaths of detainees in Syrian Government jails amounts to crime of 'extermination', UN report says ...
Detainees held by the Syrian Government are dying on an extermination scale, a UN report says.

Report: Apple’s quest for retail stores in India on track as government plans to approve application
... stores in India. Apple Stores in India have been a long time coming, but now it looks like they are finally getting close. Bloomberg reports ...

Report: Google to launch a Gear VR competitor, build VR into Android OS
... virtual reality initiative is too big for the company to just be working on Google Cardboard, and now the Financial Times has published a report ...

Resources last updated: 2/9/2016 12:26:50 PM