all groups > sql server reporting services > february 2006 >
You're in the

sql server reporting services

group:

DateTime parameter switches format


DateTime parameter switches format suranga.suranga NO[at]SPAM gmail.com
2/12/2006 3:13:51 PM
sql server reporting services:
The reports I am creating in a VS2005 Business Intelligence Project
have DateTime parameters. To preview reports, after the parameters have
been entered in "Preview" tab, the "View Report" button has to be
clicked.

It looks to me that whenever the "View Report" is cliked, it causes
"datetime" parameter boxes to re-oder the dates so that "mm" and "dd"
values are interchanged.

For instance, if I enter "12/02/2006" (meaning Feb 02, 2006, in
Australian format ie. dd/mm/yyyy) and click "View Report" button, the
datatime parameter is rearranged as "02/12/2006", and consequenly
producing data for Dec 02, 2006.

Strangely, If I click "view report" again, it interchanges "dd" and
"mm" values again resulting the date I originally intended and produces
the correct report. Clicking "View Report" again causes "dd" and "mm"
to interchange, and so on it goes.

If I enter "20/02/2006" in the datetime parameter box, and click "View
Report" button, I get an error message about incorrect datetime format.
"An error occured during local report processing. The value provided
for the report parameter 'dtStartDate' is not valid for its type".

So, it appears that VS2005
* expects me to input datetime as "mm/dd/yyyy" format,
* rearranges "mm" and "dd" to "dd/mm/yyyy" format (whenever "View
Report" button is clicked) before passing the parameters to the stored
procedures.

I have set the report's "Language" property to "Australia", and WinXP's
language to "Australian English"

Any suggestions and workarounds are greatly appreciated.

Thanks
Sur
RE: DateTime parameter switches format Wayne Snyder
2/13/2006 4:53:26 AM
One thing you can do is to change the parameter type to string, where you can
control the string format of the date... The down side to this is that you do
NOT get the Date-picker window...
--
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC

I support the Professional Association for SQL Server ( PASS) and it''s
community of SQL Professionals.


[quoted text, click to view]
Re: DateTime parameter switches format Ed Allison
2/13/2006 3:28:45 PM
I had what sounds very like this problem as described in an earlier thread.
If it is the same problem, it should not occur when reports are deployed to
the report server. For me, it only occurs in development.

Ed Allison

[quoted text, click to view]

Re: DateTime parameter switches format Sur
2/13/2006 6:20:44 PM
Ed and Wayne,

Thanks. I published the reports at a Reporting Server instance; it
doesn't suffer from this bug. I guess until a service pack is realised
for VS2005, I'll have to enter dates in the universal format
(yyyy-MM-dd) to overcome this bug.
AddThis Social Bookmark Button