PrepareReport hanging
I have an application that is in production.
I am using fastreports 2.51 to view the contents of a blob which contains only ascii text.
It has been working ok for months but this morning I was using it and it hung on this statement frResultsReport.PrepareReport;
dmManagement.EditBlob(StreamData, EditedData, ReportType);
frResultsReport.LoadFromFile(ApplicationPathway+'pcdReportImage.frf');
frResultsReport.PrepareReport; // <<=== hangs here
frResultsReport.ShowReport;
dmManagement.dsReportImage.close;
StreamData.Free;
EditedData.Free;
I get a dialog Preparing Report with Performing 1st pass: 1 which hangs. The cancel button is unresposive. There appears to be another dialog behind the Preparing Report dialog but I can't see what it is as the Preparing Report Dialog is on top and I cannot shift it. I can see a tiny sliver of what may be anotgher dialog underneath but clicking on it does nothing.
The only recourse I have at present to to kill the application. It has been working flawlessly up until now.
I am using fastreports 2.51 to view the contents of a blob which contains only ascii text.
It has been working ok for months but this morning I was using it and it hung on this statement frResultsReport.PrepareReport;
dmManagement.EditBlob(StreamData, EditedData, ReportType);
frResultsReport.LoadFromFile(ApplicationPathway+'pcdReportImage.frf');
frResultsReport.PrepareReport; // <<=== hangs here
frResultsReport.ShowReport;
dmManagement.dsReportImage.close;
StreamData.Free;
EditedData.Free;
I get a dialog Preparing Report with Performing 1st pass: 1 which hangs. The cancel button is unresposive. There appears to be another dialog behind the Preparing Report dialog but I can't see what it is as the Preparing Report Dialog is on top and I cannot shift it. I can see a tiny sliver of what may be anotgher dialog underneath but clicking on it does nothing.
The only recourse I have at present to to kill the application. It has been working flawlessly up until now.
Comments
PathCentreDirect Managment
Undefined symbol "MO617"
OK
The report is very simple and has a richtext edit box as its main item. Into this richtext edit is streamed a blob that contains only simple ascii text. Unfortunately the text contained the code [MO617]. I replaced all instances of [MO617] with (MO617) and the problem went away.
The difficulty I have it appears that any text within the richtext edit that has something between square brackets will cause me grief. The contents of th ascii text are generated by other parties so Ido not have control over what is in it.
Can I stop FR from evaluating RichText and trying to interpret [xxxx] as some FR variable that must be defined somewhere.
[ for \'5B and ] for \'5D but it still hangs (looking for variables for [xxxx])
If I subsitute [ for ( and ] for ) it works ok
C := InputLine;
Case C of
'\' : Result := Result + '\\';
'{' : Result := Result + '\{';
'}' : Result := Result + '\}';
// '[' : Result := Result + '\'#39'5B'; // no good
// ']' : Result := Result + '\'#39'5D'; // no good
'[' : Result := Result + '('; //not as good but works
']' : Result := Result + ')'; //not as good but works
else
Result := Result + C;
end;