05-23-2012 03:01 AM
I have a cumulative report to produce with ODS and output should be in PDF. Template is as attached. Need suggestions on achieving the same . Here, I have dimension name and Year of reporting(Proc label in ODS) . PDF pages should be based on dimension names.. So in Dimension table if I have 3 entries there should b 3 pages of report....Any help is really appreciated
05-23-2012 09:20 AM
Depending on the structure of your data and what you mean by "dimension" and "entry" in terms of a SAS dataset, such as a variable or an observation, many types of reports are possible.
When you create a report with SAS, you have some choices about how to create your report. First, is there an existing statistical procedure that will give you this report? If there is not an existing statistical procedure that will give you this report, then your choices are to create a SAS dataset with the appropriate variables and create your table accordingly.
Let me point out some challenges. SAS is not Excel. Excel will allow you to plop down data anywhere in a sheet. You can skip over 3 columns if you want, you can disappear the borders in a cell or the borders in a row with point and click techniques. But, when you use a reporting procedure, such as PROC REPORT or PROC TABULATE on a SAS dataset, if you have 10 columns on the report and 4 rows, then SAS and ODS would normally build you a table of 40 cells, arranged in 10 columns and 4 rows. If half the rows had missing values, then you would see either empty cells or cells with a missing (.) and all the interior table lines and borders would be visible. Your first challenge, depending on how comfortable you are with ODS and style overrides would be to figure out how to change the borders for the part of your table where you have no interior table lines (the diagonal bottom of the table). The green coloring for the two columns on the right is possible -- although SAS would not normally "skip" over a column for spacing, such as you show. between the two green columns. Is the information in the green columns derived from the data? Or is it coming from other data sets?
You can put the "dimension name" and year in a title, and you can left justify the title -- but putting part of the title in a box and part of the title not in a box will be problematic. You can easily underline part of a title. You could put a border around the whole title in some destinations, With PDF, the controls exist to underline (or overline, or strikethrough) part of a string.
What code have you tried? What is the structure of your data? Are your actual data values A1, B1, C1, etc, as you show in your screen shot? Do you already have the data and only need to show every observation on every report row, or do you need to pre-summarize your data, Or do you need for the procedure to summarize your data? When you say that you need a cumulative report, what variables are accumulating? When you say that every PDF "page" should be based on a dimension name, then how are you planning to generate a single "page"?? Using BY group processing? Using TABULATE's PAGE dimension or using PROC REPORT's PAGE option??
Without understanding more about your data, it is hard to make more concrete recommendations.