Change in script the Child property

Hi

I have a PageHeader Band and 3 Childs Bands.

I want to change the ChildBand property of a PageHeader depending on a variable.

I write the next code in OBP PageHeader:
 if [SomeVar] = 1 then
    PageHeader1.Child := Child1 
  else
  if [SomeVar] = 2 then
    PageHeader1.Child := Child2
  else
    PageHeader1.Child := OtherChild;

But I get the next error: Undefined simbol "Child1" (the same errors with the bands named Child2 and OtherChild)

I'm try too with [Child1], but I get the same errors.

It seems FR d'ont understand or d'ont found the ChildBand name.

Then, how can I change in script fr code the Child property? ;)

TIA

Comments

  • BruceBiddleBruceBiddle Nottingham UK
    edited 9:19PM
    Hi

    Try using quotes

    Pageheader1.childband := 'Child1'

    Not sure if it works but it does'nt give an error

    Bruce
  • gordkgordk St.Catherines On. Canada.
    edited 9:19PM
    Bruce is correct
    use the correct syntax, you can see this in the main demo switch child band report.
    sample of obp of mdband.
    if [Line#] <= 5 then
    ChildBand := 'Child1' else
    ChildBand := 'Child2';
    regards ;)

Leave a Comment