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: Call for Content

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!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 3163 views
  • 1 like
  • 4 in conversation