Programatically Adjust Title?

So I have a report and in the title band I have a text object that displays the reports title; because the report will contain a date range I want the title to be something like "Referral Report From 01/01/05 To 01/01/17". So how to I access that object at runtime and assign the appropriate title to that object before printing?

Comments

  • edited 7:00AM
    Sorry, using Delphi VCL
  • gpigpi
    edited 7:00AM
    Use TfrxMemoView(frxReport1.FindObject('Memo1')).Left := ...
  • edited 7:00AM
    gpi wrote: »
    Use TfrxMemoView(frxReport1.FindObject('Memo1')).Left := ...

    Not precisely what I wanted as ".Left" has nothing to do with the text of a text object but it sent me in the right direction and for anyone else who wants to know how to do this here is the code I used:
      TfrxMemoView(ReportForm.frxReferrals.FindObject('mReportTitle')).Memo.Clear;
      TfrxMemoView(ReportForm.frxReferrals.FindObject('mReportTitle')).Memo.Add('Referral Report From '+FormatDateTime('mm/dd/yy',dteFrom.Date)+' To '+FormatDateTime('mm/dd/yy', dteTo.Date));
    
    and i tested this and it does work fine.

    Thanks!

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.