Build reports by using ODS to create HTML, PDF, RTF, Excel, text reports and more!

Create PDF Template Report using SAS

Reply
Occasional Contributor
Posts: 11

Create PDF Template Report using SAS

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.

Super User
Super User
Posts: 9,866

Re: Create PDF Template Report using SAS

Posted in reply to neha11_ch

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.

Super User
Posts: 24,027

Re: Create PDF Template Report using SAS

Posted in reply to neha11_ch

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

 

 

 

 

Occasional Contributor
Posts: 11

Re: Create PDF Template Report using SAS

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?

Super User
Posts: 24,027

Re: Create PDF Template Report using SAS

Posted in reply to neha11_ch

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

Frequent Contributor
Posts: 123

Re: Create PDF Template Report using SAS

Posted in reply to neha11_ch

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.

Ask a Question
Discussion stats
  • 5 replies
  • 194 views
  • 1 like
  • 4 in conversation