Home End User

set Group New File from within Report based on Parameter

edited February 2022 in End User
Dear Support,

I wish to have one report for all orders and single orders ( group by orders create new file option )

My problem is :

if I make a parameter ppSetGroup . How do I SET the CREATE NEW FILE for the Group to true if this is 1 or to false if this is 0.

I have the latest Report Builder .

Thank you

Comments

  • Hi Robert,

    This is something that will need to be done in code before the report prints. Assuming the parameter value is already defined, you can use the OnInitializeParameters event to check the ppSetGroup parameter and toggle the Group.GroupFileSettings.NewFile property accordingly.

    In my quick testing, the following gave the proper results:
    procedure TForm2.ppReport1InitializeParameters(Sender: TObject; var aCancel: Boolean);
    begin
    ppReport1.Groups[0].GroupFileSettings.NewFile := (ppReport1.Parameters['ppSetGroup'].Value = 1);

    end;
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
Sign In or Register to comment.