How to implement randomized sort order in a report

February 8, 2013 by Igor Lozhkin
To implement randomized data sorting in a report each time data is fetched from database, Arnica WebReport provides an easy solution:
  1. Create a custom column with character data type
  2. Use a custom column expression to generate global unique identifier value
  3. Make this column invisible in report output
  4. Create a sort order based on this column, and make this sort order default
Steps #1, #2 - data definition for custom column with expression generating random value:

custom_column_with_random_value_expression.png

Step #3 - custom column is set to be invisible in report output:

custom_column_is_set_invisible.png

Step #4 - predefined sort order based on the custom column with random value. Sort order is set as default:

sort_order_based_on_custom_column_with_random_value.png

Find more examples of reports built with Arnica WebReport  on the Arnica Software demo site.