- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am trying to create a report using ods pdf proc report and separating the dataset into separate tables on different pages using "BY Customer_Number". This part works fine. The problem I am having is that I would like extract the appropriate Customer_Number, Name and Address and placing these corresponding values in the title on each page that represent the appropriate data results. The dataset that I using for the report is similiar to the one below:
Customer_Number | Name | Address | Item_Number | Sale_Price |
1654 | Smith J. | 123 Lowe | 23127687 | 100.34 |
1654 | Smith J. | 123 Lowe | 32146745 | 54.35 |
1721 | Anderson B. | 34 Buffalo | 11450955 | 37.89 |
1922 | Rae S. | 6709 Mayfair | 78663456 | 115.78 |
I would like the pdf file to look like the following where the first row is actually the title:
1654 | Smith J. | 123 Lowe |
Item_Number | Sale_Price | |
23127687 | 100.34 | |
32146745 | 54.35 |
1721 | Anderson B. | 34 Buffalo |
Item_Number | Sale_Price | |
11450955 | 37.89 |
1922 | Rae S. | 6709 Mayfair |
Item_Number | Sale_Price | |
78663456 | 115.78 |
I wonder if someone can help...thanks...
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
cynthia
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Look up the use of #BYVAR and #BYVAL special syntax commands, which are ways for you to use BY variables in the TITLE statement on your reports from many different procedures (not just PROC REPORT). I believe there have been previous postings on the use of #BYVAR and #BYVAL and I know there are examples in the documentation. So it should be fairly easy to find.
cynthia
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
cynthia
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
data have; input (Customer_Number Name Address) (&$20.) Item_Number Sale_Price ; cards; 1654 Smith J. 123 Lowe 23127687 100.34 1654 Smith J. 123 Lowe 32146745 54.35 1721 Anderson B. 34 Buffalo 11450955 37.89 1922 Rae S. 6709 Mayfair 78663456 115.78 ; run; proc report data=have nowd noheader; column Customer_Number Name Address dummy Item_Number Sale_Price; define Customer_Number /order noprint; define Name /order noprint; define Address /order noprint; define dummy/computed ; compute dummy/char length=10; dummy=' '; endcomp; compute before Address ; line @1 Customer_Number $20. +4 Name $20. +4 Address $20. ; line @22 "Item_Number" +20 "Sale_Price"; endcomp; quit;