11-01-2013 09:12 AM
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?
ps - this is the curse of Excel...
11-01-2013 10:19 AM
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).
11-01-2013 12:12 PM
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.
11-01-2013 03:25 PM
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.