JavaScript Error in Pentaho - Cannot call method “toUpperCase” of null
问题 // Sets all the letters as uppercase var str = ae_a_asset_e$manufacture_code.toUpperCase(); var str2 = ae_a_asset_e$serial_no.toUpperCase(); var str3 = ae_a_asset_e$manu_part_number.toUpperCase(); var str4 = ae_a_asset_e$region_code.toUpperCase(); var str5 = ae_a_asset_e$fac_id.toUpperCase(); Any idea how to fix this? I would think there would have to be a way to say if value = null then don't worry about it. 回答1: First you have to think whether it is correct that some values are null or not,