Sort function sort alphanumeric instead of numeric

Stimulsoft Reports.WEB discussion
Post Reply
Kryshik
Posts: 3
Joined: Wed Nov 23, 2016 3:10 pm

Sort function sort alphanumeric instead of numeric

Post by Kryshik »

Hello Stimulsoft support team,

I've created a report and wanted to sort it by an index value, which is in the report.
This index value is defined as an integer, but if I sort the report by the index descending, the report list "18" below "2. See attached picture.
Should I set some more settings or values?

Greets Kryshik
Attachments
Description to the issue
Description to the issue
integer_Sort_issue.png (38.66 KiB) Viewed 2392 times
Test2.mrt
Report
(11.96 KiB) Downloaded 323 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Sort function sort alphanumeric instead of numeric

Post by HighAley »

Hello.

Could you send us sample data that will help us to reproduce the issue?

Thank you.
Kryshik
Posts: 3
Joined: Wed Nov 23, 2016 3:10 pm

Re: Sort function sort alphanumeric instead of numeric

Post by Kryshik »

Hi HighAley,

Thank you for the sample data request. By the preparation of the sample data, I saw that in the schema the type is still on string I changed it to int and now I got the right sorting!

Greets Kryshik
Kryshik
Posts: 3
Joined: Wed Nov 23, 2016 3:10 pm

Re: Sort function sort alphanumeric instead of numeric

Post by Kryshik »

Hi HighAley,

Thank you for the sample data request. By the preparation of the sample data, I saw that in the schema the type is still on string I changed it to int and now I got the right sorting!

Code: Select all

<xs:element name="LINK_SUPSW_has_assigned_threat">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Actual_risk_index" type="xs:int" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
Greets Kryshik
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Sort function sort alphanumeric instead of numeric

Post by HighAley »

Hello, Kryshik.

The data are sorted as in your data source when you select sorting column this way.
Or you should specify the DataSource1.Calumn1 as expression, then the data will be sorted as specified in the Dictionary.

Thank you.
Post Reply