cancel
Showing results for 
Search instead for 
Did you mean: 

Crosstab - column width issue

former_member206621
Contributor
0 Kudos

Dear all,

I have a report with a crosstab where we added 1 row with the overall result.

As you can see in the screenshot the width of the columns is adjusted so that all key figures are completely shown.  But to be able to see the numbers in the totals row you always need to resize the column width.

Can we change this somewhere so if the end-user opens the report the width is already (automatically) adjusted?  And I do not want a fixed width for my columns.

Kind regards,

Lieselot

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Lieselot,

to me it looks like that Design Studio does this (setting a fixed width with different css properties) automatically in some cases in the crosstab for the columns based on some internal logic (for example when more dimensions are in the crosstab instead of just one or something like that).

I think it is currently by design: for example when multiple dimensions are in the crosstab the way of displaying data (css properties) in the crosstab automatically changes (the columns receive a fixed width and the problem is that the hard-coded code ignores the fact that it could or should make/set this fixed width wider if the Totals are being displayed and the Totals-Value there is bigger/wider (more chars).

You could issue an improvement request (idea place) so that the width of the columns containing the measures should take into account the fact that it needs to be wider when Show Totals is enabled/used/showed in the Crosstab too so that the full Totals value is shown in the Totals-Row.

The only workaround I can suggest is by setting a fixed width to your "measure columns" yourself instead or relying on the widths that DS sets itself in the background for them anyway.

2 CSS workarounds (could be an option to consider, but doesn't do exactly what you want: doesn't adjust the width of each column automatically to always see the full content in 1 line only):

CSS workaround 1:


/* Data Area > Data Cell Total :: Line Break (Display Value on Multiple Lines) */

.sapzencrosstab-DataArea tr td.sapzencrosstab-DataCellTotal,

.sapzencrosstab-DataArea tr td.sapzencrosstab-DataCellTotal div {white-space: normal; word-wrap: break-word;}

CSS workaround 2:


/* Data Area > Data Cell Total :: Decrease Font Size */

.sapzencrosstab-DataArea tr td.sapzencrosstab-DataCellTotal,

.sapzencrosstab-DataArea tr td.sapzencrosstab-DataCellTotal div {font-size: 8px;}

Regards,

David

Former Member
0 Kudos

Another idea (not tested): if you are for example using bex queries you could adjust the names of your key figures there: add additional empty spaces at the beginning and/or end of them. This way Design Studio should consider them to be wider and thus should/might allocate more space by default for the column headers for these measures and the totals values should then automatically have more space available for display.

Regards,

David

Answers (1)

Answers (1)

former_member225688
Participant
0 Kudos

Hi Lieselot,

Could you please check the below thread and please let me know in case you need more details about it.

Dynamically alter the Column width of ALV Grid | SCN

Regards,

Dnyaneshwar Lande

Former Member
0 Kudos

Hi Dnyaneshwar,

I don't think you can use ABAP to change the way how Design Studio behaves/looks like or particularly for this issue. The table is created within Design Studio internally and uses mainly the technologies java/html/css/javascript.

Regards,

David