Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Analysis Server and Reporting Services (2005)
 Set monday as a first day of week in date picker

Author  Topic 

golliaph
Starting Member

9 Posts

Posted - 2008-07-04 : 04:13:53
Hi!
I'm using Reporting services 2005. I have a filter datetime parameter SDate. Our customer want to see Monday as a first day of week in SDate drop down calendar. Is it possible to do this?

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-07-04 : 05:20:12
Isn't there a property to set for this?



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

golliaph
Starting Member

9 Posts

Posted - 2008-07-04 : 05:24:24
quote:
Originally posted by Peso

Isn't there a property to set for this?

E 12°55'05.25"
N 56°04'39.16"



Where can I find this property?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-07-07 : 02:18:41
You can write a query to set monday as first day of week and then use this to create a dataset to populate the day dropdown and order on the your custom order number.
something like
select *
from
(
select 'Mon' as day,1 as ord
union all
select 'Tue',2
...
)t
order by t.ord

Go to Top of Page

golliaph
Starting Member

9 Posts

Posted - 2008-07-07 : 05:01:36
quote:
Originally posted by visakh16

You can write a query to set monday as first day of week and then use this to create a dataset to populate the day dropdown and order on the your custom order number.
something like
select *
from
(
select 'Mon' as day,1 as ord
union all
select 'Tue',2
...
)t
order by t.ord


I think you didn't understand what I mean.
Our customer used to see calendar like that:
Mo Tu We Th Fr Sa Su
25 26 27 28 29 1 2
3 4 5 6 7 8 9
.................................

But parameter's drop down calendar in Reporting Services look like:
Su Mo Tu We Th Fr Sa
24 25 26 27 28 29 1
2 3 4 5 6 7 8
.................................
So I need somehow to change view of parameter's drop down calendar, so that it looks like first example.
Go to Top of Page

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2008-07-07 : 05:37:23
This is a regional setting but i can't remember which. My reports are set to UK, the same as my regional settings and all the calendars start with Monday on the left.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-07-07 : 06:33:01
quote:
Originally posted by golliaph

quote:
Originally posted by visakh16

You can write a query to set monday as first day of week and then use this to create a dataset to populate the day dropdown and order on the your custom order number.
something like
select *
from
(
select 'Mon' as day,1 as ord
union all
select 'Tue',2
...
)t
order by t.ord


I think you didn't understand what I mean.
Our customer used to see calendar like that:
Mo Tu We Th Fr Sa Su
25 26 27 28 29 1 2
3 4 5 6 7 8 9
.................................

But parameter's drop down calendar in Reporting Services look like:
Su Mo Tu We Th Fr Sa
24 25 26 27 28 29 1
2 3 4 5 6 7 8
.................................
So I need somehow to change view of parameter's drop down calendar, so that it looks like first example.


Sorry i thought you were asking about listing days in a combo. for making this change i think you need to change the language settings of report and also regional settings of your pc.
Go to Top of Page

golliaph
Starting Member

9 Posts

Posted - 2008-07-07 : 06:46:00
quote:
Originally posted by visakh16

quote:
Originally posted by golliaph

quote:
Originally posted by visakh16

You can write a query to set monday as first day of week and then use this to create a dataset to populate the day dropdown and order on the your custom order number.
something like
select *
from
(
select 'Mon' as day,1 as ord
union all
select 'Tue',2
...
)t
order by t.ord


I think you didn't understand what I mean.
Our customer used to see calendar like that:
Mo Tu We Th Fr Sa Su
25 26 27 28 29 1 2
3 4 5 6 7 8 9
.................................

But parameter's drop down calendar in Reporting Services look like:
Su Mo Tu We Th Fr Sa
24 25 26 27 28 29 1
2 3 4 5 6 7 8
.................................
So I need somehow to change view of parameter's drop down calendar, so that it looks like first example.


Sorry i thought you were asking about listing days in a combo. for making this change i think you need to change the language settings of report and also regional settings of your pc.


Server side and client side regional settings and datetime settings is set to local regional settings.
I've also changed Culture and UICulture settings at report viewer page:
<%@ Page Language="C#" AutoEventWireup="true" Inherits="Microsoft.ReportingServices.WebServer.ReportViewerPage" Culture="ru-RU" UICulture="ru"%>
This only changed report default language.
Only SQL server thinks that Sunday is first day of week. Is it important?
Go to Top of Page

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2008-07-07 : 06:55:27
Yes, this is important, this is where the setting for the control is coming from, from your ReportServer database.
Go to Top of Page

golliaph
Starting Member

9 Posts

Posted - 2008-07-07 : 07:07:28
quote:
Originally posted by RickD

Yes, this is important, this is where the setting for the control is coming from, from your ReportServer database.


And what should I change in this database?
Go to Top of Page

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2008-07-07 : 07:56:50
You have something in your settings as US (i'm guessing). Look up DATEFIRST in BOL.
Go to Top of Page

golliaph
Starting Member

9 Posts

Posted - 2008-07-09 : 05:25:14
quote:
Originally posted by RickD

You have something in your settings as US (i'm guessing). Look up DATEFIRST in BOL.


In VS preview mode Monday is first day of week and everything is allright, but when I deploy report to IIS and open report on the web Sunday is first day of week in date picker. It's very strange. Is it Reporting Services bug?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-07-09 : 06:51:14
Not sure if this is the reason:-

http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=271099
Go to Top of Page

golliaph
Starting Member

9 Posts

Posted - 2008-07-10 : 05:02:21
quote:
Originally posted by visakh16

Not sure if this is the reason:-

http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=271099


Thanks a lot!!! It works!!!
Go to Top of Page
   

- Advertisement -