BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Reeza
Super User
I still think our comments are valid. You need to make a reproducible example we can work with. If you can't from your system, use SAS OnDemand for Academics, create an example and test it there. Once you have it working, you can apply it to your actual data. Otherwise, you can consider talking to a colleague or SAS tech support directly to get help, since you should be allowed to share the data with them.
amager
Obsidian | Level 7

HI, Voilà my proc report , I wonder why the datflag variable can be coloried and datflagN No.. something wrong here ?!


proc report data= data_dif  nowd out=work.test02
style(header) = [ background = $col_header. font_size= 10pt ];
column STUDY NAMING_CONVENTION_CHANGE DTER	DELIVERABLE_UNIT_CODE UNIT_AMOUNT Planned_delivery_date
STUDY_MILESTONES IRIS_COMMENT CRO_COMMENTS AGREEMENT_CRO_ON_ORDER EFFECTIVE_DELIVERY_DATE	
DELIVERED_AMOUNT STATUS	IRIS_ACCEPTATION KPI1_VOLUME KPI2_DELAY	KPI3_QUALITY QUALITY_DETAILS
DATE_OF_INVOICE	STADE_PGM1_PGM2	DELETED Record_Type datflag datflagn;

define	STUDY 					 /    style(header) = [ background =lightblue font_size= 10pt ] ;	
define 	NAMING_CONVENTION_CHANGE /    style(header) = [ background =lightblue font_size= 10pt ] ;	
define 	DTER 					 /    style(header) = [ background =lightblue font_size= 10pt ] ;	
define	DELIVERABLE_UNIT_CODE 	 /    style(header) = [ background =lightblue font_size= 10pt ] ;	
define	UNIT_AMOUNT				 /    style(header) = [ background =lightblue font_size= 10pt ] ;	
define	Planned_delivery_date	 /    style(header) = [ background =lightblue font_size= 10pt ] ;	
define	STUDY_MILESTONES		 /    style(header) = [ background =lightblue font_size= 10pt ] ;	
define	IRIS_COMMENT			 /    style(header) = [ background =lightblue font_size= 10pt ]  ;	
define	CRO_COMMENTS			 /    style(header) = [ background =lightgreen font_size= 10pt ] ;	
define	AGREEMENT_CRO_ON_ORDER	 /    style(header) = [ background =lightgreen font_size= 10pt ] ;	
define	EFFECTIVE_DELIVERY_DATE	 /    style(header) = [ background =lightgreen font_size= 10pt ] ;	
define	DELIVERED_AMOUNT		 /    style(header) = [ background =lightgreen font_size= 10pt ] ;	
define	STATUS					 /    style(header) = [ background =lightgreen font_size= 10pt ] ;	
define	IRIS_ACCEPTATION		 /    style(header) = [ background =lightblue font_size= 10pt ] ;	
define	KPI1_VOLUME				 /    style(header) = [ background =lightgreen font_size= 10pt ] ;	
define	KPI2_DELAY				 /    style(header) = [ background =lightgreen font_size= 10pt ] ;	
define	KPI3_QUALITY			 /    style(header) = [ background =lightblue font_size= 10pt ] ;	
define	QUALITY_DETAILS			 /    style(header) = [ background =lightblue font_size= 10pt ] ;	
define	DATE_OF_INVOICE			 /    style(header) = [ background =lightgreen font_size= 10pt ] ;	
define	STADE_PGM1_PGM2			 /    style(header) = [ background =lightgreen font_size= 10pt ] ;	
define	DELETED					 /    style(header) = [ background =lightblue font_size= 10pt ] ;	
define	Record_Type				 /    style(header) = [ background =red font_size= 10pt ] ;	

compute Record_Type; 
		if 	  Record_Type in  ("Manuel" "M" )   then call define(_row_,"style","style={background=Lightred}") ;
		if 	  Record_Type in  ("Automatique" "A")    then call define(_row_,"style","style={background=Lightblue}") ;
endcomp; 
 compute CRO_COMMENTS; 
	call define(_COL_,"style","style={background=lightgreen}"); 
endcomp;
compute AGREEMENT_CRO_ON_ORDER; 
	call define(_COL_,"style","style={background=lightgreen}"); 
endcomp;
compute EFFECTIVE_DELIVERY_DATE; 
 	call define(_COL_,"style","style={background=lightgreen}"); 
endcomp;
compute DELIVERED_AMOUNT; 
	call define(_COL_,"style","style={background=lightgreen}"); 
endcomp;
compute STATUS; 
	call define(_COL_,"style","style={background=lightgreen}"); 
endcomp;
compute KPI1_VOLUME; 
	call define(_COL_,"style","style={background=lightgreen}"); 
endcomp;
compute KPI2_DELAY; 
	call define(_COL_,"style","style={background=lightgreen}"); 
endcomp;
compute DATE_OF_INVOICE; 
	call define(_COL_,"style","style={background=lightgreen}"); 
endcomp;
compute STADE_PGM1_PGM2; 
	call define(_COL_,"style","style={background=lightgreen}"); 
endcomp;
compute datflagn; 
	 if index(datflagn,'UNIT_AMOUNT')  then  call define(UNIT_AMOUNT,"style","style={background=red}");
	 if index(datflagn,'PLANNED_DELIVERY_DATE')  then  call define(PLANNED_DELIVERY_DATE,"style","style={background=red}"); 
endcomp;
compute datflag; 
	 if index(datflag,'DTER')  				    then  call define("DTER","style","style={background=red}"); 
	 if index(datflag,'DELIVERABLE_UNIT_CODE')  then  call define("DELIVERABLE_UNIT_CODE","style","style={background=red}"); 
	 if index(datflag,'STUDY_MILESTONES')  		then  call define("STUDY_MILESTONES","style","style={background=red}"); 
	 if index(datflag,'IRIS_COMMENTS')  		then  call define("IRIS_COMMENTS","style","style={background=red}"); 
	 if index(datflag,'CRO_COMMENTS')  			then  call define("CRO_COMMENTS","style","style={background=red}"); 
	 if index(datflag,'AGREEMENT_CRO_ON_ORDER') then  call define("AGREEMENT_CRO_ON_ORDER","style","style={background=red}"); 
	 if index(datflag,'STATUS')  				then  call define("STATUS","style","style={background=red}"); 
	 if index(datflag,'IRIS_ACCEPTATION')  		then  call define("IRIS_ACCEPTATION","style","style={background=red}"); 
endcomp;


run;

Ready to join fellow brilliant minds for the SAS Hackathon?

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!
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
  • 16 replies
  • 3163 views
  • 9 likes
  • 5 in conversation