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

Template.LoadFromDatabase - record not found

edited February 2002 in General
Hi there,

I have a problem loading my reports from a database. I have some templates
in a Blob-field of my table. Further more there is a unique ID for each
record by which I identify the records. Now I try loading a template from
this table, but the report shows the message "record '' not found".

I have the following items set before executing the LoadFromDatabase:

with DruckBerichte_Stamm.Report.Template.DatabaseSettings do
begin
DataPipeline:=DruckBerichte_Stamm_Data.DruckBerichtePipeline;

Name:=DruckBerichte_Stamm_Data.DruckBerichteSet.FieldByName('BerichtID').AsS
tring;
NameField:='BerichtID';
TemplateField:='Template';
Druckberichte_Stamm.Report.Template.LoadFromDatabase;
end;

It seems not to matter, if I only select the one record I want to edit, or
all records of the table, I always get the error message. I'm sure the ID
exists and is visible in the current transaction, the datasource of the
pipeline is correct and so on. What's my mistake?

Regards,

Marc

Comments

  • edited February 2002
    Ok, I have traced it down to Datapipeline.locate:

    Locating with this function I have to provide the same datatype like my
    db-field to get a correct lookup. My ID was integer, I tried a string in the
    name property and so the lookup failed. I think this could need improvement
    ;)

    Thanks to ... me ;) bye!

This discussion has been closed.