0 Replies Latest reply on Aug 8, 2011 8:57 AM by mcalpinj

    Using @@RowCount with Report Writer

    mcalpinj

      I am creating a custom SQL report with Orion Report Writer and it is coming out excellent in design view.  WHen I click Execute SQL Query the results are just as expected.  Hitting the preview button also gives me the desired output.  The issue is that the web page itself for the report always reports zero for the column where I use @@RowCount.

      The output from the query displays the node name, the IP address, the number of interfaces on that node, and lastly, the total count of interfaces retrieved from the query.  This last one is the column where I am only displaying zero on the web page.

      Why would it work correctly in the Report Writer but not display that way on the web page?

      Below is the query;

      Select
          Nodes.NodeID,
          Nodes.SysName,
          Nodes.IP_Address,
          Count(*)   As NumOfInterfaces,
          @@RowCount As TotalInterfaces
      From
          dbo.Nodes   Nodes,
          dbo.Interfaces   Interfaces
      Where (
                  Interfaces.NodeID = Nodes.NodeID
      )
       
      And (
           ( Nodes.IP_Address LIKE '10.2.100.%' )
          Or ( Nodes.IP_Address LIKE '10.2.102.%' )
          Or ( Nodes.IP_Address LIKE '10.2.104.%' )
          )
      Group by
          Nodes.IP_Address,
          Nodes.SysName,
          Nodes.NodeID
      Order by
          Nodes.SysName Asc, Nodes.IP_Address Asc
      ;