Using Ireport PrintOut() function in Delphi

Posted on 2004-11-23
Last Modified: 2008-01-09
I've avoided using the Ireport PrintOut() function till now because I hate its parameter requirements, which need you to specify starting and ending pages of the report being printed.

Now that I have to, how do I use it, ensuring that all the pages, of a varying length report, will be printed?

I envy VB user who can simply go...

> crRpt.PrintOut False

If you try to do this in Delphi, you get a > Not enough actual parameters <  [Error]. You are forced to supply all the parameters even to parameters you want to remain untouched.
Question by:ziche
    LVL 13

    Expert Comment

    Wow, that is annoying (I'm looking at their 'SCR8_Delphi_RDC_ADO' sample).  We use the VCL with Delphi 5 with no problems.

    I'll play around with the RDC for a bit and see if I can come up with something.

    LVL 13

    Accepted Solution

    Well, I can't find a way around passing all of the parameters, but this seems to work for me as a way to get all of the pages to print:

      Report.PrintOut(false, 1, true, 1, Report.PrintingStatus.NumberOfPages)


    Author Comment

    Wonderful! Thanks dave!
    LVL 13

    Expert Comment

    You're welcome.  Glad that'll work for you.


    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Join & Write a Comment

    Suggested Solutions

    Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
    Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
    This video discusses moving either the default database or any database to a new volume.
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now