Hi,
I need to define pdf templates in SAS. Data will be populated in these templates from source database.
I need to understand, can we create complex pdf template in SAS. If yes, how do we do this?
I have attached sample pdf template report.
So are you saying you need that exact form, but with data added? If so your life may be quite complicated in SAS. Sure you can create a report which looks like that, you would need the barcode as a picture, set all the fonts and style in a proc template code, then write a proc report on your data which outputs it using the template, with the titles/footnotes and picture of barcode, and sets borders and fonts within the data to look like that. I suppose it depends on your process, if its generated from SAS, with a fair bit of work you could get that exact output - though the barcode I don't really know if that changes each time, I think you would need something to generate that as a picture for each one. So yes, you can get most of that report from a template + proc report.
Are you trying to
1) Replicate this report in SAS by fully creating the PDF file
2) Trying to push data into the Adobe PDF template that will already have the logo and bar code and some header information?
I'm about 99% sure you can do #1, but I'm hesitant to say option 2 is possible. From what I know SAS does not interface with Adobe like that but there are toolkits out there that do, and since it's an XML file required in the end you can probably use SAS to create the XML required.
It also seems like R has a package to automate filling of fields (staplr).
I want to opt for option 1. recreate the pdf report in SAS completely. Could you please guide me how do i achieve this using SAS coding?
The Report Writing Interface (RWI) is probably one method.
Using ODS PDF and PROC REPORT is another.
This isn't an easy problem, but its doable.
http://www2.sas.com/proceedings/forum2008/173-2008.pdf
Logos, images and backgrounds
https://support.sas.com/resources/papers/proceedings12/260-2012.pdf
2 other papers to look at about the Report Writing Interface, in addition to the papers that Reeza mentioned.
http://support.sas.com/resources/papers/proceedings14/1689-2014.pdf
http://support.sas.com/resources/papers/proceedings16/2240-2016.pdf
If a customer orders multiple items, you will need to keep track of how many can fit on a page.
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.