BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
jmextratall
Calcite | Level 5

I am trying to create report output using proc report. For one of my variables, I want the column header to read "FPR (Non-Fraud/Fraud)" to show how it was derived. My define statement looks like this:

 

define FPR /Center display "FPR/(Non-Fraud/Fraud)";

However, both '/' in the quotes creates a line return instead of displaying the second / in between Non-Fraud and Fraud. 

 

How can I get that second / to display in my output report column header?

1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

Hi @jmextratall,

 

You can specify a different split character in the PROC REPORT statement using the SPLIT= option, e.g.

proc report data=... split='|';

and then use that in place of the first slash in the column header.

View solution in original post

3 REPLIES 3
FreelanceReinh
Jade | Level 19

Hi @jmextratall,

 

You can specify a different split character in the PROC REPORT statement using the SPLIT= option, e.g.

proc report data=... split='|';

and then use that in place of the first slash in the column header.

sbxkoenk
SAS Super FREQ

Hello,

I was about to write the same answer as @FreelanceReinh .

 

Just wanted to add this:

@jmextratall 

It's always better to include a bit of (working) code in your question using a SASHELP dataset that everybody has available.

People can then copy/paste in their editor, submit and correct.

The code entered should not even make sense, something like:

proc report data=sashelp.class SPLIT='#';
   column name sex age height weight;
   define sex / center display "FPR/(Non-Fraud/Fraud)";
run;
QUIT;

will do.

 

Cheers,

Koen

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1346 views
  • 1 like
  • 3 in conversation