Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Opening report containing DBRichText in designer causes Access Violation error

edited January 2005 in General
Hello,
I have a strange problem. I have installed Delphi 2005 with Update 1 and
Report Builder 9.01 Ent.
If I create an empty project, new report, add the only component DBRichText
and close/open, it generates follwoing error message:

---------------------------
Error
---------------------------
Access violation at address 40005C4B in module 'rtl90.bpl'. Read of address
89B0E987.
---------------------------
OK
---------------------------

From this point the report is un-editable.

I have removed all 3rd party component packages except Report Builder
(1stClass, InfoPower and my own component packages).

RichText works well, but it doesn't display anything at design-time when I
update RichText or PlainText in RAP.

At run-time both components work as expected.

Please, do you have any suggestion?

Comments

  • edited January 2005
    Hi Igor,

    Thanks for the feedback. We are currently testing ReportBuilder with Update
    1 of Delphi 2005. Currently ReportBuilder 9.01 supports the original
    release of Delphi 2005. We will probably need to do another mantainence
    release for Delphi 2005 Update 1.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited January 2005
    Thanks for the answer, I have reinstalled the Delphi and it looks working
    well.
    I have also few another problems with Report Builder

    1. Help integration doesn't work when Norton Internet Security 2005 is
    installed although it is disabled. RBInstallHelper doesn't allow NIS2005 to
    interact with user. Solution: manually stop scripts by closing console
    windows, open command line in the ReportBuilder help folder, run "cscript
    regHelp.js 1 rbuildermerge.hxx 0 0" and "cscript regHelp.js 1 rapmerge.hxx 0
    0" manually from the command line (it will display NIS 2005 security
    confirmation and then everything works well)

    2. I am not sure if it is exactly problem of Report Builder, but when I have
    started to work with RB 9.01 in Delphi 2005 Upd. 1 it crashed because of out
    of memory error in 30 to 60 minutes of work. Please, use this information
    better like a hint than a bug report.

    Regards, Igor Gottwald

  • edited January 2005
    Hello, I have find where is the error!
    In the unit ppUndo, class function
    TppUndoableClassFactory.IsValidEmbeddedPropName(aObject: TObject;
    aOperation: String): Boolean;

    There are lines:
    // get the embedded object
    TraRTTI.GetPropValue(aObject, lsQualifier, lEmbeddedObject);
    Result := (lEmbeddedObject <> nil) and
    TraRTTI.IsValidPropName(lEmbeddedObject, lsPropertyName);

    But if the lsQualifier is not found it return false but lEmbeddedObject
    remains undefined !!!
    It probably differs since the previous version od Delphi!

    To correct the AV error, just one line is required:
    // get the embedded object
    lEmbeddedObject := nil; // BUG CORRECTION
    TraRTTI.GetPropValue(aObject, lsQualifier, lEmbeddedObject);

    NEXT BUG because of UNDO history in RichText!!!

    Following procedure must be corrected otherwice RichText is not possible to
    modify by code when Designer is active !!! (ppRichTx)

    //////////////////////////////////////////////////////////////////////////////////

    procedure TppCustomRichText.LoadFromRTFStream(aStream: TStream);
    var
    tempStream: TMemoryStream;
    begin
    tempStream := TMemoryStream.Create;
    try
    tempStream.CopyFrom(aStream, 0);
    aStream.Position := 0;
    tempStream.Position := 0;

    BeforePropertyChange('RichText');

    if (MaxLength > 0) and (MaxLength < tempStream.Size) then
    SetMaxLength(tempStream.Size);
    FRichTextStrings.LoadFromStream(tempStream);
    finally
    tempStream.Free;
    end;

    InvalidateDesignControl;
    PropertyChange; {ok to call this here}
    Reset; {notify report engine}

    end; {procedure, LoadFromStream}

    //////////////////////////////////////////////////////////////////////////////////

    Igor Gottwald


  • edited January 2005
    Hi Igor,

    Thanks again for the information.

    Check out the article below on the help system and some of its limitations.

    ----------------------------------------
    ARTICLE: ReportBuilder Help 2 Help
    ----------------------------------------

    INTRODUCTION

    Delphi 2005 has migrated its help system from WinHelp to MS Help 2. MS Help
    2 is used by Visual Studio .Net, and the MSDN Library as well. MS Help 2 is
    very different from WinHelp in that it is HTML based and requires a minimum
    of IE 5.0 to run. If you would like more information on what MS Help 2 is
    and how to use it correctly, visit http://www.helpware.com.

    The ReportBuilder 9 help files have been converted into the Help 2 format in
    order to be utilized in Delphi 2005. These help pages are very similar to
    the format of the VS .Net help pages as we found they were the most user
    friendly.

    HELP INSTALLATION

    During the installation process, ReportBuilder tries to run a number of
    scripts that essentially merge the new ReportBuilder Help into the existing
    Borland Help 2 namespace. If you are running some virus protection software
    on you machine, it may be stopping or holding up these scripts, preventing
    the help from merging correctly. In this case you will need to either
    install the help manually or reconfigure your protection software to allow
    these scripts to run on your machine.

    To manually merge the ReportBuilder help use the RBInstallHelper application
    included in the \RBuilder\Help\... directory. Running this program from the
    command line without any parameters will display full instructions on its
    use. For example, typing the command:

    "RBInstallHelper MergeRBuilderHelp"

    Will automatically merge the standard ReportBuilder help into the
    borland.bds3 namespace. If you have RB Enterprise or Server, you will need
    to merge the other help files separately.

    HELP RESTORATION

    If for some reason your entire help system has become corrupt or simply does
    not work correctly, you can perform a complete restore using the
    reghelp.exe application provided by Borland. The reghelp.exe application is
    located in the \Borland\BDS\3.0\Help\Common\... directory. Running this
    program from the command line will also give you instructions on its use.
    Typing the command "reghelp 7" will completely restore your Borland help.


    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.