"A component named Data already exists"

HoaHoa
edited 11:29PM in FastReport 4.0
I have a program using FastReport 3.x, it creates a report dynamically by means of combination os Report Designer, and Borland C++ Builder version 6.

As we upgrade to C++Buidler 2009, we also upgrade toe use FastReport 4.x.
Some problem arosed:


(1) in the fast-script code session memoX.Visible = <variable_yyy>==true; No longer valid, and I had to change to

if ( <variable_yyy>==true ){
memoX.Visible = true;
} else {
memoX.Visible = false;
}

(2) while in the c++ code, we call frxReportX->PrepareReport( true);
Exception is caught: A Component named Data already exists.



Comments

  • edited 11:29PM
    Hoa wrote: »
    I have a program using FastReport 3.x, it creates a report dynamically by means of combination os Report Designer, and Borland C++ Builder version 6.

    As we upgrade to C++Buidler 2009, we also upgrade toe use FastReport 4.x.
    Some problem arosed:


    (1) in the fast-script code session memoX.Visible = <variable_yyy>==true; No longer valid, and I had to change to

    if ( <variable_yyy>==true ){
    memoX.Visible = true;
    } else {
    memoX.Visible = false;
    }

    (2) while in the c++ code, we call frxReportX->PrepareReport( true);
    Exception is caught: A Component named Data already exists.

    I ran into this error today and found out that the error was in my sql query.

    Running the application in debug mode with Delphi 2007, the first exception was raised by my query component "arithmetic exception or string truncation...". Unfortunately FR doesn't seem to propagate that exception and only returns "A component named Data already exists", in runtime.

    May be too late for you, but I'm answering this anyway for everybody else.

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.