hi,everyone,when I use TITLE statement within Proc report,even I use ‘j=r’ the text will be on the right of then page,but will have a small margin between the edge and the text,the text "Page 1 of 1" in first screenshot has a small space between the true margin. I think it maybe caused by the CellPadding or CellSpacing in 2nd screenshot ,so I try the statement in proc template,but it didn't work. finally,I find it in RTF original code,it has difference with anothers,please see the 3rd screenshot attached.The text in TITLE statement has the attribution “\cellx14350” and text in FOOTNOTE statement is “\cellx14398”,but the main body in table has the attribution “\cellx14400”.I try to modify then to "\cellx14400" manually then the margin in text within TITLE statement and FOOTNOTE statement disappeared,but I don't know where to control it usu code.
I was completely wrong. I finally understand the problem you are talking about.
However, in my environment, the header cells are set to full width without any problem.
I tested it with the following simple code.
options nodate nonumber;
ods _all_ close;
ods rtf;
title j=c 'TITLE' j=r 'page 1 or 1';
proc report data=sashelp.class;
run;
ods rtf close;
Can you please test it in your environment with this?
If there is still no extra space, then it is most likely a problem with the program.
For example, per proc report, define statement, style specification, etc.
I tried it in the environment at hand, and it does look like a single byte space is inserted.
However, this is not a space, but an empty area between the end of the cell and the table.
This is a newly created document with a table inserted in the header.
These red boxes are the same. (I think the blue box is the part you are pointing out.)
Note that cellx-- is the width of the cell, so I guess it's not really relevant to this project.
Sorry, my border layout was not good.
The line break characters are "also" outside the table.
The image you posted certainly does not show the line breaks in the "Page 1 of 1" cell,
but if you open it in Word and change it to a left position, I think the line breaks will show up, can you try that?
cellx14400 represents a cell width of 14400px and cellx14398 represents a cell width of 14398px.
In the image you posted, there seems to be enough width, what is the problem?
I don't think this is a problem with the proc report, I think it is a problem with the Word or RTF specification.
What do you want to control?
Is it 14398px or 14400px?
I think this is a table that is created according to the output string.
If you want to control this, you may be able to do so using CELLWIDTH.
(untested).
"no area exists."
You should be able to achieve this with j=r.
When right-positioned (the blue box in the image I posted), it is not an empty area, but an inviolable ruled area.
I think that's just a change in the cell width, but nothing essential has changed.
If possible, could you please attach the rtf files before and after the change, just empty data?
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.