Hello All,
We have recently switched to Enterprise Guide 8.1. Along with that switch one of our pdf reports broke.
We found that we could fix the report by going Tools --> Options --> Results --> General and unticking the Result Format of HTML.
Is there a way to achieve the same effect by setting some options?
Thanks
Daniel
Try adding this to your code. Default with HTML is SVG, and I think that's affecting the way SGPLOT builds the graph.
options dev=png;
EG 8.1 uses HTML5 by default, so you might start by unchecking the "flavor" of HTML to use and set back to plain HTML.
Also, if what "broke" is a setting related to graphics style/type, you could add explicit ODS statements for PDF that set it to what you want. If using EG to generate the PDF output for you, try statements like:
ods pdf(id=egpdf) gtitle gfootnote...;
Learn more in this blog post about ODS control in EG.
Hi Chris.
Thank you for your response.
I am trying to write code that can run in multiple instances of EG or be sent to someone else and it will "just work".
I was hoping that there was a way of writing code that could set the options that I want. I have tried using ods _all_ close and it is not stopping the html EG option from affecting my pdf.
Any thoughts?
Thanks
Daniel
Can you share specifics about what's "broken" in your PDF report? Paging, style, graphics, layout?
Sure. There is a proc sgplot used to build some custom graphs. It is using text as one of the attributes and if EG html is check the text becomes really squished up and disassociated from the text backlighting which remains where it is supposed to bed and is not squished up. If I uncheck the html box and rerun the pdf this doesn't happen. I am not sure how or why html is affecting the pdf.
Any custom style or special settings?
if you add this to the top of your program:
ods pdf(egpdf) style=(your desired style) gtitle;
Does that help?
Hi Chris,
I'm afraid that didn't work.
I have stripped my code back to create the worlds ugliest pdf.
Try running it with the Tools-->Options-->Results-->General-->Html checked and again with it unchecked.
data work.class;
set sashelp.class(obs = 5);
N = _n_;
low = 0;
mid = 1;
high = 2;
run;
ods _all_ close;
ods pdf(mypdf) file=&fileLoc. style=PEARL gtitle;
proc sgplot data = work.class;
text y = n
x = mid
text = name
/
textattrs = (size = 18pt color=red)
backlight = 1
;
run;
quit;
ods pdf(mypdf) close;
Try adding this to your code. Default with HTML is SVG, and I think that's affecting the way SGPLOT builds the graph.
options dev=png;
Thankyou
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.