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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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.

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
  • 3 replies
  • 985 views
  • 1 like
  • 3 in conversation