BookmarkSubscribeRSS Feed
neha11_ch
Fluorite | Level 6

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.

5 REPLIES 5
RW9
Diamond | Level 26 RW9
Diamond | Level 26

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.

Reeza
Super User

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

 

 

 

 

neha11_ch
Fluorite | Level 6

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?

Reeza
Super User

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

SuzanneDorinski
Lapis Lazuli | Level 10

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: 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
  • 5 replies
  • 3248 views
  • 1 like
  • 4 in conversation