ivan77 Posted August 22 Report Share Posted August 22 Hi, How can I set label right alignment for a number field and left alignment for a text field in 1 tabular report ? Rgds, Quote Link to comment Share on other sites More sharing options...
0 CoopperBackpack Posted August 22 Report Share Posted August 22 Hello @ivan77, There are 2 CSS classes responsible for the header titles: cbResultSetHeaderCell (for text fields) cbResultSetHeaderCellNumberDate (for the numeric and Date fields) Please go to the Styles > Result Page > Table Layout > Source > Search for the 'cbResultSetHeaderCell' and 'cbResultSetHeaderCellNumberDate' Change the 'text-align' property and double-check if there is a semicolon at the end. Quote Link to comment Share on other sites More sharing options...
0 ivan77 Posted August 27 Author Report Share Posted August 27 Hi @CoopperBackpack, the text alignment setting only works on 'cbResultSetHeaderCell', nothing change if I set on 'cbResultSetHeaderCellNumberDate' Now, text value also having right alginment Rgds, Quote Link to comment Share on other sites More sharing options...
0 CoopperBackpack Posted August 27 Report Share Posted August 27 Hi @ivan77, When I look at your screenshot, I understand this might be a Pivot table, not the Tabular Report. Labels like 'Sum of...' are typical for the Pivot table. 1) Please double-check the DataPage type. 2) Please confirm that you need to apply alignment only for labels and not for values. Quote Link to comment Share on other sites More sharing options...
0 ivan77 Posted August 27 Author Report Share Posted August 27 59 minutes ago, CoopperBackpack said: Hi @ivan77, When I look at your screenshot, I understand this might be a Pivot table, not the Tabular Report. Labels like 'Sum of...' are typical for the Pivot table. 1) Please double-check the DataPage type. 2) Please confirm that you need to apply alignment only for labels and not for values. Yes it is a pivot datapage, and alignment for both labels and values Quote Link to comment Share on other sites More sharing options...
0 CoopperBackpack Posted August 27 Report Share Posted August 27 Hi @ivan77, Thank you for your clarification. Since labels on the Pivot table have the same classes, you may test the following approach: add styles to the Header section of the DataPage and reference the fields by their position number. On your screenshot the highlighted fields are the 3rde and the 4th fields, so please test the code: <style> th[class*="cbResultSetHeaderCell"]:nth-of-type(3), th[class*="cbResultSetHeaderCell"]:nth-of-type(4) { text-align: right; } td[class*="cbResultSetData"]:nth-of-type(3), td[class*="cbResultSetData"]:nth-of-type(4) { text-align: right; } </style> ivan77 1 Quote Link to comment Share on other sites More sharing options...
0 ivan77 Posted August 28 Author Report Share Posted August 28 Thanks a lot @CoopperBackpack It works as expected Rgds, CoopperBackpack 1 Quote Link to comment Share on other sites More sharing options...
Question
ivan77
Hi,
How can I set label right alignment for a number field and left alignment for a text field in 1 tabular report ?
Rgds,
Link to comment
Share on other sites
6 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.