BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
chanduk
Obsidian | Level 7

Hi ,

 

Please see the attachment for Report screen shot file. I would like to create SAS Report using Proc Reports procedure.In this report screen shot file, how do we create different headers like  "Number of Beneficiary Cases" , "Case Type Initiated","Number of : " 

 

Please help on this .

1 ACCEPTED SOLUTION

Accepted Solutions
chanduk
Obsidian | Level 7
This example helped lot to me. Thank you very much.

View solution in original post

5 REPLIES 5
Cynthia_sas
SAS Super FREQ
Hi:
Usually, you would write extra lines like this at a break point using a COMPUTE block. But without any data or seeing the code that you've tried, it is hard to guess what the structure of the data is. How the data is structured will impact the code, as you've probably discovered. I assume you want either RTF or PDF output, but again, hard to guess since you did not show your code and ODS statements.

cynthia
chanduk
Obsidian | Level 7
Right now my sas app server is down.I have to write code for this.If it is
possible create sample data for the report showing in the attached file
previously.I am not aware of how to use compute block in proc report for
creating headers.Could you please create sample code for this.

Regards,
chandu

##- Please type your reply above this line. Simple formatting, no
attachments. -##
ballardw
Super User

Some of us don't like opening Microsoft format documents such as DOCX due to security concerns and others have such documents blocked by security.

 

PDF would be a better choice for showing text appearance.

 

As a silly question, do you have labels associated with any of the variables concerned?

Cynthia_sas
SAS Super FREQ

Hi:
  You can always make data using a DATA step program, with the DATALINES technique. For example, here is fake program to make some data for a grade report:

data newclass;
  length Name $40 Type $30;
  infile datalines dlm=',' dsd;
  input ID Name $ Type $ Grade Average Final $;
return;
datalines;
11,"Alex Andrews","Mid-Term Essay",95,93," "
22,"Barb Bascom","Final Exam",70,79,"B"
33,"Carl Clarke","Final Exam",94,92,"A"
33,"Carl Clarke","Group Project",90,92,"A"
44,"Dana Decker","Mid-Term Essay",93,90," "
55,"Edgar Elston","Final Exam",87,90,"A"
;
run;

 

  If you make some fake data that is in the same structure as your data and then post the code you've tried, people can work with data that resembles your actual data and make concrete suggestions based on the code you've started with. Otherwise, it is pointless to write code when the structure of the data for your question is unknown.The fake data that I might make might be completely different than the way your data looks and then the program would not be usable.

 

  The program will be different if the structure of data is different. The Above data for NEWCLASS has one row for every class deliverable for every student. It is possible to have more than one row for one student. In fact, it is likely that there will be more than one row per student. If the data was structured differently, then then program in the screen shot might need to be written differently.

 

  An example of using PROC REPORT with a COMPUTE block is shown below, with the PDF results. What code have you tried? There are a lot of previous forum postings on using COMPUTE blocks.
 
cynthia

 

example_report.png

chanduk
Obsidian | Level 7
This example helped lot to me. Thank you very much.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1395 views
  • 0 likes
  • 3 in conversation