BookmarkSubscribeRSS Feed
AlexeyS
Pyrite | Level 9

Hello,

I have to create both pdf and html reports in one program, but i get an error. Please see an attached picture.

PICTURE.PNG

First i create pdf file and then html.

pdf code looks like this :

odf pdf file="";
................
ods pdf close;

html code looks like this :

goptions device=Activex border;
ods listing close;
ods html path="" gpath="" file="";
...................
ods html close;
ods listing;

When i run each report separately, i don't get any error and report is created.

Thank you

2 REPLIES 2
Cynthia_sas
SAS Super FREQ

Hi:
What procedure are you running inside the ODS "sandwich"? Do you really need the ActiveX device? The fact is that ActiveX is Microsoft technology that PDF is not "happy". If you are using "G: procedures (like GCHART or GPLOT), then device=PNG should be OK for both. If you are using the "SG" procedures (like SGPLOT or SGPANEL), then you should be using the ODS GRAPHICS statement instead of the GOPTIONS statement.

I do expect to see THIS warning if I try to use ACTIVEX with any of the graph procedures and ODS PDF:
WARNING: Unsupported device 'ACTIVEX' for PDF destination.
    Using device 'ACTXIMG'.

However, when I try to use ACTIVEX as the device, I do NOT get the TRACEBACK errors that you get. That is NOT good. But you got the message on a READ ACCESS Violation and since you didn't show all your code (PATH, FILE, etc) , it's hard to determine whether the issue came from the device or came from the place you tried to write for GPATH, and/or PATH.

This works for me with one program in both PDF and HTML. I used PNG for the device, since that is essentially what ACTXIMG is behind the scenes. The code worked for me with GPLOT and SGPLOT.

Cynthia_sas_0-1598743965669.png

Output one page for each image in PDF file:

Cynthia_sas_1-1598744046067.png

 

Hope this helps.
Cynthia

AlexeyS
Pyrite | Level 9

Thank you very much.

I use proc gplot and proc print in each ods(html and pdf). I use different programs for pdf and html.

if  I understood you correctly, i need in both ods html and ods pdf write  device=PNG, right?

Thank you very much

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!

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.

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
  • 2 replies
  • 749 views
  • 0 likes
  • 2 in conversation