Basic Reporting Problem

Hi

I am having a problem with reporting. I want to query SQL data using dataset using a query which looks lie this.

slect thisparam,thatparam from tablex where thisparam = @thisparam

thisparam is a user prompt. When the user leaves prompt value to be empty and clicks on view report i want to display the data

select thisparam,thatparam from tablex

else use the above statement with the parameters.

Could someone help me with this. Should I user filters or expression.

Thanks
SQL NEW



Answer this question

Basic Reporting Problem

  • Corsario007

    Thank you it worked. Can you tell me if there are any tutorials to start for reporting services please let me know .

    Thanks

    SQL new


  • Benne

    Hi - I've been enjoying the traffic on some of the other SQL Forums, which inlcude a forum for T-SQL Syntax that you might find helpful. The SSRS Forum is highly trafficked, however as a result any off-topic questions you post are likely to be absorbed in the conversation stream and disregarded.

    Other forums:
    http://forums.microsoft.com/MSDN/default.aspx ForumGroupID=19&SiteID=1

    Enjoy - Greg


  • Mike Awad

    You can do this in your SQL statement:

    select thisparam, thatparam

    from tablex

    where thisparam = @thisparam or @thisparam is null

     

    If you want to treat the empty string and null as the same, then just add another or:

    where thisparam = @thisparam or @thisparam is null or @thisparam = ''


  • Basic Reporting Problem