kind Of a struck with this problem. What could be the problem

  • When i try to create report using report wizard i get empty report. What all the correct setting.

    i am using below query to generate report

    WITH C AS

    (

    SELECT YEAR(OrderDate) AS OrderYear,

    AVG(TotalDue) AS TotalDue

    FROM Sales.SalesOrderHeader

    GROUP BY YEAR(OrderDate)

    )

    SELECT

    Cur.TotalDue AS CurrentTotalDue

    ,Cur.OrderYear AS OrderYear

    ,Pre.TotalDue AS PreviousTotalDue

    ,Cur.TotalDue-Pre.TotalDue AS TotalDueForTheYear

    FROM C Cur

    LEFT OUTER JOIN C Pre

    ON Cur.OrderYear=Pre.OrderYear+1

    ORDER BY OrderYear ASC

    what could be the problem?

    Environment: Windows 2008 Server,64bit, Sq l server 2008

  • Smash125 (11/25/2011)


    When i try to create report using report wizard i get empty report. What all the correct setting.

    i am using below query to generate report

    WITH C AS

    (

    SELECT YEAR(OrderDate) AS OrderYear,

    AVG(TotalDue) AS TotalDue

    FROM Sales.SalesOrderHeader

    GROUP BY YEAR(OrderDate)

    )

    SELECT

    Cur.TotalDue AS CurrentTotalDue

    ,Cur.OrderYear AS OrderYear

    ,Pre.TotalDue AS PreviousTotalDue

    ,Cur.TotalDue-Pre.TotalDue AS TotalDueForTheYear

    FROM C Cur

    LEFT OUTER JOIN C Pre

    ON Cur.OrderYear=Pre.OrderYear+1

    ORDER BY OrderYear ASC

    what could be the problem?

    Environment: Windows 2008 Server,64bit, Sq l server 2008

    My car is broken, it's a red one. Difficult to fix with that description, isn't it? ๐Ÿ˜‰

    When you have time, please read this article[/url] about the best way to provide us with working sample data and DDL scripts.

    Thanks.


    Forever trying to learn
    My blog - http://www.cadavre.co.uk/
    For better, quicker answers on T-SQL questions, click on the following...http://www.sqlservercentral.com/articles/Best+Practices/61537/
    For better, quicker answers on SQL Server performance related questions, click on the following...http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • Fairly simple steps i have given.

  • Smash125 (11/25/2011)


    Fairly simple steps i have given.

    OK, I'm going to paraphrase an article for you.


    I have a simple question for you, if you get it right then I'll happily help.

    Am I wearing a hat?

    Take a few minutes, think about it, write it down on a piece of scrap paper. I can wait, take your time...

    What's that, you say? You can't answer that simple question!? Why not? I stated it very clearly, it requires a simple YES or NO response, there's nothing tricky there. So, why would anyone have any trouble giving an answer to something so basic and simple?

    You have no way of knowing what I am wearing because I did not provide you enough information!


    The same applies to what you've asked. The issue could be that your query is incorrect. It could be that your SSRS is set-up incorrectly. It could be that you're pointing your query at the wrong database. It could be any number of things, but without information from you there is no way to answer.

    Obviously it's entirely up to you whether or not you want to provide all of the information required to answer your question. If you choose not to, maybe someone with more patience will happen by and slowly drag the information out of you post by post, but I suspect you'll leave here frustrated and disappointed.


    Forever trying to learn
    My blog - http://www.cadavre.co.uk/
    For better, quicker answers on T-SQL questions, click on the following...http://www.sqlservercentral.com/articles/Best+Practices/61537/
    For better, quicker answers on SQL Server performance related questions, click on the following...http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • Run this query, describe the result set - better still, post the result set:

    SELECT YEAR(OrderDate) AS OrderYear,

    AVG(TotalDue) AS TotalDue

    FROM Sales.SalesOrderHeader

    GROUP BY YEAR(OrderDate)

    โ€œWrite the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.โ€ - Gail Shaw

    For fast, accurate and documented assistance in answering your questions, please read this article.
    Understanding and using APPLY, (I) and (II) Paul White
    Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply