change the title

edited 8:11AM in FreeReport
dear all,

i've just installed free report and stuck with this problem.

how to change the report title at run time. i want to use editbox.text as may report title.

please help me.

darmanto

Comments

  • edited 8:11AM
    Hope I'm not too late with this! Setting headings at runtime is basically simple, but I ran into a number of snags and the following is how I got mine to work.

    In freeReport create a variable (File/Variables and click on Variables...)
    Type a category aligned to left margin
    Next line type TWO spaces followed by your variable name (in my experience one space does not work!)
    eg

    Titles
    Title1var

    Click OK and OK again

    Double click your textbox and type "Title is [Title1Var]
    If you use the variable button it will insert [ Title1Var] which does not work unless you remove the extra space.

    Now in your Delphi code put

    frReport1.LoadFromFile('Filename.frf');
    frVariables := 'Your Title';
    frReport1.ShowReport;

    Good luck!
    Let me know if it works for you too.

    Ches
  • edited 8:11AM
    Title1Var had two spaces in front of it when I typed the above example variable declaration!

    Ches

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.