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 6:12PM
    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 6:12PM
    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

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.