- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I want to keep my indentation in proc report (as presented in data), but when it flows to a new line it misalign.
data:
desc
Number of participants
Cardiac disorders
Palpitations
Gastrointestinal disorders
Gastrointestinal polyp haemorrhage
code: define statement "desc"
proc report data = final1 nowd headline headskip missing split='@' style(header column)=[protectspecialchars=off];
%if &blind=Y %then %do;
columns ordx1 aebodsys total1 aedecod desc ;
define ordx1 / descending order order=internal noprint;
define aebodsys / order order=internal noprint;
define total1 / descending order order=internal noprint;
define aedecod / order order=internal noprint;
define desc /display style(header)=[just=left] style(column)=[asis=on cellwidth=2.5 in ] flow " ";
run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
The text-wrapping occurs in the first column? Did you try setting a large width for the first column?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Do you want the h to be aligned with G in the line above it in your yellow-coloured text?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@HitmonTran wrote:
that's correct. I updated the post to include sample data.
Not really "data".
Instructions here: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the </> icon or attached as text to show exactly what you have and that we can test code against.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
> I updated the post to include sample data.
Sample data would be data we can your code against.
This should always be provided when you ask for help if you want to help yourself.
In any case, I think that's the standard behaviour, and that's it.
Maybe try inserting padding characters in those labels that cause problems?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
How about trying these STYLE options in your column DEFINE statement?
style=[textalign=left cellwidth=2.5in tagattr="wrap:yes"]
You need to use TEXTALIGN=left to ensure there is no indenting and the TAGATTR setting WRAP to yes should set wrapping on in the column.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi:
This is a variation of a program I posted for someone else about indenting -- he did not have to worry about wrapping, but the fix is the same -- use the leftmargin= option, as shown below.
With a big enough cellwidth and leftmargin set at .25 in , there is NOT any wrapping.
However, with cellwidth of 1.5in and a leftmargin of .25, you can see that when the line does need to wrap, it wraps to the leftmargin value:
I already had the code set up for PDF using the same data as the previous example, so all I did was change the cellwidth and change the output file name and you can see that wrapping occurs as you wanted.
Cynthia
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Cynthia
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
As you can see in the example above, LEFTMARGIN= works for PDF. I don't think it works for HTML. Can't remember about RTF. Better to check in the doc or run a simple test using fake data such as I show in my example.
Cynthia