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

ppReport1.Left: Invalid property value

edited December 2001 in General
I'm getting an error message when loading a previously saved report template
from the database into the Report Designer. The error message reads "Error
reading DenppReport1.Left: Invalid property value.". I also get this error
message when trying to run the report.

DenppReport is descended from TppReport and adds a couple of methods, but
does not add any properties.

I find I can edit the blob in the database (through SQL Explorer), and the
DenppReport object has values listed for Top and Left properties. The
values aren't negative or large, but they are consistently the same (Left =
72, Top = 64).

If I remove the lines containing these values and then save the blob back to
the database I am able to run or edit the report, but as soon as I save it
again (even with no modifications) the Top and Left properties come back and
I am no longer able to open the report.

This is happening on several reports that I have been working on, and also
occurs on any new reports I create.

I'm using RB 5.0 Enterprise, and I have removed and reinstalled it in the
hope that something had somehow gotten corrupted and this would fix it. It
didn't.

Any ideas? I'm fresh out right now.

Thanks!

Paul Essex
paul@bridge-way.com

Comments

  • edited December 2001
    One thing to be aware of, is that form inheritance and templates do not mix.

    You should be able to create a report descendent and save it in a template.
    I created a simple TppReport descendent (see below). I added a property and
    method to it. I could save it down at runtime by creating an instance of my
    report and saving it through the Report.Template.SaveToFile and streamed it
    back up with Report.Template.LoadFromFile. I called print and the preview
    worked.

    You could try saving to a template file in ascii format, just to simplify
    the problem. Plus, you can easily open the rtm as a text file, rather than
    having to edit the blob.

    So, I then was also able to create, save, load and print my report
    descendent in the runtime designer. Since, I was not changing the top and
    left property values of the non visual report component, they aren't saved
    in the template. Top left has a default value of 0,0 and this isn't saved
    down, because it is an optimization.

    Is there anything else that I should be doing to see your problem in my test
    project?

    uses
    Classes,
    ppClass, ppReport;

    type

    TmyReport = class(TppReport)
    private
    FLongText: String;

    protected
    procedure SetLongText(aText: String);

    public
    constructor Create(aOwner: TComponent); override;
    destructor Destroy; override;

    published
    property LongText: String read FLongText write SetLongText;

    end;


    implementation

    { TmyReport }

    uses
    ppTypes;

    constructor TmyReport.Create(aOwner: TComponent);
    begin
    inherited Create(aOwner);

    Template.Format := ftASCII;

    FLongText := '01234567890';

    end;

    destructor TmyReport.Destroy;
    begin
    inherited Destroy;
    end;

    procedure TmyReport.SetLongText(aText: String);
    begin
    FLongText := aText;
    end;

    initialization
    RegisterClass(TmyReport);

    finalization
    unRegisterClass(TmyReport);

    end.

    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.