BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hello Everyone,

I am trying to create a pdf report based on the comparison result of same dataset created at different dates. Likewise, I would like to add the comparison result for 10 or more datasets in the same report. Kind of one after the other datasets. I tried this using SAS Macro but it overrides the previous result for every dataset(macro value entered) and only the last dataset result is displayed. How can this be achieved? Any suggestions or idea would be appreciated.

Thanks,
SASque
6 REPLIES 6
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Share what code you attempted to use with a macro - possilby you need to move some portion of your SAS program (ODS stmt) to be outside your macro so that it is opened once. What type of report (HTML, RTF, PDF?) And suggest you share what SAS version you are running, as well.

Scott Barry
SBBWorks, Inc.
deleted_user
Not applicable
It is in PDF format. SAS 9.1.3.
Here is the code:

%macro strtbl(tbl=);
ods listing close;
ods pdf style=printer FILE="c:\strreport.pdf";
proc compare base=refdata.&tbl compare=trdata.&tbl novalues;
run;
proc contents data=trdata.&tbl nods order=varnum;
title;
run;
ods pdf close;
ods listing;

%mend strtbl;

%strtbl(tbl=AE);
%strtbl(tbl=BHEPL);
%strtbl(tbl=CMEDS);
%strtbl(tbl=DEMO);.......and so on...
deleted_user
Not applicable
You are right....somehow I didn't look at the options...it works....Thanks for you help.

One more question: Is it possible to create a coverpage for this report just with a "logo", tile of the report and project #. only and this shld be displayed only on the first page. How can it be done?
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Yes, it's possible. Look at ODS LAYOUT - with some enhancements available in SAS 9.2. You will find prior posts in the forum archives, as well as at the SAS support site.

Scott Barry
SBBWorks, Inc.

Suggested Google advanced search argument, this topic/post:

ods pdf cover page site:sas.com
deleted_user
Not applicable
One more question related to Proc Compare report. Is it possible to suppress variables summary and observations summary and display only Dataset Summary?? If so, how???

Also how can I display an image or a picture right at the center of the first page of the report not on any other page??
Any help or thought would be appreciated.

Thanks,
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Suggest you review the PROC COMPARE documentation for report generation options. Consider using ODS with TEXT= keyword for generating your image.

Scott Barry
SBBWorks, Inc.

http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/a000146741.htm

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 6 replies
  • 911 views
  • 0 likes
  • 2 in conversation