Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8315161
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T21:04:07+00:00 2026-06-08T21:04:07+00:00

I get errors like List index out of bounds when sending a QuickReport report

  • 0

I get errors like “List index out of bounds” when sending a QuickReport report to the selected printer as the Printer.Printers stringlist is accessed.

exception class   : EStringListError
exception message : List index out of bounds (6).

main thread ($1594c):
00479559 skdata.exe   Classes   5060 TStringList.GetObject
004a258b skdata.exe   Printers   581 TPrinter.GetPrinter
007ca744 skdata.exe   QRPrntr   3208 TPrinterSettings.ApplySettings
007cb5bb skdata.exe   QRPrntr   3995 TQRPrinter.BeginDoc
007be227 skdata.exe   QuickRpt  4645 TCustomQuickRep.CreateReport
007be909 skdata.exe   QuickRpt  4853 TCustomQuickRep.Print
00859bc7 skdata.exe   PostLst    142 TPostSpecListReport.Print

I’ve added logging that shows that the list of printers (Printer.Printers) has changed just before the error happened. I guess the list of printers can change if a network printer is switched off, if the network is down, and for other reasons too.

How to handle this situation? In Delphi the selected printer is given by the Printer.PrinterIndex, but if the list of printers is changed, then this index is not valid anymore.

I can only think of one solution which is to present the select-printer dialog before every print, in other words not to rely in Printer.PrinterIndex being correct from one print job to the next. But that could be quite annoying to the user.

Ideally the selected printer should be stored as a GUID or by name. That would make it more reliable.

I’ve searched this forum as well as the Embarcadero forum but haven’t found any mention of this kind of problem. So maybe there’s something simple here that I’ve overlooked?

I use Delphi 2007 and QuickReport 5.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T21:04:08+00:00Added an answer on June 8, 2026 at 9:04 pm

    You can store the printer name, if you’d like, and assign it in the OnBeforePrint event handler or in the constructor of the report. If you don’t want to hard-code it, store it in the registry or an ini file.

    type
      TMyForm = class(TForm)
      ....
      private
        FPrinterName: string;
      published
        ....
      end;
    
    implementation
    
    uses
      Printers;
    
    procedure TMyForm.FormCreate(Sender: TObject);
    begin
      // Set, or read from registry or ini file
      FPrinterName := 'My LaserJet Printer';
    end;
    
    procedure TMyForm.PrintReportButtonClick(Sender: Object);
    begin
      // Create report and set up. Select stored printer, or set to default
      // printer if none is stored
      QuickRep1.PrinterSettings.PrinterIndex := Printers.IndexOf(FPrinterName);
      QuickRep1.Print;
      // Clean up - free report, etc.
    end;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Sometimes, while coding in PHP we get parse or syntax errors like those: Parse
sometimes i get an error like table is marked as corrupt and shld be
I have created Controller Attribute and would like to read SessionId but get error
I get this error when compiling a C# application. Looks like a trivial error,
I get a syntax error in Python 2.7.3 like so: [s += 'Orig' for
When running the packaged app like java -jar my-app-0.0.1-SNAPSHOT-jar-with-dependencies.jar, I get the following error:
I tend to get errors such as: Fatal error: Cannot redeclare get_raw_data_list() (previously declared
When I run the test suite of django I get errors on the auth
I want to do the following,but I get errors: procedure JumpToCodeCave(CurrentLocation:DWORD;Destination:Pointer;out_JmpBack:Pointer); var calc:DWORD; jmppatch:Array[0..3]
when I try to create arrays in my script I get errors. id[1]=string2; would

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.