The SAS Output Delivery System and reporting techniques

skipline in proc report for tagsets.RTF report

Reply
Occasional Contributor
Posts: 17

skipline in proc report for tagsets.RTF report

hi, I have spent lot of time trying to figure out how to skip line after a group of observations for tagsets.rtf based output to mimic exactly the skip line functionality available for lst type outputs. i.e. skip line between groups, but not after last group, or after last group but before each page break.

The purpose is to avoid occasional extra pages without any row for data.

One way I did was to insert empty line using compute block before each group, instead of after each group. This almost works but I get stuck with border right above first line. the white gap between columns is present in some pages of report, while not in others.

Other way I am exploring is to conditionally insert line using compute block after each group. But I am not able to find a way to conditionally select/unselect needed records where line skip is needed.

Please help, I really need to set up my programs in the desired way. My code is below:

proc template ;

define style basicrtf;

  parent=styles.rtf ;

  class fonts /

          'TitleFont2' = ("Arial", 9pt, Bold)

          'TitleFont' = ("Arial", 9pt, Bold)

          'StrongFont' = ("Arial", 9pt, Bold)

          'EmphasisFont' = ("Arial", 9pt, Bold)

          'FixedEmphasisFont' = ("Arial", 9pt, Bold)

          'FixedStrongFont' = ("Arial", 9pt, Bold)

          'FixedHeadingFont' = ("Arial", 9pt, Bold)

          'BatchFixedFont' = ("Arial", 9pt)

          'FixedFont' = ("Arial", 9pt)

          'headingEmphasisFont' = ("Arial", 9pt, Bold)

          'headingFont' = ("Arial", 9pt, Bold)

          'docFont' = ("Arial", 9pt);

  class Body from Document /

        bottommargin = .75in

        topmargin = 1in

        rightmargin = 1in

        leftmargin = 1in

  protectspecialchars= off

;

  class table /

        background=_UNDEF_

        rules=cols

        frame=ABOVE

        cellspacing=10

        cellpadding=2

    bordertopwidth=1

      bordertopcolor=black

      bordertopstyle=solid

      borderbottomwidth=0

      borderwidth=1pt

      BORDERCOLOR=white

      outputwidth=100%

      ;

        ;

style Header/

background = _undef_

BORDERBOTTOMSTYLE=solid

        BORDERBOTTOMCOLOR=white

        BORDERBOTTOMWIDTH=1pt

      borderbottomstyle=solid

      bordertopwidth=1

      bordertopcolor=black

      bordertopstyle=solid

      font= ( "Arial", 9pt,bold)

;

class SystemFooter  /

      bordertopwidth=1

      bordertopcolor=black

      bordertopstyle=solid

;

class SystemFooter2  /

      bordertopwidth=1

      bordertopcolor=white

      bordertopstyle=solid

;

end ;

run ;

%let bb=borderbottomwidth=1 borderbottomcolor=black;

options obs=100;

proc sort data=sashelp.cars out=cars;

  by origin make model;

run;

options orientation=landscape nonumber nodate ;

ods tagsets.rtf file="C:\SASdata\Development\Dummy-01\TFL\Programs\test-tagset.rtf"  OPERATOR='SAS' style=basicrtf

options(continue_tag="no" )  PAGEPANELS=NONE UNIFORM ; *Tables_OFF='SysTitleAndFooterContainer PARSKIP';

* use operator to remove userid from filemeta *;

OPTIONS FORMCHAR="|----|+|---+=|-/\<>*";

footnote1 font=arial justify=left height= 2 '11qqqqqqqqqqqqqqqqqqqqqqqqqqq qqqqqqqqqqqqqqqqqqqqqqqqqq';

footnote2 'This is very very long footnote ......... , asdf sadf,e asdf aswerasdfrtavdferte ,sadfgsdaeryte';

footnote4 justify= left "name" justify= right "progname";;

title1 justify= left "name" justify= right "progname";

title2 'This is title 1\line- adverse event, medical history, etc etc etc';

title3 'treatment population';

data cars2;

  set cars;

  if 8 <=_n_ <= 31 or 47<=_N_ <=70;

ods escapechar='^';

proc report data=cars2 nowd  missing spanrows out=x;

  column origin make model type ("^S={&bb} Pricing" msrp invoice ) ;

  define origin/order noprint;

  define make/order STYLE={CELLWIDTH=3cm just=c} '\ql Make of the car'  style(header)={&bb};;

  define model/display  STYLE={CELLWIDTH=5cm } style(header)={&bb};;;

  break after origin/page ;

  define type/style(header)={&bb};;;

  define msrp/style(header)={&bb};;;

  define invoice/style(header)={&bb};;;

  compute before make;

      line @1 ' ';

  endcomp;

  /*

  compute after make;

  

      _compute_text = ' ';

      if  ?????  then len = 0;

      else len = 20;

      line _compute_text $varying. len;

  endcomp;

*/

  compute before _page_/style={font= ( "Arial", 9pt,bold)};

      line @1 'Origin:' origin $30.;

  endcomp;

run;

ods tagsets.rtf close;

:

Frequent Contributor
Posts: 108

Re: skipline in proc report for tagsets.RTF report

Hi ,
I see there are 300 views but no answer to you question.Here is some suggestion to help you to get answers .
Only give the specific codes for your problem .May be you can create an example code which will help us to understand and do the experiment on it .
Dont write your entire business problem .
and then hope for the best ..
SAS Super FREQ
Posts: 8,742

Re: skipline in proc report for tagsets.RTF report

Hi:
I know there have been previous posts about how to output blank lines conditionally to mimic the SKIP option in the LISTING destination.

But even searching with Google would have brought you to this paper by Allison Booth
https://support.sas.com/resources/papers/proceedings11/246-2011.pdf -- see pages 14 and 15.

The search string I used in Google was:
site: support.sas.com skip line REPORT conditionally

cynthia
Ask a Question
Discussion stats
  • 2 replies
  • 707 views
  • 0 likes
  • 3 in conversation