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 1:27AM
    Sorry, using Delphi VCL
  • gpigpi
    edited 1:27AM
    Use TfrxMemoView(frxReport1.FindObject('Memo1')).Left := ...
  • edited 1:27AM
    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