BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi
I am generating reports through proc report and generating output in SAS Report format(.srx).
I am able to generate some accross reports in the above format but there are some accross reports which has two to three levels of hierarchy where EG is not generating the above format and giving me
****************************************************************
Error:Name is not unique.
****************************************************************
But at the same time generating other outputs like HTML,etc
Kindly help me out.
6 REPLIES 6
deleted_user
Not applicable
Need to see some representative code for the Proc Report.
Cynthia_sas
SAS Super FREQ
Hi:
One challenge with PROC REPORT and ACROSS variables is that if you have any COMPUTE blocks where you are computing some value for the ACROSS variable, you may need to use absolute column names (_C1_, _C2_, _C3_, etc) instead of the variable name. few examples of using absolute column names can be found on pages 82-84 of this document:
http://support.sas.com/documentation/onlinedoc/v82/techreport_p258.pdf

Also, SAS Report XML format is intended for use with Web Report Studio, primarily -- there's a chance that the PROC REPORT output is incompatible with SASReport XML (.srx) -- for example, if you are using LINE statements -- SASReport XML will not render LINE statement output created by PROC REPORT.

For more help with absolute column names and the ACROSS usage, you might wish to consult the PROC REPORT documentation or study these Tech Support notes:
http://support.sas.com/kb/10/710.html
http://support.sas.com/kb/23/978.html
This last note shows how to programatically figure out the number of absolute columns there would be ACROSS your report. If you have multiple hierarchies, then you would have to know how many possible combinations or nestings were going to result from your data -- so you could get the column names correct.

cynthia
deleted_user
Not applicable
Thanks for the reply.
I am able to generate SAS report through proc report but in my report I am calculating a row on run time using Rbreak which is wrongly displaying in SAS report but displaying in HTML report.

Piece of code

compute dummy;
if _BREAK_=UPCASE(_RBREAK_) then do;
/*in this i do some calculation by assigning some values.*/
_C5_=_c4_/_c3_;
.........................
end;
endcomp;

Kindly give me some solution for this.
Cynthia_sas
SAS Super FREQ
Hi:
_BREAK_ is a character variable. Let's say you are testing whether the BREAK statement was from the variable JobCode, then your IF statement might be:
IF upcase(_BREAK_) = 'JOBCODE';


Similarly, when you test for the RBREAK, you would test
IF _BREAK_ = '_RBREAK_';


As far as I know the string '_RBREAK_ is always uppercase. But since it's a character string, the string must be in quotes in your IF statement.

cynthia
deleted_user
Not applicable
Sorry I had written wrong syntax in the message but i have written same syntax which you mentioned in the reply then also the calculation which i do through the if _break_ statement, doesnt work while displaying SAS report but works in HTML format.
Any reason behind this or any solution for this.
Cynthia_sas
SAS Super FREQ
Hi:
As I said, I am only aware that PROC REPORT programs with LINE statements do not render correctly with SASReport XML -- but will render correctly when generated as HTML, RTF and PDF.

Perhaps you've stumbled on another instance where SASReport XML does not render something that works in other destinations. This is an issue you need to raise with Tech Support.

If you are generating content that is intended to be viewed in SAS Web Report Studio, then Tech Support can work with you and this particular code to find out what the problem is. If you are NOT generating content for Web Report Studio, then perhaps it would be better for you to stick with one of the destinations that works -- such as HTML, RTF or PDF.

cynthia

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 907 views
  • 0 likes
  • 2 in conversation