Posted 20 June 2024, 8:33 am EST
I have a limited version of Active report to design and create a report using rpx template. One of the report requirements is to export to an Excel file. however, when the report is exported to the excel file, the column is a text, and I would like the column to be a number field so I can do other calculations. Is there a simple way to force the field to be a number field?
the report column are generated from the oracle database and using a datareader
I tried to use float.parse and still the exported values showed as a text not a number.
I would like to have a way to show the value as a number if there is a value otherwise, none in the excel cell. Please let me know if there is a way to handle this.
rpt.Fields[“AirDryWt”].Value = float.Parse(reader1[“AirDryWt”].ToString());
since it is a limited version I try to use below script I get an error. float.TryParse(inputString, out float tryParsedFloat); Console.WriteLine($"Using float.TryParse(): {tryParsedFloat}");