BookmarkSubscribeRSS Feed
jcbell
Obsidian | Level 7

Hello,

Curious if anyone can think of a creative way to pull off this requirement:

The requirement sounds simple - We have some lines of the report that require indenting and highlighting.  The problem is that the client would like the highlighting to also be indented.  Another words, we don't want the entire row highlighted.  See attachment.

The indenting is working fine and the highlights are working fine - but the background hightlighting affects the entire row of data (see proc_print_indent2).

I'm using a fairly straightforward compute statement:

                     call define(_col_,"Style", "Style=[foreground=black indent=20 just=l background = &_rpt_bkgrnd_2 BORDERLEFTWIDTH=1 BORDERLEFTCOLOR=black BORDERBOTTOMCOLOR=black BORDERBOTTOMWIDTH=1  BORDERTOPWIDTH=1 BORDERTOPCOLOR=black ]");

Any ideas on how I could fill-in the background to match the indent?

Thanks,

John

ps - this is the curse of Excel...


proc_print_indent.pngproc_print_indent2.png
4 REPLIES 4
Cynthia_sas
SAS Super FREQ

Hi:

  Just seeing your compute statement doesn't help anyone make a constructive suggestion. INDENT= does not work in all destinations. For some destinations, you might need to use LEFTMARGIN= instead of INDENT= (such as I show in example 1 in this paper (http://www2.sas.com/proceedings/forum2008/173-2008.pdf). See pages 9 and 17.In addition, there have been MANY previous posts about indenting, this is just one of them (https://communities.sas.com/message/134588#134588).

  Seeing ALL your code, including the ODS invocation statements is critical. Having some test data to work with would be good to have. Otherwise, without data and actual code, nobody can tweak the code without working to make up some fake data. I don't understand how your 2 screen shots are related. The headers are completely different and your #2 screen shot does show the whole row, like the first screen shot does. In addition, knowing what version of SAS you're using.

  If you cannot share your data, then work up some dummy data that you can post along with your full code. If you don't want to work up some dummy data, then if you open a track with Tech Support, they can look at all your code and keep your data confidential and they can help you figure out the best resolution (whether INDENT= and the row highlighting will work in your destination of interest).

cynthia

jcbell
Obsidian | Level 7

Cynthia,

As always - thanks for your time.  Looking back - a bit more detail is probably helpful.  I've attached a self-contained data/code snipet that reproduces the challenge.  The attached image with the yellow highlighting is the area of interest.  I've tried both INDENT and MARGIN as ways of indenting the text.  What I can't seem to figure out is a clean way of indenting the background color so that the entire line is not highlighted.  I've using PDF as the output for ODS. 

Let me know what you think.

Thanks,

John


proc_print_indent.png
Cynthia_sas
SAS Super FREQ

Hi,

I'm not exactly sure I understand this, but you might be on a snark hunt. You don't want to ONLY indent the text, you want to ALSO indent the background color in the cell??? As far as I know, the background column is applied to the WHOLE cell. INDENT= and LEFTMARGIN= will ONLY work on the text in the cell, not in the background.

You might want to check with Tech Support on this. I do not believe that any destination allows you to indent the background color inside the cell.

cynthia

jcbell
Obsidian | Level 7

Cynthia,

Thanks - I'm afraid you are right.  I tried using an image as well -

John

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 1761 views
  • 0 likes
  • 2 in conversation