01-05-2016 04:10 AM
basically i need a generic macro when called upon to create a report in pdf,rtf,excel & the macro has these parameters--->
how do i further build my code according to my question?
input ID var1 var2 var3 var4;
1 6 4 4 5
6 5 4 5 5
3 7 9 5 9
7 9 4 8 6
ods pdf file='/folders/myfolders/v.pdf';
proc print data=work.test;
ods pdf close;
%macro reportgen(indsn=,varlist=, report_type=, title1=, footnote=, report_location=);
%local i nextword;
%let dsid =%sysfunc(open(&indsn));
%do i=1 %to %sysfunc(countw(&varlist));
%let nextword = %scan(&varlist, &i);
%macro reportgen(indsn=work.test,varlist=var1 var2 var4,report_type=,title1=,footnote=,report_location);
01-05-2016 07:40 AM
I see you have already received several replies to a similar post in the SAS Procedures forum. While the audience in this ODS/Reporting board might have a few different folks, most of the experts participate in all of the SAS programming related areas on the community.
The most helpful responses come when you can share what you've tried and which concepts/syntax you find the most challenging. The community members are eager to help you to learn, but they don't want to feel treated as contract programmers.
If you want to learn/practice programming, may I suggest that you try the resources in SAS Analytics U? Despite the name, the resources there are free to any learner, not just those enrolled in university.
Manager, SAS Online Communities