Home End User

FOLDER_ID problem when Save As new report

edited January 2003 in End User
Hello. I'm using Report Builder v6.02 enterprise with Delphi 5 enterprise. I
have RB_FOLDER & RB_ITEM in an Interbase 6.0 database, with the triggers for
the ID's assigned. In a form in my application, I create & edit the report
model with a combo to select which one to edit and two buttons to create a
new one and edit the selected in the combo.

The code to edit one is:

// AdmReporteInterbase is the form provided with RB modified to have
all the pipelines & datasources I need.
with AdmReporteInterbase do
begin
Hide;

with ppReport1.Template.DatabaseSettings do
begin
DataPipeline := AdmReporteInterbase.plItem;
NameField := 'NAME';
TemplateField := 'TEMPLATE';
Name := Trim(Name_of_Report_Model_to_Edit_selected_in_Combo);
end;
ppReport1.Template.LoadFromDatabase;
ppDesigner1.ShowModal;

Free;
end;

This works OK when editing an existing model and saving it. But my problem
is when I select Save As in the menu, and enter a new Name for it. First it
shows me all the reports defined in the RB_ITEM table, with no separation
between folders. When I accept a new name, it shows an error saying: "Field
'FOLDER_ID' must have a value". I tried to assign some fields in a
BeforeInsert event of tblItem, but It doesn't fill the blob field with the
actual report.

What am I doing wrong? Thank you very much.

Francisco
This discussion has been closed.