Running a report for previous day

  • Hi All

    I created a proc for a report and works okay now i need add the date within the proc to execute using the previous date like eg run the report today to return info after COB yesterday

    i hope it makes sense

    It's better to fail while trying, rather than fail without trying!!!

  • does this need to be within the datasource or as a parameter for the report?

  • Hi

    Thanks for ur response, it's a parameter for a report but the report will schedule within SSRS to send an email auto

    Ta!!

    It's better to fail while trying, rather than fail without trying!!!

  • =DateAdd(ā€Dā€, -1, Today())

  • Tx, how do put that together in a code e.g is the below correct

    select col1,col2,DATEADD(day,-1,getdate())

    from test

    ta

    It's better to fail while trying, rather than fail without trying!!!

  • you would go to Report > Report Parameters... select the parameter you are using, change the default values to non-queried and put in the dateadd function.

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

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