MasterDetails

Guys, I'm creating a report through code without using the file fr3. I wonder what's missing so I can leave my MasterData ok. I'm creating it and saying the following properties:

FrPrn: NewReport ("Orca")
FrPrn: AddBand ("MasterData", "Orca" , frxMasterData)
FrPrn: SetProperty ("MasterData", "DataSetName", "ORC")


When viewing the report the following message appears at the top right of the master data: "Dataset is not included in Report.DataSets"

what is missing?

Thank you for your attention

Comments

  • If I go to Report -> data and select the desired Bank accepts the master detail and does everything it should be done, how do I pre-programmed to have the report from the bank as marked.
  • gordkgordk St.Catherines On. Canada.
    edited 5:12PM
    add datsets first
    here is an example from the programmers manual
    ie
    Pascal:



    var

    DataPage: TfrxDataPage;

    Page: TfrxReportPage;

    Band: TfrxBand;

    DataBand: TfrxMasterData;

    Memo: TfrxMemoView;



    { clear a report }

    frxReport1.Clear;



    { add a dataset to the list of ones accessible for a report }
    {this is for external datasets}
    frxReport1.DataSets.Add(frxDBDataSet1);



    { add the "Data" page }

    DataPage := TfrxDataPage.Create(frxReport1);

  • Ok, thanks!!
  • gordkgordk St.Catherines On. Canada.
    edited 5:12PM
    IIRC if the dataset has a username use it.

Leave a Comment