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 3:19PM
    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 3:19PM
    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

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.