Crosstab - string as Summary field

Stimulsoft Reports.WEB discussion
kubalak
Posts: 17
Joined: Fri Aug 09, 2019 4:22 pm

Crosstab - string as Summary field

Post by kubalak »

Hello,

I am asked to have a numeric as well as string field as a summary column. I have prepare the data in SQL in such a way that there is only 1 row per row per column.

In the picture there should be only 1 row per date and the strings should be concatenated and comma delimited.

Thanks for any hints on how to do this.
Attachments
Snap 2019-10-16 at 22.53.51, 497x264.png
Snap 2019-10-16 at 22.53.51, 497x264.png (137.81 KiB) Viewed 2387 times
Lech Kulikowski
Posts: 6239
Joined: Tue Mar 20, 2018 5:34 am

Re: Crosstab - string as Summary field

Post by Lech Kulikowski »

Hello,

Please try to use the Cross-Data component instead of the Cross-Table in that case.

Thank you.
Attachments
CrossTabvsCrossDataReport.mrt
(807.84 KiB) Downloaded 150 times
kubalak
Posts: 17
Joined: Fri Aug 09, 2019 4:22 pm

Re: Crosstab - string as Summary field

Post by kubalak »

Interesting!! Thanks!! Hopefully I will find some time today to try it out.
Lech Kulikowski
Posts: 6239
Joined: Tue Mar 20, 2018 5:34 am

Re: Crosstab - string as Summary field

Post by Lech Kulikowski »

Hello

We are always glad to help you!
Please let us know if you need any additional help.

Thank you.
kubalak
Posts: 17
Joined: Fri Aug 09, 2019 4:22 pm

Re: Crosstab - string as Summary field

Post by kubalak »

Wow!! I did it. But I wouldn't be able to without your sample :D Got lost a few times along the way.

Anyway, the only minor glitch which I managed to overcome by making the cells a bit bigger and wrapping the content is that I haven't found the way how to synchronize the width of the header cell with the width of the multiple data cells.

But still: Thanks!!
kubalak
Posts: 17
Joined: Fri Aug 09, 2019 4:22 pm

Re: Crosstab - string as Summary field

Post by kubalak »

I have noticed 1 error though:

When I set the format of the sum value to be numeric, the number of digits is not saved into mrt file:

Code: Select all

"TextFormat": {
                    "Ident": "StiNumberFormatService",
                    "NegativePattern": 1,
                    "DecimalSeparator": ",",
                    "GroupSeparator": " ",
                    "State": "DecimalDigits"
                  },
but if I edit the mrt file and add it there manually:

Code: Select all

"TextFormat": {
                    "Ident": "StiNumberFormatService",
                    "NegativePattern": 1,
                    "DecimalSeparator": ",",
                    "DecimalDigits": 2,
                    "GroupSeparator": " ",
                    "State": "DecimalDigits"
                  },
the viewer does not have a problem to view it properly. This I found both in the cross-table as well as cross-components.
Lech Kulikowski
Posts: 6239
Joined: Tue Mar 20, 2018 5:34 am

Re: Crosstab - string as Summary field

Post by Lech Kulikowski »

Hello,

Please try to check the last release build, that issue was fixed.

Thank you.
kubalak
Posts: 17
Joined: Fri Aug 09, 2019 4:22 pm

Re: Crosstab - string as Summary field

Post by kubalak »

I am sad to report that the last build seems to make things even worse. This time it does not register the number of decimal digits even in the data band. Like in the report design attached. I set up number + 2 decimal digits on all the fields in the data band and when I save it, the number of decimal digits is not in the mrt file.
Attachments
Snap 2019-10-29 at 18.53.53, 939x231.png
Snap 2019-10-29 at 18.53.53, 939x231.png (447.76 KiB) Viewed 2280 times
Lech Kulikowski
Posts: 6239
Joined: Tue Mar 20, 2018 5:34 am

Re: Crosstab - string as Summary field

Post by Lech Kulikowski »

Hello,

Please send us a sample report with test data that reproduces the issue for analysis.

Thank you.
kubalak
Posts: 17
Joined: Fri Aug 09, 2019 4:22 pm

Re: Crosstab - string as Summary field

Post by kubalak »

My apologies, I have been swamped with other work.

Could you please just try to open the attached report and save it? Without the data? When I save it, nowhere in the report, I find "DecimalDigits": 2 in StiNumberFormatService.

When I change format general on the cell to number without specifying number of digits, I see this in mrt:

Code: Select all

              "TextFormat": {
                "Ident": "StiNumberFormatService",
                "NegativePattern": 1,
                "DecimalDigits": 3,
                "GroupSeparator": ","
                }
But when I toggle on the number of decimal digits and save it, mrt stays the same.

But when I change the number of decimal digits to 2 and save it, mrt changes into this:

Code: Select all

"TextFormat": {
                "Ident": "StiNumberFormatService",
                "NegativePattern": 1,
                "GroupSeparator": ",",
                "State": "DecimalDigits"
              }
              
Would this be sufficient for you? To prepare anything else at the moment is beyond my time availability.

Thank you very much in advanced. I work in chrome on os x.
Attachments
3.mrt
(151.42 KiB) Downloaded 112 times
Post Reply