I've got a 95th percentile report I run (same as the standard one with a where statement thrown in at the end) that returns exponential numbers in the report. How can I format the numbers to be regular numbers on the reports when viewed on the web page? I can do it in the Report Writer preview using the field formating (just changing it to: Format: Numerical Data) but this doesn't translate into a change on the website output.
The SQL:
DECLARE @StartDate DateTime DECLARE @EndDate DateTime
SET @StartDate = CAST (DATEDIFF(d, 0, DATEADD(d, 1 - day(getdate()), getdate()))as datetime) SET @EndDate = GetDate()
SELECT Interfaces.InterfaceId, Nodes.Caption AS NodeName, Nodes.VendorIcon AS Vendor_Icon, Interfaces.Caption AS Interface_Caption, Interfaces.InterfaceIcon AS Interface_Icon, Maxbps_In95, Maxbps_Out95, Maxbps_95 FROM Nodes INNER JOIN Interfaces ON (Nodes.NodeID = Interfaces.NodeID) --------------------- INNER JOIN ( SELECT InterfaceID, dbo.GetInBps95th(AA.InterfaceID, @StartDate, @EndDate) AS Maxbps_In95 FROM ( SELECT DISTINCT A.InterfaceID FROM dbo.InterfaceTraffic A WHERE A.DateTime >= @StartDate AND A.DateTime <= @EndDate ) AS AA ) as RESULT_IN ON (Interfaces.InterfaceID = RESULT_IN.InterfaceID) --------------------- INNER JOIN ( SELECT InterfaceID, dbo.GetOutBps95th(AA.InterfaceID, @StartDate, @EndDate) AS Maxbps_Out95 FROM ( SELECT DISTINCT A.InterfaceID FROM dbo.InterfaceTraffic A WHERE A.DateTime >= @StartDate AND A.DateTime <= @EndDate ) AS AA ) as RESULT_OUT ON (Interfaces.InterfaceID = RESULT_OUT.InterfaceID) --------------------- INNER JOIN ( SELECT InterfaceID, dbo.GetMaxBps95th(AA.InterfaceID, @StartDate, @EndDate) AS Maxbps_95 FROM ( SELECT DISTINCT A.InterfaceID FROM dbo.InterfaceTraffic A WHERE A.DateTime >= @StartDate AND A.DateTime <= @EndDate ) AS AA ) as RESULT_MAX ON (Interfaces.InterfaceID = RESULT_MAX.InterfaceID) --------------------- WHERE Interfaces.Caption like '%PSN DC%' ORDER BY NodeName, Interface_Caption |
The output:
I'm guessing I need to format it in the SQL somewhere, but I don't know how. Can anyone offer a suggestion?