hi,
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.;
compute Tot_Forecast;
Tot_Forecast = (Tot_Budget.sum*Probability)/100;
endcomp;
rbreak after/summarize ol ul skip;
run;
i am not getting the summarized values are not generated after rbreak for computed variable while running proc report in base sas .
??
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.
Hi:
Is this related to either of your previous posts?
https://communities.sas.com/t5/Base-SAS-Programming/proc-report/m-p/286895#M58939
https://communities.sas.com/t5/Base-SAS-Programming/PROC-Report/m-p/286843
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.
cynthia
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: