08-19-2015 10:12 AM
Hi....I am trying to create a report using PROC Report where the dataset has been transposed. The problem is that I don't know how many columns in advance. What I do know is the name of the columns will be numeric and start with 1 and end at some count number. Is there a way to deal with this as the Column Statement requires column names. The only thing I want to do is add column and row totals in the report. Thanks in advance.
08-19-2015 10:56 AM
Transposed in a data step or proc transpose? I would be surprised that proc transpose would generate a variable name starting with the digit 1.
Can your provide an example of what the proc report code would look like for something with 4 of these column variables?
If the resultant variables from the transpose are all named with the same base, default COL, you can use a variable list such as:
column COL: ;
to treat all variables starting with COL as column
08-19-2015 11:01 AM
Yes, agree with ballardw, provide example. If you don't need to do anything else with the variables, the you could do:
However it becomes more tricky if you need define statements etc.