0 Replies Latest reply on Dec 8, 2009 9:25 AM by Myanta

    Custom Report Help

    Myanta

      I am writing a custom report using a sql string that looks right and is returning my data in the format that I am looking for except I don't understand something. When I configure the data as Bandwidth and bps it is coming back as way too small of a number.

      If I look at the raw data and do some quick calculations it looks like the formating is correct but I know that the numbers are too small. If I look at the graph from the web page it looks fine.

      Can someone point me in the right direction? Am I pulling the wrong numbers or do I need to do some calculation before I format the numbers? Here is the SQL I am using...

      SELECT     TOP (100) PERCENT dbo.InterfaceTraffic_Detail.NodeID, dbo.Nodes.SysName, dbo.InterfaceTraffic_Detail.InterfaceID, dbo.Interfaces.InterfaceName,
                            dbo.Interfaces.InterfaceAlias, CONVERT(char(11), dbo.InterfaceTraffic_Detail.DateTime) AS _Date, MIN(dbo.InterfaceTraffic_Detail.In_Minbps)
                            AS In_Min_bps, MAX(dbo.InterfaceTraffic_Detail.In_Maxbps) AS In_Max_bps, AVG(dbo.InterfaceTraffic_Detail.In_Averagebps) AS In_Avg_bps,
                            MIN(dbo.InterfaceTraffic_Detail.Out_Minbps) AS Out_Min_bps, MAX(dbo.InterfaceTraffic_Detail.Out_Maxbps) AS Out_Max_bps,
                            AVG(dbo.InterfaceTraffic_Detail.Out_Averagebps) AS Out_Avg_bps
      FROM         dbo.InterfaceTraffic_Detail INNER JOIN
                            dbo.Interfaces ON dbo.InterfaceTraffic_Detail.InterfaceID = dbo.Interfaces.InterfaceID INNER JOIN
                            dbo.Nodes ON dbo.InterfaceTraffic_Detail.NodeID = dbo.Nodes.NodeID
      WHERE     (dbo.InterfaceTraffic_Detail.DateTime > DATEADD(d, - 2, dbo.InterfaceTraffic_Detail.DateTime)) AND (CONVERT(char(8),
                            dbo.InterfaceTraffic_Detail.DateTime, 108) > '06:00:00') AND (CONVERT(char(8), dbo.InterfaceTraffic_Detail.DateTime, 108) < '18:00:00')
      GROUP BY dbo.Interfaces.InterfaceName, dbo.Interfaces.InterfaceAlias, CONVERT(char(11), dbo.InterfaceTraffic_Detail.DateTime), dbo.Nodes.SysName,
                            dbo.InterfaceTraffic_Detail.InterfaceID, dbo.InterfaceTraffic_Detail.NodeID
      HAVING      (dbo.Interfaces.InterfaceName LIKE N'Serial3/0.%')
      ORDER BY dbo.Interfaces.InterfaceName, MIN(dbo.InterfaceTraffic_Detail.DateTime)

      Thank you for any help you can provide.