Traditional web-based reporting with SAS BI tools

ODS Style of Stored Process in WRS

Reply
Regular Contributor
Posts: 179

ODS Style of Stored Process in WRS

Hi,

How can I set the ODS output style for a Stored Process when it executes from WRS?

-Bart
SAS Super FREQ
Posts: 8,720

Re: ODS Style of Stored Process in WRS

Hi:
WRS uses CSS syntax for the styles used inside the WRS interface. So if you refer to this documentation topic
http://support.sas.com/documentation/cdl/en/biwaag/63536/HTML/default/viewer.htm#/documentation/cdl/...

it says

SAS Web Report Studio relies on cascading style sheets (CSS) to render styles for reports. To supply a custom style, follow these steps:

1. Create a CSS file and define the formats that you want for the style. For information about the supported formats as well as a sample CSS file, see CSS Formats for Custom Report Styles.

2. In the Web Report Studio 4.2 Properties dialog box within SAS Management Console Configuration Manager, provide information that SAS Web Report Studio needs in order to locate and render the style. For instructions, see Specify Property Names and Values for Styles.


cynthia

ps..these are SAS 9.2 instructions. For 9.1.3, instructions, refer to the 9.1.3 Platform/Web Administration guide
Regular Contributor
Posts: 179

Re: ODS Style of Stored Process in WRS

Hi Cynthia,

Thanks for your reply.

Does this also apply to Stored Process generated output?
My Stored Process does a PROC REPORT, I would think that proc report uses different css style elements than described in http://support.sas.com/documentation/cdl/en/biwaag/63536/HTML/default/viewer.htm#/documentation/cdl/....
Or do I have to add the elements that PROC REPORT uses to the WRS CSS file?

I created a WRS report with a Stored Process in one of the containers but I got no borders, column header styles whatsoever.

Thanks,
-Bart
SAS Super FREQ
Posts: 8,720

Re: ODS Style of Stored Process in WRS

Hi:

Yes, any CSS that you want to use/change for WRS, must be changed as described in the link I posted -- even for Stored Processes.

When you use a Stored Process, output is created appropriately for the requesting application. So, for example, if you run a Stored Process in SAS Enterprise Guide, the result types are either SASReport XML or HTML (or RTF or PDF) that you can create -- the final output is the result type you choose in the EG Options menu or the &_ODSDEST reserved macro variable that you set in your stored process code.

However, some client applications, such as WRS and PowerPoint, for example, do NOT give you a choice of result type. So, for example, if you have a stored process program with a hard-coded override of
[pre]
*ProcessBody;
%let _ODSDEST=MSOFFICE2K;
%let _ODSSTYLE=SASWEB;
%stpbegin;
[/pre]

EG will respect the reserved macro variables for destination and style, because EG can "receive" either HTML results -OR- SASReport XML results from a stored process.

However, WRS and PowerPoint can -ONLY_ receive SASReport XML results from a stored process. In the background, if you use _ODSDEST for a stored process as shown above and then run the SP in WRS or PowerPoint,
the %STPBEGIN macro will gently fix your incorrect usage of _ODSDEST and will set the result type to SASReport XML instead of MSOFFICE2K (for example).

When the result type is set to SASReport XML, the appropriate CSS selectors are used in the creation of your output. Just as when you use ODS MSOFFICE2K, the appropriate CSS selectors for HTML are used in the creation of your output.

So, a long explanation for what is a final "No" -- you do NOT have to add the style elements that PROC REPORT uses to the WRS CSS file. That's one of the benefits of having your stored process execute on the platform servers. They KNOW what result type will be used, based on the client application that's requesting the SP and they create the style/class selectors appropriately. And they will create the type of CSS reference that's needed for the client application that requested the stored process.

You say that you created a WRS report with a Stored Process in one of the containers (?? WRS report layout grid??) but got no borders, column headers styles -- without seeing your actual SP code and knowing what version of the Platform you're using, it's hard to diagnose what's happening.

Your best bet for help with the WRS results from the stored process and help with the borders, etc, would be to work with Tech Support, as they can try to replicate your results on either a SAS 9.1.3 platform install or a SAS 9.2 platform install. In addition, just as an example, if you tried to use style overrides in your PROC REPORT code for HTMLSTYLE or HTMLCLASS or PREHTML or POSTHTML style attributes, remember that the results being sent to WRS are not, not, not HTML -- they are SASReport XML output -- and so there is a distinct possibility that any "HTML-ish" style attributes are just ignored.

But as I said, you might want to work with Tech Support to determine whether and how you can alter the CSS used for WRS to accomplish what you want to do.

cynthia
Regular Contributor
Posts: 179

Re: ODS Style of Stored Process in WRS

Hi Cynthia,

Thanks for your answer, this is very helpfull.

Regards,
Bart
Ask a Question
Discussion stats
  • 4 replies
  • 390 views
  • 0 likes
  • 2 in conversation