Skip to Content

SAPUI5 List Report Default Grouping

Hi:

I have successfully created an SAPUI5 List Report, but need to do two things:

  1. Set default column widths.
  2. Group on showing the report the first time.

Any thoughts on how to achieve this?

Thanks in advance! Ian.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Feb 19 at 03:23 AM

    Hi Ivan:

    Thanks for the info. I had used OSDL to create an aggregation which provided the right output if the 'Go' button of the Annotation-based application was pushed, but I was looking for something that started with the data in the table.

    Have you heard of the UI Annotation Editor? It seems likes it's only available after version 1.48, but it does precisely what I was looking for:

    1. Automatically groups and totals on startup
    2. Allows for the precise control of the columns in the table

    In addition, it has a one-step 'export to Excel' which is very handy!

    Here's a link to the capabilities (written by Jocelyn Dart).

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 29, 2017 at 06:37 PM

    Hi Ian,

    In order to group columns by default you need an OData that allows aggregations. So when you issue a "$select" statement on you service, the first columns selected will be used for grouping, just as long as they are marked to be aggregations on your backend service. When you create the presentation variant and define the DataFields, those will be used to present it, thus the OData query will be built with the proper select statements according to the aggregations. In order for it to work you need the Analytical Table Type - which is the only one that allows this type of table display. The table type is switched automatically when the data-source has the "@Analytics.query: true" annotation or you are exposing an Analytical Calculation View.

    With regards to the width of each column, they are defined by MaxLength property and it comes from the EntityType definition. The same goes for MaxLength, Precision, Scale. Check this blog as well for dynamic field control.

    Check the OData V4 Annotation Vocabulary Wiki:

    https://wiki.scn.sap.com/wiki/display/EmTech/OData+4.0+Vocabularies+-+SAP+UI#DataFieldAbstract

    Regards,
    Ivan

    Add comment
    10|10000 characters needed characters exceeded