• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • 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

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    #11
    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

    https://youtu.be/vgtVJf21EXU


    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/C...%20string.aspx

    Comment


      #12
      Late to the party.

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

      Comment

      Working...
      X