The SAS Output Delivery System and reporting techniques

How to justify "by" report tittle using ods tagsets and suppress_bylines="no" option?

Reply
SAS Employee
Posts: 2

How to justify "by" report tittle using ods tagsets and suppress_bylines="no" option?

Hi all,

One customer is using ods tagsets excelxp.

He is using the option suppress_bylines="no" to get one excel sheet for each by variable value using the proc report code.

By default this sheet title(=the by variable value) is justify on the right, she would like to get it on the center or in the left side.

¿Do you know how to get it without using stiles?

I recommend her to do it using: options nocenter.

But in this way other tittles in the Excel report are justified on the left too.

And she would like only the by variable title on the left (or in the center)

Could you help?

This is the code that I used for make tests:

TestCode.png

Thanks,

Marisa.

Attachment
SAS Super FREQ
Posts: 8,868

Re: How to justify "by" report tittle using ods tagsets and suppress_bylines="no" option?

Hi:

  Using either SAS 9.2 or SAS 9.3, when I run your code, using TAGSETS.EXCELXP, the BYLINE in my output is centered, so if your customer is seeing RIGHT justification for the BYLINE, then they may want to open a track with Tech Support.

Otherwise, one way to achieve left justification is to move away from the BYLINE and use PROC REPORT's PAGE option and a COMPUTE block to write the equivalent of the by information.

cynthia

ods tagsets.excelxp file="c:\Temp\output_rev.xml"

    style=styles.sasweb

    options ( Sheet_Name="Summary CH"

    Orientation="Landscape"

    Embedded_Footnotes='Yes'

    Embedded_titles='Yes'

    Print_Footer_margin='0.3'

    orientation="landscape"

    fittopage="Yes");

   

proc report data=prueba nowd ;

column ('texto 'sex name weight height) ;

define sex / order noprint;

define name / order;

define weight /sum;

define height/ sum;

break after sex / page;

compute before _page_ / style={just=l font_weight=bold color=red};

  txt = 'Sex: '||sex;

  line txt $50.;

endcomp;

run;

  

ods tagsets.excelxp close;

SAS Employee
Posts: 2

Re: How to justify "by" report tittle using ods tagsets and suppress_bylines="no" option?

Posted in reply to Cynthia_sas

Thanks Cysnthia for this answer.

I'm going to pass to the customer this infor.

Ask a Question
Discussion stats
  • 2 replies
  • 297 views
  • 4 likes
  • 2 in conversation