Ratatatech
Technical User
Hello,
The company I work for recently lost its crystal reporting guy and I have been given his responsibilities with no training and no experience. I plan to pick up a book and learn traditionally but I have an urgent issue and I was hoping someone would be willing to help. I pre-apologize if I'm way off on anything, but I think I’m on the right path.
The basic issue is generally this report will display a number with a unit type (ex. 7% or 2.1g). However, occasionally the value is going to “None detected” or “NR”. When that happens I want the report to omit the unit type. (I don’t want it to say “NR%”) This report already does this for “None Detect”. I need to amend it to accomplish this for NR as well. I think I found the code that relates to this and it’s probably super simple for someone who knows this stuff but I’m a network guy not a programmer and have never used crystal reports before. This is done in Crystal Reports 2008 and the code is below. Any help, guidance, or info would be greatly appreciated. Thank you.
//Changed on 24May11 from {RESULT_SPEC.REPORTED_VALUE} to {RESULT.FORMATTED_ENTRY} to accommodate
//List entry results i.e No_Growth --> No Growth
//added on 06Jun2011
//if {TEST.ANALYSIS} = "RELATED_SUBSTANCES" and {RESULT.FORMATTED_ENTRY} = "0.00" then "None Detected"
//added on 15Aug2011
//if {@Result_TestList} = true and
// {RESULT.FORMATTED_ENTRY} = "0.0"
// or {RESULT.FORMATTED_ENTRY} = "0.00"
// or {RESULT.FORMATTED_ENTRY} = "0.000"
// then "None Detected"
if {RESULT.FORMATTED_ENTRY} = "None Detected" then {RESULT.FORMATTED_ENTRY}
//New code ends
else if {PRODUCT_SPEC.RULE_TYPE} = "T" and {RESULT.IN_SPEC} = "T"
then {RESULT.FORMATTED_ENTRY}
else if {PRODUCT_SPEC.RULE_TYPE} = "T" and {RESULT.IN_SPEC} = "F"
then {RESULT.FORMATTED_ENTRY} & "***"
else if {PRODUCT_SPEC.RULE_TYPE} = "N" and {PRODUCT_SPEC.UNITS} = "None"
and {RESULT.IN_SPEC} = "T" then {RESULT.FORMATTED_ENTRY}
else if {PRODUCT_SPEC.RULE_TYPE} = "N" and {PRODUCT_SPEC.UNITS} = "None"
and {RESULT.IN_SPEC} = "F" then {RESULT.FORMATTED_ENTRY} & "***"
else if {PRODUCT_SPEC.RULE_TYPE} = "N" and {PRODUCT_SPEC.UNITS} <> "None"
and {RESULT.IN_SPEC} = "T" then {RESULT.FORMATTED_ENTRY} & " " & {UNITS.DISPLAY_STRING}
else if {PRODUCT_SPEC.RULE_TYPE} = "N" and {PRODUCT_SPEC.UNITS} <> "None"
and {RESULT.IN_SPEC} = "F" then {RESULT.FORMATTED_ENTRY} & " " & {UNITS.DISPLAY_STRING} & "***"
//
else if {PRODUCT_SPEC.RULE_TYPE} = "F" and {PRODUCT_SPEC.UNITS} = "None"
and {RESULT.IN_SPEC} = "T" then {RESULT.FORMATTED_ENTRY}
else if {PRODUCT_SPEC.RULE_TYPE} = "F" and {PRODUCT_SPEC.UNITS} = "None"
and {RESULT.IN_SPEC} = "F" then {RESULT.FORMATTED_ENTRY} & "***"
else if {PRODUCT_SPEC.RULE_TYPE} = "F" and {PRODUCT_SPEC.UNITS} <> "None"
and {RESULT.IN_SPEC} = "T" then {RESULT_SPEC.REPORTED_VALUE} & " " & {UNITS.DISPLAY_STRING}
else if {PRODUCT_SPEC.RULE_TYPE} = "F" and {PRODUCT_SPEC.UNITS} <> "None"
and {RESULT.IN_SPEC} = "F" then {RESULT_SPEC.REPORTED_VALUE} & " " & {UNITS.DISPLAY_STRING} & "***"
The company I work for recently lost its crystal reporting guy and I have been given his responsibilities with no training and no experience. I plan to pick up a book and learn traditionally but I have an urgent issue and I was hoping someone would be willing to help. I pre-apologize if I'm way off on anything, but I think I’m on the right path.
The basic issue is generally this report will display a number with a unit type (ex. 7% or 2.1g). However, occasionally the value is going to “None detected” or “NR”. When that happens I want the report to omit the unit type. (I don’t want it to say “NR%”) This report already does this for “None Detect”. I need to amend it to accomplish this for NR as well. I think I found the code that relates to this and it’s probably super simple for someone who knows this stuff but I’m a network guy not a programmer and have never used crystal reports before. This is done in Crystal Reports 2008 and the code is below. Any help, guidance, or info would be greatly appreciated. Thank you.
//Changed on 24May11 from {RESULT_SPEC.REPORTED_VALUE} to {RESULT.FORMATTED_ENTRY} to accommodate
//List entry results i.e No_Growth --> No Growth
//added on 06Jun2011
//if {TEST.ANALYSIS} = "RELATED_SUBSTANCES" and {RESULT.FORMATTED_ENTRY} = "0.00" then "None Detected"
//added on 15Aug2011
//if {@Result_TestList} = true and
// {RESULT.FORMATTED_ENTRY} = "0.0"
// or {RESULT.FORMATTED_ENTRY} = "0.00"
// or {RESULT.FORMATTED_ENTRY} = "0.000"
// then "None Detected"
if {RESULT.FORMATTED_ENTRY} = "None Detected" then {RESULT.FORMATTED_ENTRY}
//New code ends
else if {PRODUCT_SPEC.RULE_TYPE} = "T" and {RESULT.IN_SPEC} = "T"
then {RESULT.FORMATTED_ENTRY}
else if {PRODUCT_SPEC.RULE_TYPE} = "T" and {RESULT.IN_SPEC} = "F"
then {RESULT.FORMATTED_ENTRY} & "***"
else if {PRODUCT_SPEC.RULE_TYPE} = "N" and {PRODUCT_SPEC.UNITS} = "None"
and {RESULT.IN_SPEC} = "T" then {RESULT.FORMATTED_ENTRY}
else if {PRODUCT_SPEC.RULE_TYPE} = "N" and {PRODUCT_SPEC.UNITS} = "None"
and {RESULT.IN_SPEC} = "F" then {RESULT.FORMATTED_ENTRY} & "***"
else if {PRODUCT_SPEC.RULE_TYPE} = "N" and {PRODUCT_SPEC.UNITS} <> "None"
and {RESULT.IN_SPEC} = "T" then {RESULT.FORMATTED_ENTRY} & " " & {UNITS.DISPLAY_STRING}
else if {PRODUCT_SPEC.RULE_TYPE} = "N" and {PRODUCT_SPEC.UNITS} <> "None"
and {RESULT.IN_SPEC} = "F" then {RESULT.FORMATTED_ENTRY} & " " & {UNITS.DISPLAY_STRING} & "***"
//
else if {PRODUCT_SPEC.RULE_TYPE} = "F" and {PRODUCT_SPEC.UNITS} = "None"
and {RESULT.IN_SPEC} = "T" then {RESULT.FORMATTED_ENTRY}
else if {PRODUCT_SPEC.RULE_TYPE} = "F" and {PRODUCT_SPEC.UNITS} = "None"
and {RESULT.IN_SPEC} = "F" then {RESULT.FORMATTED_ENTRY} & "***"
else if {PRODUCT_SPEC.RULE_TYPE} = "F" and {PRODUCT_SPEC.UNITS} <> "None"
and {RESULT.IN_SPEC} = "T" then {RESULT_SPEC.REPORTED_VALUE} & " " & {UNITS.DISPLAY_STRING}
else if {PRODUCT_SPEC.RULE_TYPE} = "F" and {PRODUCT_SPEC.UNITS} <> "None"
and {RESULT.IN_SPEC} = "F" then {RESULT_SPEC.REPORTED_VALUE} & " " & {UNITS.DISPLAY_STRING} & "***"