I am using ODS pdf and trying to eliminate automatic margin of about .5 in created on the left and right of the table frame in addition to the margin defined for the body. This happens when the column width is specified in inches. Whereas when cellwidth is specified in percentage, such margins don't appear.
Please help.
Thanks in advance.
Vineet
Hi:
Again, you have not provided any code or any data or any examples of what you mean when you say "automatic margin of about .5 in created on the left and right of the table frame in addition to the margin defined for the body." I am having a hard time envisioning what you are describing. The only "automatic" margin that I know of is what PDF uses, based on your SAS System options. And, even though you say: "This happens when the column width is specified in inches. Whereas when cellwidth is specified in percentage, such margins don't appear." It is nearly impossible to guess what your code looks like to come up with an example.
I already commented in a previous track on the dangers of trying to "over-control" the widths in PDF. In my previous example, there is NO automatic margin.
If I modify the program which I posted for your previous example and change the width to inches, I do not observe an "automatic" margin. Clearly, if you are seeing something other than this when you submit the changed code, then this is an issue to work on with Tech Support. They can look at ALL your code and your data and make recommendations based on the actual code and actual data that you are using.
cynthia
Hi Cynthia,
Thanks for answering all such questions over the years. I had been using ODS RTF for all my reports and graphs over the years. Now I am converting my macros to ODS PDF due to some advantages that ods pdf have over rtf. I am running into several challenges, but finding solutions after a lot of hit and trial and after a lot of googling.
It is hard for me to copy code, since it is so much macrotized. I was hoping you are already aware of the issue and its fix. In this case I have already modified my code to use percentages rather than inches. There is no need to follow up in this question now.
Regards,
Vineet
@vineet7878_gmail_com wrote:
Hi Cynthia,
It is hard for me to copy code, since it is so much macrotized. I was hoping you are already aware of the issue and its fix. In this case I have already modified my code to use percentages rather than inches. There is no need to follow up in this question now.
Macro code Rule 1: Have non-macro code working before using macro.
Because PDF and RTF are different file formats if I have used any RTF specific options I would not expect to blindly transfer anything to PDF and would go back to the working non-macro version to use for development. That should not require posting so much macro code: A Datastep to generate a small example data set and the code to generate the table.
Hi Cynthia,
I tested the problem in simplified code and wasn't able to reproduce the issue. Probably the issue occurs due to conflic of options in proc report and proc template for ODS pdf. I will leave it here.
Thanks,
Vineet
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.