BookmarkSubscribeRSS Feed
akhq
Calcite | Level 5

I have this issue that I need to create EMF file format figures, since they work better for PDF (RTF converted to PDF). The issue is that I want my logs clean, and since the SASEG destination does not support the EMF you will end up with "WARNING: SASREPORT13 destination does not support EMF images. Using the default static format." in your log.

Ok so it was hard enough to even try to figure out how to control this destination... But I figured that I need the following statements:

 

ODS tagsets.sasreport13(ID=EGSR) select NONE;

ods listing close;

SOME MAGICAL GRAPH GENERATING CODE...

ODS tagsets.sasreport13(ID=EGSR) select all;

ods listing;

 

And it will work without the warning. IF I run the program only once... But if I wrap it as a macro and call it multiple times in the same program then I get the following error after the first macro call has finished and second is generating output:

ERROR: The TAGSETS.SASREPORT13(EGSR) destination is not active; no select/exclude lists are available. (and this will be replicated N-1 times where N is the number of macro calls, so meaning that the first goes as intended but the subsequent ones don't)

So clearly the ODS tagsets.sasreport13(ID=EGSR) select all statement has no impact on anything... I have also tried to check sashelp.vdest data how it behaves in each step, but it seems that it lives its own life, and doesn't really care about any of the statements except the ods listing off. (I have there only HTMLblue and Listing as values).

 

So it seems to be impossible to even get any documentation on what the heck TAGSETS.SAREPORT13(EGSR) even is let alone how it works...

Extremely frustrating.

8 REPLIES 8
Reeza
Super User
You're saying this type of option doesn't work in SAS EG?

https://documentation.sas.com/doc/en/lrcon/9.4/n030hgajs8pdqln1vwp56c5kghva.htm
Reeza
Super User

ODS tagsets.sasreport13(ID=EGSR) select all;


What happens if you just close the tagset instead ?

 

I believe that's an older version of EG, newer versions use HTML5 instead. 

https://communities.sas.com/t5/ODS-and-Base-Reporting/Struggles-with-Enterprise-Guide-Results-Window...

ballardw
Super User

You might want to show the code at least where you attempt to control the image type generated.

 

I would typically expect to see something like <dummy code wont' execute>

ods listing;
ods graphics on / outputfmt=EMF /* other graphics options like maybe Imagename='mygraph'*/

<code to generate graphs>

/* possibly an ods graphics /reset; or change to different image type for other output destinations*/

ods listing close;

Note that you really do have to have ods destination open that will allow the type of file you want.

My SAS 9.4.7 shows the EMF is only allowed for Listing, Excel, Powerpoint adn RTF.

 

Your problem with the macro is extremely likely to be related to timing of different options but since you didn't show the macro code we can't really comment on it. One suspects issues about when a destination is opened/closed in relation to the graph generating code.

 

akhq
Calcite | Level 5

Hi OP here, been a while since I worked with this, but still no progress on this front and now I really would need to get this fixed... But I fear this is a bug in sas EG session management or something since for example https://support.sas.com/resources/papers/proceedings13/408-2013.pdf states that you could use the ODS tagsets.sasreport13 commands in the manner I have used, but they just don't work. For the info I get the following version info for SAS EG: 7.13 (7.100.3.5408) (64-bit) , and no an update for EG is not possible for me.

 

Here is the complete section with all the ods statements:

ODS tagsets.sasreport13(ID=EGSR) select NONE;*Need to close the EG results destination since it does not support EMF file format;

options nocenter; 
ods rtf file="FILEPATH" style=STYLEFILE bodytitle startpage=bygroup NOTOC_DATA nogfootnote nogtitle HEADERY=1134 FOOTERY=1020 wordstyle="{\s999 FIGURE}{\s0 Normal;}{\s1 \ql\widctlpar Heading 1;}{\s2 \ql\widctlpar Heading 2;}{\s3 \ql\widctlpar Heading 3;}{\s4 \ql\widctlpar Heading 4;}{\s5 \ql\widctlpar Heading 5;}";

title;
footnote;

ods listing close;

ods graphics on / width= &modwidth. cm height=&modheight. cm antialias noborder noimagemap imagefmt=EMF scale=off;

<CODE TO GENERATE PLOT>

ods graphics off;

ODS tagsets.sasreport13(ID=EGSR) select ALL;*Open the EG report destination again;

ods listing;


ods rtf close;

 

ballardw
Super User

@akhq wrote:

Hi OP here, been a while since I worked with this, but still no progress on this front and now I really would need to get this fixed... But I fear this is a bug in sas EG session management or something since for example https://support.sas.com/resources/papers/proceedings13/408-2013.pdf states that you could use the ODS tagsets.sasreport13 commands in the manner I have used, but they just don't work. For the info I get the following version info for SAS EG: 7.13 (7.100.3.5408) (64-bit) , and no an update for EG is not possible for me.

 

Please point out exactly which sasreport13 "commands in the manner" you are referring to.

 

My typical approach to debugging complex output requirements is to add ONE element at a time. That way you can identify which option is the most likely culprit and address it.

 

I do see a number of options that I do not find as options to the ODS RTF statement and nothing in that referenced link that shows use of destination options not valid for a given ODS destination.

 

I did not see anything in that referenced link that was attempting to insert any raw codes anywhere. Perhaps you need to look at ESCAPECHAR and the RAW style option for some of that since it appears you are inserting raw RTF codes.

akhq
Calcite | Level 5
Thanks for the reply, but unfortunately I don't quite understand what you mean?
The issue for me is that all seems to work as intended as far as I select none from the sasreport13, but for some reason the equivivalent select all has no effect at all. So yes I want RTF output, but with that I have no issue. The only issue is that I either get as many warnings as there are figures about EG output not supporting the picture format, or then I get this error that there is no destination. In all of the cases the RTF outputs work just fine, but for me it is crucial to have clear logs and that is why I need this resolved. So I just want to supress the figure from EG report output to avoid such behavior.
Reeza
Super User
Have you tried ods _all_ close and then open the RTF? EG should automatically open back up the EG destination if I recall correctly.
Tom
Super User Tom
Super User

It is usually much easier to debug issues without macro code.  So you don't have the complication of not knowing exactly what code is being run.

 

Can you create the same error without any macro code.  For example if you turn MPRINT on and then copy the code the macro generated into a new program and just run that code does it still produce the error?

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 8 replies
  • 594 views
  • 2 likes
  • 4 in conversation