The SAS Output Delivery System and reporting techniques

Adding callouts in proc report in ods pdf

Reply
Occasional Contributor
Posts: 19

Adding callouts in proc report in ods pdf

Hi,

I wanted to have a callout on a particular row which is being displayed in a proc report with ods pdf. Is this possible in SAS? The row for which the callout needs to be added is fixed.

Let me know if my question makes sense.

Thanks in Advance!

Pramod

Super User
Posts: 9,691

Adding callouts in proc report in ods pdf

What do you mean 'callout' ?

You'd better post some sample data and the report you want to look like.That would be more helpful.

Ksharp

SAS Super FREQ
Posts: 8,745

Re: Adding callouts in proc report in ods pdf

Hi:

  One thing I think that you might mean by a "callout" is something called a flyover or popup box. Personally, I don't like the way that the flyover looks in ODS PDF (looks like a little "Post-It" sticky note on a cell) -- the code below illustrates the difference between flyover on a row versus flyover on a cell.

  In the PDF standard, a "callout" is defined as (http://pdf.editme.com/pdfua-32000-callout ) "This tag is applied to text or content that is extracted from other text or content and given significant emphasis (usually via visual or typographic means)." So if the goal is to merely add "significant emphasis", then the code below illustrates that as well, if you compare the bold style added to the row for Alfred versus the bold, italic, red that is applied to the row for Barbara or the yellow background applied to the row for William.

cynthia

ods pdf file='c:\temp\flyover.pdf';

  

proc report data=sashelp.class nowd;

  column name age sex height weight;

  define name / order;

  define age /display;

  define sex / display;

  define height / display;

  define weight / display;

  compute name;

    if name = 'Janet' then do;

       call define (_row_,'style','style={flyover="Valedictorian"}');

    end;

    else if name = 'Robert' then do;

       call define (_col_,'style','style={flyover="Basketball Star"}');

    end;

    else if name = 'Alfred' then do;

       call define (_row_,'style','style={font_weight=bold}');

    end;

    else if name = 'Barbara' then do;

       call define (_row_,'style','style={font_weight=bold font_style=italic color=red}');

    end;

    else if name = 'William' then do;

       call define (_row_,'style','style={background=yellow}');

    end;

  endcomp;

run;

    

ods pdf close;

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