Default dataset


I use the code below for setting some default settings and opening the formdesigner

  FormMain.frxDesigner.OpenDir               := sMapWRISTBAND;

   FormMain.frxDesigner.SaveDir               := sMapWRISTBAND;

   FormMain.frxReportWristband.PreviewOptions.Zoom      := 1;

   FormMain.frxReportWristband.EngineOptions.DestroyForms := False;

   FormMain.frxReportWristband.DataSetName          := 'Print';

   FormMain.frxReportWristband.DataSet            := frxDBDataset_Print;


   // Star designer


Now i need two things:

  • assign by code the correct dataset (the version is in dutch below) but see dataset {niet toegewezen}
  • the user can NOT select a other dataset (main menu / Report / )


  • gpigpi Volnovakha, Ukraine

    Use TfrxReportPage(frxReport1.FindObject('Page1')).Dataset := ...

  • mierlpmierlp Netherlands

    Where or how to use?

  • gpigpi Volnovakha, Ukraine
    edited January 3

    FormMain.frxDesigner.OpenDir              := sMapWRISTBAND;

       FormMain.frxDesigner.SaveDir              := sMapWRISTBAND;


       FormMain.frxReportWristband.PreviewOptions.Zoom     := 1;

       FormMain.frxReportWristband.EngineOptions.DestroyForms := False;



      // FormMain.frxReportWristband.DataSetName         := 'Print';

      // FormMain.frxReportWristband.DataSet           := frxDBDataset_Print;

    TfrxReportPage(FormMain.frxReportWristband.FindObject('Page1')).Dataset := frxDBDataset_Print;

  • mierlpmierlp Netherlands

    When i add this line: TfrxReportPage(FormMain.frxReportWristband.FindObject('Page1')).Dataset := frxDBDataset_Print;

    i get the following error on runtime

  • gpigpi Volnovakha, Ukraine

    Create small demo project and send it to

  • gpigpi Volnovakha, Ukraine

    Set frxReportWristband.StoreinDFM = True, load or create report teplate with Page1 report page and use

    <CODE>procedure TForm1.D1Click(Sender: TObject);


     frxDesigner.OpenDir                          := 'C:\TEMP';

     frxDesigner.SaveDir                          := 'C:\TEMP';


     frxReportWristband.PreviewOptions.Zoom       := 1;

     frxReportWristband.EngineOptions.DestroyForms := False;



     frxReportWristband.DataSetName               := '';//'Print';

     frxReportWristband.DataSet                   := nil;//frxDBDataset_Print;

    //Page1 should exists in the report template, don't clear it

     TfrxReportPage(frxReportWristband.FindObject('Page1')).Dataset := frxDBDataset_Print;

     // Star designer



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.