07-25-2016 12:55 PM
I have created a summary report by Proc Report which should have following columns
Probability, Nbr_of_Optys, Total_Media_Value & Tot_Forecast which is computed by the product of probability & Total_Media_Value.
I have written this Syntex.
proc report data = Work.Olympicscs1 headline;
column Probability Stage (n) Tot_Budget Tot_Forecast;
where Probability > 0;
define Probability/group Descending 'Probability';
define Stage/group noprint;
define n / format = comma6. 'Nbr_of_Optys';
define Total_Media_Value/analysis format = dollar25. 'Tot_Budget';
define Tot_Forecast/computed format = dollar25.;
Tot_Forecast = (Tot_Budget.sum*Probability)/100;
rbreak after/summarize ol ul skip;
i am not getting the summarized values are not generated after rbreak for computed variable while running proc report in base sas .
07-25-2016 03:30 PM
Please provide example data in the form of a data step. This link will show how to create a data step from you dataset.
Also it often helps to show the log of the code submitted.
07-25-2016 04:41 PM
Is this related to either of your previous posts?
It is very helpful for you to post data with EVERY question instead of making someone go back and find your previous posts or figure out from the 3 different code examples you've posted, which data this new code example goes with.
It seems odd to me that you are using a group variable, Probability in an assignment statement. It is possible. But odd. Is your code entirely correct? I would have expected to see Stage,(n) not Stage (n) in the COLUMN statement. Other possibly incorrect things is that you have the variable Tot_Budget on the COLUMN statement, but you have Total_Media_Value in the DEFINE statement and then you refer to Tot_budget.sum in the assignment statement. In the COMPUTE block you need to refer to the item names in the COLUMN statement or to temporary variables. You do NOT refer to variable labels. Also, before you worry about the RBREAK not working or how to make it work, I'd recommend fixing the other problems in the code. I would expect there to be some warnings or errors in the SAS Log.
Also not sure about the OL UL SKIP -- those are ignored by all ODS destinations. So unless you are going to plain LISTING, I would not expect those to work.