hi,
i have a stored process that i call from the web.
the stored process is created in EG and also deployed from EG.
the stored process generates a fancy pdf document with ods layout stuff applied.
when i call the stored process from a browser with US locale, the papersize is set to letter (see my previous question at https://communities.sas.com/message/180880#180880) causing the content to run off the pdf page.
i need to force papersize A4.
the obvious solution would be to set options papersize=a4 in my EG project, but i already did this and it doesn't work.
i think this is because when the stored process is deployed from EG, %stpbegin is inserted before all my code causing the ods pdf stream to already be opened with the letter papersize before my options papersize=a4 has the chance of altering it.
i can get it to work by manually editing the stored process source code and inserting the options papersize=a4 statement before the %stpbegin macro but i am not allowed to do that in our environment.
is there another way to dictate the papersize option in this scenario?
i would rather not deploy the stored process without the %stpbegin macro and code my own ods pdf statements.
thanks,
Bart
_PRINTOPTIONS worked.
after some error checking, %stpbegin submits:
%if (%qcmpres(&_STPERROR) eq 0) %then %do;
options &_PRINTOPTIONS;
%end;
i added a hidden parameter to the Stored Process with name "_printoptions" and default value "papapersize=a4" and now the pdf comes out in A4 regardless of browser locale.
What options are you passing to the %stpbegin macro? If I read the macro correctly it looks like you can send print options via the parameter _PRINTOPTIONS and it looks like PAPERSIZE should be accepted though I can't tell immediately what the syntax would be.
_PRINTOPTIONS worked.
after some error checking, %stpbegin submits:
%if (%qcmpres(&_STPERROR) eq 0) %then %do;
options &_PRINTOPTIONS;
%end;
i added a hidden parameter to the Stored Process with name "_printoptions" and default value "papapersize=a4" and now the pdf comes out in A4 regardless of browser locale.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.