when ever i create a matrix report say for e.g from
select samples,test ,result from <tablename> with row labels as test, column labels as samples and result as the cell, the rows and columns are always sorted alphabetically.Is there a way that the rows and column data appears as per requirement i.e not sorted.
I'd say not, at least not in example you gave. Why not? Because - when you created matrix report - you got three groups, each containing one field. Every group (except the lowest one - the one that contains your cell data) MUST have at least one field with "Break order" property set to "Ascending" or "Descending".
But, if you include additional columns into the query, you may choose another column to have "Break order" set, while the column you need to be unsorted remains ... well, unsorted