Hi,
I am struggling with ODS PDF where use of special symbols cause increase in height of row generated by proc report via ODS PDF.
E.g. see the third row in attached file. The output is generated via following code. Is there a way to ensure the height of the rows wherever the symbols are used to be same as the height of the other rows. Thanks in advance.
data x;
format x $200.;
x = 'Some text without special symbol'; output; output;
x = "Some text with special symbol Greater than or equal to - ^{unicode 2265}"; output;
x = 'Some text without special symbol'; output; output;
run;
ods escapechar="^";
options printerpath=pdf;
ods pdf file="d:\text_test.pdf" title="text" uniform notoc nobookmarkgen;
proc report data=x nowd;
column x;
define x/display 'text';
run;
ods pdf close;
SAS support has provided a workaround to fix this problem. It is provided below. Thanks for your prompt help.
data x;
format x $200.;
x = 'Some text without special symbol'; output; output;
x = "Some text with special symbol Greater than or equal to - ^S={font_face=Symbol}%sysfunc(byte(179))"; output;
x = "Some text without special symbol Greater than or equal to"; output;
x = 'Some text without special symbol'; output; output;
run;
You can manually control the height of all rows at once by modifying the cellheight option within the columns styles. This goes in the PROC REPORT statement.
proc report data=x nowd style(column)={cellheight=0.3in};
If you replace your proc report statement with that one, you should see all rows are now the same height. Feel free to play around with the number if you don't like the size I chose. It doesn't always do a great job at centering within the new heights, but all the boxes will be the same size.
Thanks Gina. This solution doesn't work when text is wrapping up in the cell, which is often the case.
I am looking for a solution where I set the value once somewhere in proc report, template or any other place to fix the line height. Data driven use of these symbols, superscript, subscript etc shouldn't mess up my report layout, pagination etc.
Thanks Cynthia. I have opened up a track with support.
SAS support has provided a workaround to fix this problem. It is provided below. Thanks for your prompt help.
data x;
format x $200.;
x = 'Some text without special symbol'; output; output;
x = "Some text with special symbol Greater than or equal to - ^S={font_face=Symbol}%sysfunc(byte(179))"; output;
x = "Some text without special symbol Greater than or equal to"; output;
x = 'Some text without special symbol'; output; output;
run;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.