• Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

SQL query and reports

5.00 star(s)
You can use a matrix and put the AuditTypeID in the column group field, this would in give you a dynamic number of columns based on the distinct number of AuditTypeIDs you have across the rows. Effectively a Pivot table.

This vid demonstrates it in SSRS so should be applicable in RB3 although he parameterises which columns he wants to use but should give you the idea

The only caveat though is I'm pretty sure you would get a column for every AuditTypeID that appears in your dataset, and that would be applied across all your rows(invoices) regardless of whether each row has a values for each audittypeid



the other option is to flatten the rows in the SQL statement and concatenate the AuditTypeID into a single string

http://www.sqlmatters.com/Articles/... table to a single concatenated string.aspx
 
Late to the party.

If you are sans reporting tool, many databases have a PIVOT / UNPIVOT function for dealing with such problems in SQL.
 

Advertisers

Back
Top