Forum Discussion

swhetsell's avatar
swhetsell
Copper Contributor
Dec 31, 2023

Vertical Data Columns in Report

Greetings,

 

I need to recreate the following table in an Access Report. For whatever reason I am having a complete block and am unable to figure out what to do.

 

The data is currently returned to access through a StoredProcedure call to SQL. SQL returns the recordset which includes each value as well as a GUID to identify who it goes to. Each person may have up to 10 records (different years), so it needs to be 10 columns wide for data (sorted by year) and the row needs to report its values down the list. I have tried making a multiple-column report, but I cannot add the row titles to the left or it cuts the data off.

 

Here is an example of the data that is returned:

 

This is the format I need it to go to:

 

Thanks in advance.

2 Replies

  • If you enhance your sproc with the PIVOT statement, you can transform your data to return the data as in image 2. Then it is just a simple auto-report.
  • Harun24HR's avatar
    Harun24HR
    Silver Contributor
    Attach your sample db. First you may need a crosstab query and then use that query as data source of your report.