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

Using end User Reporting - Get EInvalidTemplateError when trying ot load / Open a report.

edited April 2006 in End User
Hi

Ive followed the document in End User for IBX, and all seems to work quite
well.
However , when i Change a report, and Save it ( i.e. close the Report
designer) Its save s fine.

When i look at the BLob field in IBExpert , there is definatley dtaa in
Blob field.

However when i open, (right click and open ) i get a n exception
"EInvalidTemplateError"

---------------------------
Debugger Exception Notification
---------------------------
Project ACDReports.exe raised exception class EInvalidTemplateError with
message 'Invalid Template Format'.
---------------------------
Break Continue Help
---------------------------


Regards

Ian Robinson

Comments

  • edited April 2006
    Hi Ian,

    Which version of ReportBuilder/Delphi are you currently using? What is the
    field type of the Template field? Did you use the CreateEndUserTables.sql
    file to create these tables?

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited April 2006
    Hi Nico

    Delphi 2005.

    Reportbuilder 10.02

    DDL of Items table in my Database looks as follows :

    CREATE TABLE RB_ITEM (
    ITEM_ID INTEGER,
    FOLDER_ID INTEGER NOT NULL,
    NAME VARCHAR(60) NOT NULL,
    ITEM_SIZE INTEGER,
    ITEM_TYPE INTEGER NOT NULL,
    MODIFIED DOUBLE PRECISION NOT NULL,
    DELETED DOUBLE PRECISION,
    TEMPLATE BLOB SUB_TYPE 0 SEGMENT SIZE 400
    );

    Yes i did run CreateEndUserTables.sql.

    The version in Demos shows create of Items Table as follows:
    /* create Item table */
    CREATE TABLE rb_item
    (item_id INTEGER,
    folder_id INTEGER NOT NULL,
    name VARCHAR(60) NOT NULL,
    item_size INTEGER,
    item_type INTEGER NOT NULL,
    modified DOUBLE PRECISION NOT NULL,
    deleted DOUBLE PRECISION,
    template BLOB SUB_TYPE 0 SEGMENT SIZE 400,
    PRIMARY KEY (folder_id, item_type, name, modified));

    which looks consistent with the Table one created.

    Regards

    Ian Robinson



  • edited April 2006
    Hi Ian,

    Do you get this behavior with every report you try to load? For instance,
    if you create a very simple report, perhaps only containing a single label,
    save it and try to load it again, do you still get the error?

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited April 2006
    Nico

    Yes , i get this error every time i try and Load.

    Ive tried to create a simple report, save and reload, i get the same error.

    Ive tried to use the demo as is, on the Employeee.GDB, and i get the same
    problem.

    Im running Firebird 1.5 - dont know if that is the problem.

    If I step into LoadFromDatabase in ppTmplat, the process seems to not be
    able to substantiate the stream correctly


    FDatabaseSettings.DataPipeline.GetFieldAsStream(FDatabaseSettings.TemplateFi
    eld, lLoadStream);

    After this line the lLoadStream is empty - Size = 0.

    This is passed into LoadFromStream(lLoadStream ) which tries to validate
    the type of stream (StreamType)

    and when comparing the contents of empty Stream it results in Invalid format
    as it does not match the
    cBinarySignature: array[1..4] of Char = 'TPF0';

    but the Blob does have this signature.

    If you like i can zip and forward my the Demo app to you to check.

    Regards

    Ian


  • edited April 2006
    Hi Ian,

    In my testing with RB 10.02 and Delphi 2005 with IBX and Interbase 7.5,
    everything seems to work correctly. Could the fact that Delphi 2005 uses a
    newer version of Interbase affect this in any way? I can send you the data
    I am using in a back-up file (employee.gbk). Then you can use gbak to try
    it on your machine if you would like. Send an email to
    support@digital-metaphors.com if you would like to try this.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited April 2006
    Nico

    What version of GDS32.dll are you using.

    My version shows as - 6.3.2.4731

    My associate who has D2006 installed shows 6.3.3.4870.

    Ian




  • edited April 2006
    Nico

    This is really frustrating.

    Ive done the following :

    On a clean machine - Firebird , and Interbase removed , including all
    references of GDS32.dll

    Ive reinstalled Interbase 7.5.1 , user the Employee.GDB from 2006 install.
    run the Enduser Script.sql.

    Now using IBX example i still get invalid Template.

    So i thought ill try the dbExpress route, I no longer get the invalid
    template, however the templates dont load and save as expected, they simple
    display the last template that i had loaded.

    Ill send you a copy of both my examples and Employee Database, and see if
    you get the same issues on loading the templates.


    Regards

    Ian Robinson


This discussion has been closed.