BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
ahawkins61
Calcite | Level 5

In a table I have column headings of the dates of activity based on a SAS table that is always being updated.  Is there a way to program a list table to display column headings no matter what they are called or how many there are?  

When I create new list tables it always asks for the column headings, essentially hard-coding the names and number of the columns.  I need a more polymorphic solution.  Any ideas?  Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
Patrick
Opal | Level 21

With "traditional" SAS (SAS9, Viya spre) you can simply use something like:

proc print data=<your table> noobs;
run;

If you want a report in Viya then you need up-to-date metadata objects for the table in CAS and for the Report. 

You can dynamically update table metadata so it stays in synch with the physical table but I don't believe you can do something similar for report metadata (a report object). How could SAS "know" where a new column would need to be placed in a report and how to use it.

 

Changing table structures always cause challenges and additional coding work. Ideally re-arrange your data from wide to long and load this stable table structure into CAS for reporting.

 

Instead of a table structure like below...

Patrick_0-1672888117995.png

...re-arrange your data prior to loading into CAS to...

Patrick_1-1672888374982.png

 

 

 

View solution in original post

2 REPLIES 2
Patrick
Opal | Level 21

With "traditional" SAS (SAS9, Viya spre) you can simply use something like:

proc print data=<your table> noobs;
run;

If you want a report in Viya then you need up-to-date metadata objects for the table in CAS and for the Report. 

You can dynamically update table metadata so it stays in synch with the physical table but I don't believe you can do something similar for report metadata (a report object). How could SAS "know" where a new column would need to be placed in a report and how to use it.

 

Changing table structures always cause challenges and additional coding work. Ideally re-arrange your data from wide to long and load this stable table structure into CAS for reporting.

 

Instead of a table structure like below...

Patrick_0-1672888117995.png

...re-arrange your data prior to loading into CAS to...

Patrick_1-1672888374982.png

 

 

 

FredrikE
Rhodochrosite | Level 12
You can use a data driven content and create a viya job that creates the table dynamically and display it in VA.
Might help you...:)
BR
Fredrik

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 636 views
  • 1 like
  • 3 in conversation