Group Contition at Runtime

How do you change a Group Header's condition at runtime?

When I use the following code I get an access violation.

pView = pfrReport->FindObject( "GroupHeader" );
pView->Parent->GroupCondition = "[DataMod.MyQuery.\"AgentLevel\"]";

The code "[DataMod.MyQuery.\"AgentLevel\"]" works fine for the 'Condition' at design time.

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 10:12PM
    Hi
    i can't remember if you can access condition directly.

    quotes may be stripped when passing in.
    or create a variable and use variable in condition expression
    then just modify variable.
    regards
    gord ;)
  • edited 10:12PM
    Further investigation shows that the Parent of pView->Parent is NULL so that is why an access violation is occuring when pView->Parent->GroupCondition is called.

Leave a Comment