Group with IIF condition
Group with IIF condition
Hello,
I am kind of new to Stimulsoft.
I am trying to create a invoice template and would like to group the transactions based on a check number. I can get the grouping to work, however there are transactions which do not contain any check number which should not be grouped at all and only the ones which do have the same check number should be grouped. Is there any way I can accomplish this?
I attached the current simple grouping that I use.
Thank you very much for your help.
I am kind of new to Stimulsoft.
I am trying to create a invoice template and would like to group the transactions based on a check number. I can get the grouping to work, however there are transactions which do not contain any check number which should not be grouped at all and only the ones which do have the same check number should be grouped. Is there any way I can accomplish this?
I attached the current simple grouping that I use.
Thank you very much for your help.
-
- Posts: 6271
- Joined: Tue Mar 20, 2018 5:34 am
Re: Group with IIF condition
Hello,
You can use condition in the group expression, something like:
{(Column == "" ? 0 : Column)}
or
{IIF(Column == "", 0, Column)}
Thank you.
You can use condition in the group expression, something like:
{(Column == "" ? 0 : Column)}
or
{IIF(Column == "", 0, Column)}
Thank you.
Re: Group with IIF condition
Hi Lech,
thank you very much for your quick reply. I tried using the expressions you mentioned, but still the grouping would also be applied to lines which do not have a check number. The data looks like this:
Description Amount CheckNumber
Food 10 123
Beverage 5 123
Accommodation 100
Accommodation 100
On the invoice it should group Food and Beverage based on the Check Number, but the Accommodation should not be grouped at all as these have no check number and need to print separately. It should look something like this, where the description is not that important for now:
Description Amount CheckNumber
F&B 15 123
Accommodation 100
Accommodation 100
Do you have any other thoughts on this?
Thank you very much.
Best regards,
Markus
thank you very much for your quick reply. I tried using the expressions you mentioned, but still the grouping would also be applied to lines which do not have a check number. The data looks like this:
Description Amount CheckNumber
Food 10 123
Beverage 5 123
Accommodation 100
Accommodation 100
On the invoice it should group Food and Beverage based on the Check Number, but the Accommodation should not be grouped at all as these have no check number and need to print separately. It should look something like this, where the description is not that important for now:
Description Amount CheckNumber
F&B 15 123
Accommodation 100
Accommodation 100
Do you have any other thoughts on this?
Thank you very much.
Best regards,
Markus
-
- Posts: 6271
- Joined: Tue Mar 20, 2018 5:34 am
Re: Group with IIF condition
Hello,
Please send us a sample report with test data that reproduces the issue for analysis.
Thank you.
Please send us a sample report with test data that reproduces the issue for analysis.
Thank you.
Re: Group with IIF condition
Enclosed please find the sample report.
Thank you very much.
Best regards,
Markus
Thank you very much.
Best regards,
Markus
- Attachments
-
- Report (14).mrt
- (636.42 KiB) Downloaded 129 times
-
- Posts: 6271
- Joined: Tue Mar 20, 2018 5:34 am
Re: Group with IIF condition
Hello,
Please send us a test data for your report.
Thank you.
Please send us a test data for your report.
Thank you.
Re: Group with IIF condition
Hello Lech,
in which format would you need the test data, I am using Stimulsoft integrated in a cloud application and have no access to the database to extract any data and am bound to the objects delivered by the development team. Is there another way I can provide the data or we can try to address my question?
Thank you very much.
Best regards,
Markus
in which format would you need the test data, I am using Stimulsoft integrated in a cloud application and have no access to the database to extract any data and am bound to the objects delivered by the development team. Is there another way I can provide the data or we can try to address my question?
Thank you very much.
Best regards,
Markus
-
- Posts: 6271
- Joined: Tue Mar 20, 2018 5:34 am
Re: Group with IIF condition
Hello,
In any format that we can add in your report and run it (XML, JSON, CSV, etc)
Thank you.
In any format that we can add in your report and run it (XML, JSON, CSV, etc)
Thank you.
Re: Group with IIF condition
Hello Lech,
i believe i got it working by adding another object in the if statement instead of the zero which provides a unique identifier per posting.
thank you very much for your help.
i believe i got it working by adding another object in the if statement instead of the zero which provides a unique identifier per posting.
thank you very much for your help.
Re: Group with IIF condition
Hello,
You are welcome!
You are welcome!