Hello,
Using CR-XI on a SQL database.
I need to dsplay the team with the highest score. I am unable to use the group sort expert because of the way the score is generate so i have used the reset/evaluate/display method, and it works (for the result).
The problem i have is that i need to display the team name that is associated with the highest score.
-----------------------------------------
Here are my current formula's:
-reset-
whileprintingrecords;
global numbervar nps_site:= -999;
-evaluate-
whileprintingrecords;
global numbervar nps_site;
if {@nps_site} > nps_site then nps_site:= {@nps_site} else nps_site
-display-
whileprintingrecords;
global numbervar nps_site;
nps_site
-----------------------------------------
For the team name, i tried doing this, but i keep getting blank results:
-reset-
whileprintingrecords;
global stringvar site_name:= ''
-evaluate-
whileprintingrecords;
global numbervar nps_site;
global stringvar site_name;
if {@nps_site} > nps_site then site_name:= GroupName ({@site}) else site_name
-display-
whileprintingrecords;
global stringvar site_name;
site_name
Whats the best way to get the team name??
Using CR-XI on a SQL database.
I need to dsplay the team with the highest score. I am unable to use the group sort expert because of the way the score is generate so i have used the reset/evaluate/display method, and it works (for the result).
The problem i have is that i need to display the team name that is associated with the highest score.
-----------------------------------------
Here are my current formula's:
-reset-
whileprintingrecords;
global numbervar nps_site:= -999;
-evaluate-
whileprintingrecords;
global numbervar nps_site;
if {@nps_site} > nps_site then nps_site:= {@nps_site} else nps_site
-display-
whileprintingrecords;
global numbervar nps_site;
nps_site
-----------------------------------------
For the team name, i tried doing this, but i keep getting blank results:
-reset-
whileprintingrecords;
global stringvar site_name:= ''
-evaluate-
whileprintingrecords;
global numbervar nps_site;
global stringvar site_name;
if {@nps_site} > nps_site then site_name:= GroupName ({@site}) else site_name
-display-
whileprintingrecords;
global stringvar site_name;
site_name
Whats the best way to get the team name??