How can change Group Condition On Report Runtime

Hi,

How can change group condition parameters at report runtime on fr4.

This source is correctly run on v.2.54 but can not run v.4.0
GroupHeader1.OnBeforPrint
begin
if WF_LIS_GRP = 02 then GroupHeader1.Condition := '[Musdos_CDSET."MUSDOS_ACE_KOD"]';
if WF_LIS_GRP = 03 then GroupHeader1.Condition := '[Musdos_CDSET."MUSDOS_SIR_KOD"]';
if WF_LIS_GRP = 04 then GroupHeader1.Condition := '[Musdos_CDSET."MUSDOS_FAT_KOD"]';
end;

our changed source for v4.0 this but we get the Error this source
GroupHeader1.OnBeforPrint
begin
if WF_LIS_GRP = 02 then GroupHeader1.Condition := '<Musdos_CDSET."MUSDOS_ACE_KOD">';
if WF_LIS_GRP = 03 then GroupHeader1.Condition := '<Musdos_CDSET."MUSDOS_SIR_KOD">';
if WF_LIS_GRP = 04 then GroupHeader1.Condition := '<Musdos_CDSET."MUSDOS_FAT_KOD">';
end;

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 2:30PM
    the condition property is a string
    if you look at the object inspector after setting a datafield as a condition
    you will see the condition looks like this
    Musdos_CDSET."MUSDOS_ACE_KOD"
    so you must use the appropriate number of ' and functions to end up with that result.
    ie
    condition := '<Musdos_CDSET.'+quotedstr(MUSDOS_ACE_KOD);


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.