BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
maxpgn
Fluorite | Level 6

Greetings,

I hope you can help me with a problem i can't figure out. I need to create a PDF report in SAS 9.4. The report includes just one table, with a very complex header, so I used RWI (data _NULL_) to create it.

Now I need to replicate the table on another PDF report, so I thought it would have been a good idea to save the table as an ODS DOCUMENT so to use PROC DOCUMENT/REPLAY to insert the table on both reports.

Unfortunately, when I try to load the ODS DOCUMENT, I get an empty PDF. It seems that output created via the RWI cannot be saved as on ODS DOCUMENT.

Any idea?

 

This is a simplified version of my code:

 

* Program number 1: to create the ODS DOCUMENT object M05_tab;

ODS _all_ CLOSE;

ods document name=DOCUMS.M05_TAB(WRITE);

 

data _NULL_;
  set work.M05_DATI_REP end=done;
    if _n_ eq 1 then do;
         declare odsout t();
         t.table_start();
         t.head_start();
         t.row_start();
               t.format_cell(...);
               t.format_cell(...);

.....

run;

 

ods document close;

 

 

*program number 2: to use the ODS DOCUMENT Object;

 

ods _all_ close;

ods pdf file="filename.pdf" style=SasWeb Startpage = off NOTOC;


ods layout gridded columns=1;

PROC DOCUMENT NAME=DOCUMS.M05_TAB;
REPLAY;
QUIT;

ODS LAYOUT END;

 

 

Thank You very much for your time and help

 

Max

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
Diamond | Level 26
Hi:
I do not know the definitive answer. When I try to use the RWI with ODS DOCUMENT, I do not get any error messages in the log but I also do not get any objects in the document store. I think that Tech Support can provide you with the definitive answer. I would have expected a NOTE or ERROR message in the log.

Cynthia

View solution in original post

4 REPLIES 4
Cynthia_sas
Diamond | Level 26
Hi:
You might want to ask your question of Tech Support. If RWI isn't supported by ODS DOCUMENT now, they may know of a workaround.

Cynthia
maxpgn
Fluorite | Level 6
Hi and thank you for answering. But is it possible that rwi is not supported by ods document? I read that it can be thought as another destination like pdf, html and so on.....
Cynthia_sas
Diamond | Level 26
Hi:
I do not know the definitive answer. When I try to use the RWI with ODS DOCUMENT, I do not get any error messages in the log but I also do not get any objects in the document store. I think that Tech Support can provide you with the definitive answer. I would have expected a NOTE or ERROR message in the log.

Cynthia
maxpgn
Fluorite | Level 6

Thank You anyway...

I wrote an email to the referee for the RWI and I got the answer: as a matter of fact, RWI cannot be used with proc document

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1591 views
  • 0 likes
  • 2 in conversation