Condition Groupheader

Hi, I have to change the header group based on the value of a variable, is this feasible?

procedure GroupHeader1OnBeforePrint(Sender: TfrxComponent);

begin

 IF <RGP>='REP' THEN

 begin

  GroupHeader1.Condition := <frxDBDataset1."DESREP">;  

  frxDBRGP.DataSet:=<frxDBDataset1."DESREP">;

 end

 ELSE

 IF <RGP> = 'TIP' THEN

 begin

  GroupHeader1.Condition:= <frxDBDataset1."DESTIP">;

  frxDBRGP.DataSet:=<frxDBDataset1."DESTIP">;

 end;  

end;

questo è il codice che avevo scritto ma non va

Comments

  • G'day,

    I have not needed to do this myself, but I suspect that your code is in the "wrong" Event Method. It is probably "too late" in the sequence to do what you want.

    Have you tried the Report's "OnBeginDoc" Event Method?

    Cheers, Paul

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.