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?
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.
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.
Perfect! Thank you!!
Hello,
I was about to write the same answer as @FreelanceReinh .
Just wanted to add this:
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 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.