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. ;)

Comments

  • edited 4:14PM
    I have found why it is hanging by debugging the FR code. I managed to get the submerged dialog which was

    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.
  • edited 4:14PM
    I do have a block of code that can transform characters, so I tied to subsitute

    [ 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;
    ;)

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.