Jump to content
We've recently updated our Privacy Statement, available here ×

Are text fields trimmed before being used in sort?


drummer54

Recommended Posts

I'm using some existing SQL to create a report in JR 5.5.1 and sorting on 3 fields called company, region and location.  The SQL calculates subtotals and totals and counts on these lines being listed in the correct order by using leading spaces before company name, region name and location name and the report total line being identified by 'Report Total' in the company and region fields with no leading spaces.  This works fine in SQL Server Reporting Services.  However, in Jasper Reports, if the company name starts, for example, with an 'S', the report total line prints ahead of the company detail.  The only explanation for this that I can determine is that the leading spaces are being trimmed before sorting.

I've attached the jrxml file with the SQL edited to included only the pertinent code and also an Excel spreadsheet with data as returned from the query. 

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...