Is there an option to set individual column width in the TableReportView options?
Hi,
Is there an option to set individual column width in the TableReportView options? We are using an HTML web report with the live report to show search results and need a way to expand a few columns and shrink others to fit in the column values and make them readable. Is there a document that details these options?
I am looking for something below highlighted
pageContext = new PageContext();
options = {
context: pageContext,
data: {
id: 198404,
title: 'Information Report',
header: false,
titleBarIcon: 'title-assignments',
sortBy: 'DataID',
columnswidth:[
{
name: 'org',
value: "300px"
},
sortOrder: 'desc',
parameters: [
{
name: 'org',
value: org_val
},
]
}
};
tableReportView = new TableReportView(options);
contentRegion.show(tableReportView);
pageContext.fetch();
}
Comments
-
The options for the Table WebReport component are documented in the Smart View SDK docs for your Content Server version. There isn't currently a supported way of controlling column widths. We do have a feature request to add this which is logged as https://jira.opentext.com/browse/LLWR-13413.
For information, there are some improvements coming out in this area for the 21.1. update. These include:
- The Table WebReport is registered as its own widget in the Perspective Manager so there will be no need to use the HTML WebReport to launch this any more.
- The Table WebReport can be configured to show in the Smart View when clicking on a WebReport node and not just when loaded into a Perspective.
- We added support for making multiple columns searchable.
I think allowing control over column widths is a useful feature to add so hopefully we'll have time to add it before too long.
Regards
Ian
1 -
Thanks, Ian!!
I am able to modify the column sizes as mentioned in the JIRA.
.csui-nodetable th[data-csui-attribute="<Column Key returned from the server>"], .csui-nodetable td[data-csui-attribute="<Column Key returned from the server>"] { max-width: 50px !important; min-width: 50px !important; width: 50px !important; }
If someone wants different lengths for each column then it needs to be defined for each column separately and can be grouped as required.
0 -
I made a mistake in the CSS class - the "csui-nodetable" addresses all table-like widgets. If your column property is unique enough to appear only in that single webreport, the style will work well. But if not, you will resize columns in other widgets, which show by chance a property with the same name.
Every widget has a unique CSS class on the topmost element. The NodesTable widget uses "csui-nodestable" (mind the "s" in the middle.) WebReports widgets use "webreports-table-report-view" and "webreports-nodestable-report-view". If you use these classes in the CSS selector, you will make sure that other widgets will not be broken.
The only problem that remains is a conflict with other reports. If the same property name were used in other report for different data, you would resize it accidentally too. You would have to choose the property names cleverly, so that those, which need column-resizing, would be unique enough and if used in any other report, they would be wanted to get resized too.
1 -
Thanks, Ferdinand !! Fortunately, the column keys are unique in my case.
0
Categories
- All Categories
- 123 Developer Announcements
- 54 Articles
- 150 General Questions
- 148 Thrust Services
- 57 OpenText Hackathon
- 37 Developer Tools
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 918 Core Messaging
- 84 Digital Asset Management
- 9.4K Documentum
- 32 eDOCS
- 186 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 8 XM Fax
- Follow Categories