|
Home > Archive > MS SQL Server Reporting Services > August 2005 > Format Date Parameter in a Report
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Format Date Parameter in a Report
|
|
| Limor Bellison 2005-08-30, 7:24 am |
| Hi,
Can I get a Date Parameter that the user filled and format it to
'yyyy-mm-dd' format, so I could execute the Query with the formated date?
Limor
| |
| EsWallace 2005-08-30, 9:26 am |
| If you are Trying what I think you are trying ...
Here is something you could try
Create a Dataset for your Date Values
I named mine DATE
in the Query type
-----------------
SELECT
LABEL = LEFT(& #91;DATEFIELDNAME],1
1), --WRITES AUGUST 30 2005
VALUE = [DATEFIELDNAME] --WRITES 2005-08-30 00:00:00.000
FROM dbo.SALES
GROUP BY [DATEFIELDNAME]
ORDER BY [DATEFIELDNAME] DESC
-------------
Then Create a Parameter for your date
I named mine BDATE
DATATYPE = STRING
AVAILABLE VALUES = FROM QUERY
DATASET = DATE (NAME I CREATED)
VALUE = VALUE (THIS IS WHAT THE QUERY IN THE DATASET WILL SEE)
LABEL = LABEL ( THIS IS WHAT THE CLIENT WILL SEE)
--OPTIONAL
DEFAULT QUERY = FROM QUERY
DATASET = DATE
VALUE = VALUE
----------------------------
In the dataset that runs the Query for the report you would then have your
date field = @BDATE (cap sensitive)
I hope this helps and is what you were looking for :)
"Limor Bellison" wrote:
> Hi,
>
> Can I get a Date Parameter that the user filled and format it to
> 'yyyy-mm-dd' format, so I could execute the Query with the formated date?
>
> Limor
| |
| Limor Bellison 2005-08-30, 11:25 am |
| Hi,
Thank you for your prompt answer.
I cannot use your solution for 2 reasons:
1-The dates combo box will be too long
2-I get the dates by Url and there is a chance that the date in the combo
will not include the date in the Url query
Thanx,
Limor
"EsWallace" wrote:
[color=darkred]
> If you are Trying what I think you are trying ...
>
> Here is something you could try
>
> Create a Dataset for your Date Values
> I named mine DATE
>
> in the Query type
> -----------------
> SELECT
> LABEL = LEFT(& #91;DATEFIELDNAME],1
1), --WRITES AUGUST 30 2005
> VALUE = [DATEFIELDNAME] --WRITES 2005-08-30 00:00:00.000
>
> FROM dbo.SALES
> GROUP BY [DATEFIELDNAME]
> ORDER BY [DATEFIELDNAME] DESC
> -------------
>
> Then Create a Parameter for your date
> I named mine BDATE
> DATATYPE = STRING
> AVAILABLE VALUES = FROM QUERY
> DATASET = DATE (NAME I CREATED)
> VALUE = VALUE (THIS IS WHAT THE QUERY IN THE DATASET WILL SEE)
> LABEL = LABEL ( THIS IS WHAT THE CLIENT WILL SEE)
> --OPTIONAL
> DEFAULT QUERY = FROM QUERY
> DATASET = DATE
> VALUE = VALUE
> ----------------------------
>
> In the dataset that runs the Query for the report you would then have your
> date field = @BDATE (cap sensitive)
>
>
> I hope this helps and is what you were looking for :)
>
> "Limor Bellison" wrote:
>
|
|
|
|
|