How can change Group Condition On Report Runtime

edited 10:33AM in FastReport 4.0
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 10:33AM
    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