By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,476 Members | 1,529 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,476 IT Pros & Developers. It's quick & easy.

Transpose Report

P: 14
I need to do the following: If you look at a tabular regular report you'll see what I need but transposed. The title on the left in one single column and the data on its right side


Like
Record1 Record2 Record3 .......Record n
Label1 . . . .
Label 2 . . . .
Label 3 . . . .
. . . . .
. . . . .
. . . . .
Label n . . . .

Thanks Again,
Oct 11 '07 #1
Share this Question
Share on Google+
4 Replies


nico5038
Expert 2.5K+
P: 3,072
Looks to me you're looking for the Crosstable (or pivot) possibility.
It will transform the contents of a field into a column header and the values for the rowheader will be placed underneath the proper column.
This is however limited to one column for the header, but multiple rows headers are possible....

Nic;o)

Comment by TSGB was a "reported" post. Please use next time the [Reply] button...

No crosstable doesn't work beacuse I have no vaules to summarize I just need to do a column report but with the titles only once in the report.
Oct 11 '07 #2

nico5038
Expert 2.5K+
P: 3,072
As stated, this will require a crosstable query and that has the problem that there will be a max of some 255 columns (or less). Indicating that you can have a max of 255 records.
Before you can use a crosstable you would also need a tricked UNION to get the fields prepared to act as rows.

Nic;o)
Oct 16 '07 #3

P: 14
I don't understand. Can you explain it to me better please. Step by step what you would do. All my fields only have text.

Thanks Again,


As stated, this will require a crosstable query and that has the problem that there will be a max of some 255 columns (or less). Indicating that you can have a max of 255 records.
Before you can use a crosstable you would also need a tricked UNION to get the fields prepared to act as rows.

Nic;o)
Oct 17 '07 #4

nico5038
Expert 2.5K+
P: 3,072
You would bneed a UNION query like:
Expand|Select|Wrap|Line Numbers
  1. select PrimaryKeyField as ColumnHeader, 'fieldname1' as Rowheader, fieldname1 from tblYours
  2. UNION
  3. select PrimaryKeyField as ColumnHeader, 'fieldname2' as Rowheader, fieldname3 from tblYours
  4. UNION
  5. ..etc. for all fields (labels)
  6.  
This will generate a table with your primary keys, the labels (as typed) and the value of the field.
Based on this query you can create a crosstable query with ColumnHeader as the columnheader and RowHeader as the Rowheader (your label) and finally the fieldvalue as Value.

Nic;o)
Oct 17 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.