In order to get a crosstab to sort on month in descending order, I had to change the month variable to a 2-digit month from month name. We want month name to appear on the report, so I added variable month_name to the main part of the report and then added a row group to use that variable; this is basically the same approach I used to sort columns by last name/first name while displaying first name/last name. As I’ve already seen, adding row groups simply appends them to the end with no apparent facility provided to reorder the groups in Outline view. I thought I’d try to move the group in the Source view but it was nowhere to be found. I thought that maybe I had to go back to the main report and add a group on month_name to get this to work. I deleted the new group and on the main report added a group for month_name. However, it didn’t show up in Outline view nor in Source view. I tried to run the report to see what would happen and got these two errors (FYI, I had to type these because there seemed to be no way to copy/paste):
Reset group “month_name” not found for variable : month_name_COUNT --- net.sf.jasperreports.engine.design.JRDesignVariable@29495306
Reset group “month_name_count” not found for variable : month_name_count_COUNT --- net.nsf.jasperreports.engine.design.JRDesignVariable@30c92353
I hoped to undo what I had done to cause this, but there was no undo available. Fortunately I had not saved since the last working copy so was able to recover. But I’m still left with a puzzle as to how to get the crosstab formatted the way our existing SSRS report is formatted without having to do everything perfectly correct at the start, since there doesn’t seem to be a way to CHANGE the crosstab in any significant way once it’s built.