Cross tab cell size auto size

Stimulsoft Reports.JS discussion
Post Reply
djjoyro
Posts: 32
Joined: Tue Apr 05, 2011 4:50 am
Location: România

Cross tab cell size auto size

Post by djjoyro »

Hello,

I have a problem with the cross-tab control.
I can't configure cells to auto size based on the content. It looks like here:
cross-tab.png
cross-tab.png (7.33 KiB) Viewed 967 times
The cell content is cut - see first column. If I set no size for Min/Max width only the first characters are displayed from each cell.
I have used Stimulsoft.WPF in the past (maybe version 2012 or something like this) and in that engine, the cells are auto sized based on content.

Do you have any advice?
Thank you.
Lech Kulikowski
Posts: 6196
Joined: Tue Mar 20, 2018 5:34 am

Re: Cross tab cell size auto size

Post by Lech Kulikowski »

Hello,

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

Thank you.
djjoyro
Posts: 32
Joined: Tue Apr 05, 2011 4:50 am
Location: România

Re: Cross tab cell size auto size

Post by djjoyro »

Hello,

I use the following data:

Code: Select all

{"LoggerData":[{"LoggerId":"MOD12345-0","Moment":"2020-12-31T22:00:00.000Z","Value":"5 "},{"LoggerId":"MOD12345-1","Moment":"2020-12-31T22:00:00.000Z","Value":"40 "},{"LoggerId":"MOD12346-0","Moment":"2020-12-31T22:00:00.000Z","Value":"5 "},{"LoggerId":"MOD12345-0","Moment":"2020-12-31T22:01:00.000Z","Value":"5.01 "},{"LoggerId":"MOD12345-1","Moment":"2020-12-31T22:01:00.000Z","Value":"40.01 "},{"LoggerId":"MOD12346-0","Moment":"2020-12-31T22:01:00.000Z","Value":"5.02 "}]}
I have attached the sample report.

Please let me know how can I make cross-tab cell to autosize based on the content (columns should be able to have different width).

Thank you for your support.
Attachments
SampleReport.mrt
(12.44 KiB) Downloaded 93 times
djjoyro
Posts: 32
Joined: Tue Apr 05, 2011 4:50 am
Location: România

Re: Cross tab cell size auto size

Post by djjoyro »

Hello,

I have some other information. It seems that this is happening only when the report is rendered in node.js on the server side and passed to the client as:

Code: Select all

report.saveDocumentToJsonString()
On the client side I'm loading the report using

Code: Select all

report.load(reportJsonStringFromServer)
Is there anything I could do better ?

Thank you, and sorry if I'm asking dumb questions :)
Lech Kulikowski
Posts: 6196
Joined: Tue Mar 20, 2018 5:34 am

Re: Cross tab cell size auto size

Post by Lech Kulikowski »

Hello,

We need some additional time to investigate the issue, we will let you know about the result.

Thank you.
djjoyro
Posts: 32
Joined: Tue Apr 05, 2011 4:50 am
Location: România

Re: Cross tab cell size auto size

Post by djjoyro »

Hello,

It seems that everything is getting fine when I load the fonts from the template:
Stimulsoft.Base.StiFontCollection.addOpentypeFontFile("arial.ttf");

I didn't knew it is required to render the report in node.js. Now I know. Thank you.
Lech Kulikowski
Posts: 6196
Joined: Tue Mar 20, 2018 5:34 am

Re: Cross tab cell size auto size

Post by Lech Kulikowski »

Hello,

Thank you for the information.
Post Reply