I used TRichEdit to create report. Application works fine. When i try to use TScaleRichView i get the following exception
|00A1A9C9|Personal.exe|RVEdit.pas |TCustomRichViewEdit |BeforeInserting |955[16] |
|00A1A930|Personal.exe|RVEdit.pas |TCustomRichViewEdit |BeforeInserting |939[0] |
|00A1ACD3|Personal.exe|RVEdit.pas |TCustomRichViewEdit |InsertTextA |1056[8] |
|00A1ACBC|Personal.exe|RVEdit.pas |TCustomRichViewEdit |InsertTextA |1051[3] |
|00A1AC80|Personal.exe|RVEdit.pas |TCustomRichViewEdit |InsertTextA |1048[0] |
|00A1AD3B|Personal.exe|RVEdit.pas |TCustomRichViewEdit |InsertText |1072[4] |
|00A1AD38|Personal.exe|RVEdit.pas |TCustomRichViewEdit |InsertText |1068[0] |
|00B8E006|Personal.exe|uPersonalRVReportEditForm.pas| |PrepareRTFReport |263[43] |
Sometimes exception raising in RVERVData.pas on line 6757
Markers := GetMarkers(False);
Sometimes report generated but on edit i get exception
|00424781|Personal.exe|Classes |TList |Get | |
|00424760|Personal.exe|Classes |TList |Get | |
|00A85719|Personal.exe|RVItem.pas |TRVItemList |GetObject |5061[1] |
|00A8570C|Personal.exe|RVItem.pas |TRVItemList |GetObject |5060[0] |
|00A64746|Personal.exe|CRVData.pas |TCustomRVData |GetItem |7143[3] |
|00A64734|Personal.exe|CRVData.pas |TCustomRVData |GetItem |7140[0] |
|00A5BC9C|Personal.exe|CRVData.pas |TCustomRVData |GetItemStyle |3651[2] |
|00A5BC94|Personal.exe|CRVData.pas |TCustomRVData |GetItemStyle |3649[0] |
This is code for generate report
Editor.BeginUpdate;
try
AStream.Position := 0;
Editor.InsertRVFFromStreamEd(AStream);
Editor.Format;
for i := 0 to Count - 1 do
begin
ASearchStr := 'old stirng';
AReplaceStr := 'new string';
Editor.SetSelectionBounds(0, 0, 0, 0);
while Editor.SearchText('%' + ASearchStr + '%', [rvseoMatchCase, rvseoDown]) do
begin
Editor.InsertText(AReplaceStr); // exception on this line
end;
end;
end;
Thanks
Bugs
-
- Site Admin
- Posts: 17569
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17569
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
I cannot reproduce this error. I tried this code:
Please send me a source code of simple project reproducing the problem.
Code: Select all
var ASearchStr, AReplaceStr: String;
i: Integer;
begin
SRichViewEdit1.RichViewEdit.Clear;
SRichViewEdit1.RichViewEdit.Format; // necessary before editing method
SRichViewEdit1.RichViewEdit.InsertRVFFromFileEd('d:\ExceptionTemplate2.rvf');
SRichViewEdit1.RichViewEdit.Format; // not necessary after editing method
for i := 0 to 3 - 1 do
begin
ASearchStr := the first occurence of string to replace in the doc;
AReplaceStr := 'new string';
SRichViewEdit1.RichViewEdit.SetSelectionBounds(0, 0, 0, 0);
while SRichViewEdit1.RichViewEdit.SearchText('%' + ASearchStr + '%', [rvseoMatchCase, rvseoDown]) do
begin
SRichViewEdit1.RichViewEdit.InsertText(AReplaceStr); // exception on this line
end;
end;
end;