Ssrs-2008- Creating Dynamic Query Using Ssrs

Discussion in 'Databases' started by anniejolly, Jan 28, 2013.

?

Hi, I am new to SSRS and have created a couple of reports with input parameters. Now I am trying to

  1. SSRS

    0 vote(s)
    0.0%
  2. SSRS

    0 vote(s)
    0.0%
Multiple votes are allowed.
  1. #1
    Hi,

    I am new to SSRS and have created a couple of reports with input parameters. Now I am trying to use the column name as a parameter.
    Can any one suggest any workaround on how to use the column names as an input parameters. For example, I have an input parameters called 'ByDate' which takes three values (saledate, settled date and disbursed date). Based on this, I need to use the sql condition as 'solddate < = ''' or settleddate <='' or disbursedDate <=.

    Thanks
     
    anniejolly, Jan 28, 2013 IP
  2. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #2
    solddate < = '' makes no sense, since a date value can't be compared to an empty string. If you verify the dates, which you should do before you get near a SQL statement, won't even access the database if the one of the dates is blank.
     
    Rukbat, Jan 29, 2013 IP