Recent

Author Topic: Variables  (Read 1644 times)

mtournay

  • New Member
  • *
  • Posts: 49
Variables
« on: April 28, 2014, 10:32:31 am »
Hi there

I have to add variables on new report so after some search I try

Code: [Select]
    for cnt := low(DefaultVarStrings) to High(DefaultVarStrings) do
      if rapport.Variables.IndexOf(DefaultVarStrings[cnt])<0 then
        rapport.Variables.add(DefaultVarStrings[cnt]);

and discover that it's a liitle more complex. When just doing this, when I go in file menu/variables list, can't click on a var without a sigsegv exception.
After some search, I found that I have to add values to report, if I don't, showvarvalue proc in LR_Ev_Ed hangs up.
At this point, I made two things :
  • patch showvarfunc to handle if value those not exist and raise a more explicit explanation
  • modify my code in order to add values

Now the question is : do I add a function to frReport for adding variables safely ? do i commit the modification of showvarvalue ? or both ?