Report Title

Hello

I??m saving an loading my report from a database using loadfromstram and savefromstram.

How can I change report title? I??changed report.reportoptions.name but title alwys is untitled

thanks

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 10:12AM
    felixinasa wrote: »
    Hello

    I??m saving an loading my report from a database using loadfromstram and savefromstram.

    How can I change report title? I??changed report.reportoptions.name but title alwys is untitled

    thanks
    Sample code of where you are loading the report please.
  • edited 10:12AM
    gordk wrote: »
    gordk wrote: »
    Hello

    I??m saving an loading my report from a database using loadfromstram and savefromstram.

    How can I change report title? I??changed report.reportoptions.name but title alwys is untitled

    thanks
    Sample code of where you are loading the report please.


    first I llaunch the designer:
      frReport.ReportOptions.Name := 'Nuevo';  //but report name is untitled
      frReport.DesignReport();
    

    then capture save event and save it to DB. Save dialog show "untitled' as report name

    and with this code I load report again:
      ImpresosDataSet.Locate('ID', id, []);
        (ImpresosDataSet.fieldByName('Impreso') as TBlobField).SaveToStream(stream);
        stream.Position := 0;
       frReport.ReportOptions.Name := 'Nuevo'; 
        frReport.LoadFromStream(stream);
    

    but report name always is untitled.fr3

    Thanks


  • gordkgordk St.Catherines On. Canada.
    edited 10:12AM
    do things in the correct order
    first locate and load the report into the tfrxreport component then
    set the report options name then call design report.

    ImpresosDataSet.Locate('ID', id, []);
    (ImpresosDataSet.fieldByName('Impreso') as TBlobField).SaveToStream(stream);
    stream.Position := 0;
    // frReport.ReportOptions.Name := 'Nuevo'; you set the name before loading,move this line to
    frReport.LoadFromStream(stream);
    //here
    frReport.ReportOptions.Name := 'Nuevo';


  • edited 10:12AM
    gordk wrote: »
    do things in the correct order
    first locate and load the report into the tfrxreport component then
    set the report options name then call design report.

    ImpresosDataSet.Locate('ID', id, []);
    (ImpresosDataSet.fieldByName('Impreso') as TBlobField).SaveToStream(stream);
    stream.Position := 0;
    // frReport.ReportOptions.Name := 'Nuevo'; you set the name before loading,move this line to
    frReport.LoadFromStream(stream);
    //here
    frReport.ReportOptions.Name := 'Nuevo';

    Ok, thanks

    I do that, and when I preview report I see 'nuevo' as caption.
    but designer caption is "untitled.fr3' and when report is closed ask about to save untitled.fr3.
    How can I change this untitled.fr3? or capture this event and show my own message?

    I have captured onSveReport event.

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.