BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
woshibug
Fluorite | Level 6

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.

 

 

 

page.pngcellspace.pngcell.png

1 ACCEPTED SOLUTION

Accepted Solutions
japelin
Rhodochrosite | Level 12

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.

View solution in original post

19 REPLIES 19
japelin
Rhodochrosite | Level 12

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.

 

2021-03-30_11h10_57.png
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.

woshibug
Fluorite | Level 6
yes,you also find this problem,but we both don't know the reason why there will be a empty area between the end of the cell and the table.but,a little difference with your screenshot ,your new line character is in the table cell and my new line character is outside of table.you can see the first screenshot of mine,just the page header "Page 1 of 1" has the empty area and the cell in the table below is aligned rightly.so please continue helping me with this project.thanks
japelin
Rhodochrosite | Level 12

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?

 

woshibug
Fluorite | Level 6
I open it in Word and change it to a CENTER position,because it already in left position,then I change it to a left position,it will be return to the original position and the area also exist.it change nothing.
woshibug
Fluorite | Level 6
oh,yes,you are right. I tryed again. sorry ,I make a mistake,you tell me to change to left and I change it to right.
woshibug
Fluorite | Level 6
so,my problem seems don‘t be associated with the line break characters.it seems be associated with the cell width in the title statement is not enough to the width as others cell whith has the attribute "\cellx14400". when use proc report ,it cause the situation automatically, some "\cellx14350" some'\cellx14398' almost mainly is "\cellx14400".
japelin
Rhodochrosite | Level 12

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?

 

woshibug
Fluorite | Level 6
I know.but why proc report cause their difference.I dont know how to control it in title and footnote
japelin
Rhodochrosite | Level 12

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).

 

 

woshibug
Fluorite | Level 6
I just want the width in title statement in rtf can in right position and has no area exist.thanks you a lot
japelin
Rhodochrosite | Level 12

"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.

woshibug
Fluorite | Level 6
When I change the cellx14350 to cellx14400 then the inviolable area will be eliminated.
japelin
Rhodochrosite | Level 12

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?

woshibug
Fluorite | Level 6
OK,I can attach it as soon as possible.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 19 replies
  • 2173 views
  • 0 likes
  • 3 in conversation