problem with variables

I've created a new variable and send data to it from delphi2010 but nothing is printed. What am I doing wrong?

variable name is variable1 and I do it like this:

form1.frxReport1.Variables:=edit7.Text;

in freport [variable1] is in memo1

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 7:30AM
    first your report file must be loaded in the tfrxcomponent before trying to set the value.
    second when passing string values you must use extra string delimiters
    read the programmer's manual on working with variables.
  • edited December 2009
    gordk wrote on Dec 28 2009, 11:31 PM:
    //first your report file must be loaded in the tfrxcomponent before trying to set the value.

    can you explain?



    //second when passing string values you must use extra string delimiters

    well I've tried with this

    form1.frxReport1.Variables:='''' + 'test' + ''''

    and

    frxReport1.Script.Variables := 'test'

    and still nothing.



    //read the programmer's manual on working with variables.

    i did


    p.s. tnx for fast response
  • SOLVED!

    1. had to put userdataset to delphi form and set RangeEnd=reCount, RangeEndCount=1 (without this endless number of pages is created)

    1a. assign masterdata1.dataset:=frxUserDataSet1

    2. in OnGetValue event I did this: form1.frxReport1.Variables:=quotedstr(edit2.Text);



    Is this the right way or ?????


  • gordkgordk St.Catherines On. Canada.
    edited 7:30AM
    to output something a masterdataband needs to be either connected to a datasource(controls no of times it repeats reccount) or set it's rowcount property to a value.

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.