Quantcast
Channel: SQL Server Reporting Services, Power View forum
Viewing all articles
Browse latest Browse all 10045

SSRS Date and time Parameter

$
0
0

Hi Forumers'

Im trying to design a report in SSRS with date and time parameters

I would like to combined the fromdate,fromtime and stored the value to @Fromdatetime and

same with also todate,totime into @ToDatetime. i will used this in a where clause condition.

can you give me guys an idea. btw, i'm using Text queries not stored procedure.

Right now I tried this query but i got an error.

The variable name '@FromDatetime' has already been declared. Variable names must be unique within a query batch or stored procedure.

DECLARE @fromDateTime as datetime, @toDateTime as datetime
SET @fromdatetime = dbo.getCombinedDateTime(@fromDate,@fromTime)
SET @todatetime = dbo.getCombinedDateTime(@toDate,@toTime)


Select
v.JOURNALID
,v.TRANSDATE
,v.ITEMID
,v.QTY
,v.COSTAMOUNT
,v.JOURNALTYPE
,v.BOMLINE
From INVENTJOURNALTRANS v with (nolock)
Where v.TRANSDATE between @FromDatetime and @ToDatetime
and v.JOURNALTYPE=3
and v.BOMLINE=0

Thank you.

jov


Viewing all articles
Browse latest Browse all 10045

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>