TRVItemList object range is 0..0

ReportWorkshop support and discussion (TRichView reporting add-on)
Post Reply
Ceprotec
Posts: 259
Joined: Thu Oct 28, 2010 6:09 pm
Contact:

TRVItemList object range is 0..0

Post by Ceprotec »

My reports are generated in a hidden form (the Show method is never called).

Most reports work well. However, some have exceptions when calling the Format method.

CallStack:

Code: Select all

System.Classes                          TList.Get
CRVData                      11601   +1 TCustomRVData.GetItem
CRVData                       5344   +1 TCustomRVData.IsFromNewLine
CRVFData                     14042   +1 TCustomRVFormattedData.IsFromNewLineEx
CRVFData                     13338   +1 TCustomRVFormattedData.IsDrawItemLastOnWrappedLine
RVERVData                     4456  +13 BuildCaretPositionsForDrawItem
RVERVData                     4546  +27 TRVEditRVData.OnChangeCaretLine
RVERVData                     6755   +9 TRVEditRVData.PrepareForEdit
RVERVData                     8087   +1 TRVEditRVData.GetCurItemNo
RVEdit                        2316   +0 TCustomRichViewEdit.GetCurItemNo
SclRView                     21251   +6 TSRichViewEdit.GetRVCaretRect
SclRView                     17939  +11 TSRichViewEdit.CalculateCaretPos
SclRView                     16643  +19 TSRichViewEdit.UpdatePosition
SclRView                      7549  +75 TSRVViewProperty.SetZoomPercent
SclRView                     13954  +10 TSRichViewEdit.UpdateView
SclRView                     19645 +128 TSRichViewEdit.SetMarginUnit
SclRView                     18723  +18 TSRichViewEdit.SetRVMargins
SclRView                     19323   +7 TSRichViewEdit.Format
UReportGeneratorForm        3083  +27 TReportGeneratorForm.ActionGenerateReportExecute

Code: Select all

GenerateReport ( srveResult , RVReportGenerator1 ) ;
srveResult.Format; // exception here

Code: Select all

exception number   : 1
exception class    : EListError
exception message  : List index out of bounds (1). TRVItemList object range is 0..0.
Any tips?

I will send the report template to your email.
Sergey Tkachenko
Site Admin
Posts: 17554
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: TRVItemList object range is 0..0

Post by Sergey Tkachenko »

Answered by email
Ceprotec
Posts: 259
Joined: Thu Oct 28, 2010 6:09 pm
Contact:

Re: TRVItemList object range is 0..0

Post by Ceprotec »

Answered by email :D
Sergey Tkachenko
Site Admin
Posts: 17554
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: TRVItemList object range is 0..0

Post by Sergey Tkachenko »

Summary: there really was a bug in ScaleRichView, if it was cleared by DeleteItems (not by Clear) and then formatted without adding a new content.
It may happen when ReportWorkshop generated an empty report in ScaleRichView (because a root data query returned 0 records).
This problem was fixed in the new version.
Post Reply