"Grid Index Out of Range" - Quick Report 2.0 with Delphi 2 
Author Message
 "Grid Index Out of Range" - Quick Report 2.0 with Delphi 2

Dear 'group

I am getting this error when using the print/printpreview method of the QR
components.  This happens when I have a TDBGrid on a TTabsheet of a
TPageControl.  If I view the page containing the grid, the error doesn't
occur.  I have about 5 pages each with a DBGrid on them, and user would
hardly ever want to visit all the pages before printing.

Have tried disable/enablecontrols around the print/preview methods, have
tried creating brand new tables/datasources to base the report on - all to
no avail.

Any more help would be appreciated.

Ta

Stu,



Fri, 23 Mar 2001 03:00:00 GMT  
 "Grid Index Out of Range" - Quick Report 2.0 with Delphi 2
You get this message because of a bug in the VCL. I still use D2 so i
don't know if it has been fixed yet. The way round it is to set the
DataSource property of all the grids attached to the table to nil, then
reset them after printing. I know it is a messy way to do it, but I had
this problem (and had very little time to fix it) and this does work.
Maybe someone has a better solution.

Can't think why it doesn't work if you create separate tables to base
the report on. QRReport scrolls through the dataset to create the print
or preview and for some reason, D2 goes pear shaped when the last row is
reached.

AJDR



Fri, 23 Mar 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. "Grid index out of range" nightmares

2. DBGrid "Grid Index Out of Range"

3. "Grid index out of range" nightmares

4. Error: "Field Index Out Of Range"

5. Index out of range in Grids (Delphi 2.0)

6. The keys "-"/"+"/"*"

7. rfc "delphi 2.0 book for beginners"

8. "insufficient field rights" (delphi 2.0)

9. Delphi 2.0 "Upgrade", IB40, Netware 3.12, and IPX/SPX

10. DBLookupCombo causes "out of range"

11. Delphi 2: "Index is Read Only"

12. HELP! "Grid Index out of range" Error

 

 
Powered by phpBB® Forum Software