Showing posts with label designer. Show all posts
Showing posts with label designer. Show all posts

Tuesday, March 27, 2012

DayOfWeek Function

Would like to set a date parameter default in the report designer based on
the day of the week. So if it was Monday, then the default date would be set
to =today.adddays(-3) otherwise it would default to =today.adddays(-1). Is
there a dayOfWeek function that be used in an expression that returns either
the numeric or the alpha of the week?
GlassHi,
You can easely use the expression <code>=WeekDay(Now())</code> for
retrieving the actual weekday. This combined with an IIF expression you can
create the behaviour you need, like
<code>
=IIF(WeekDay(Now())=2, Now.AddDays(-3), Now.AddDays(-1))
</code>
Hope this would help you
Jan Pieter Posthuma
"Glass" wrote:
> Would like to set a date parameter default in the report designer based on
> the day of the week. So if it was Monday, then the default date would be set
> to =today.adddays(-3) otherwise it would default to =today.adddays(-1). Is
> there a dayOfWeek function that be used in an expression that returns either
> the numeric or the alpha of the week?
> Glass|||Jan Pieter... It worked great. Have two ancillary question: what is the
difference between today and now? Is there a list of functions that are
valid in report server for use in expressions? Online books didn't seem to
help here.
Appreciate the help...
Glass
"Jan Pieter Posthuma" wrote:
> Hi,
> You can easely use the expression <code>=WeekDay(Now())</code> for
> retrieving the actual weekday. This combined with an IIF expression you can
> create the behaviour you need, like
> <code>
> =IIF(WeekDay(Now())=2, Now.AddDays(-3), Now.AddDays(-1))
> </code>
> Hope this would help you
> Jan Pieter Posthuma
>
> "Glass" wrote:
> > Would like to set a date parameter default in the report designer based on
> > the day of the week. So if it was Monday, then the default date would be set
> > to =today.adddays(-3) otherwise it would default to =today.adddays(-1). Is
> > there a dayOfWeek function that be used in an expression that returns either
> > the numeric or the alpha of the week?
> >
> > Glass|||Glass,
There is a little difference between Now() and Today(). Both return the same
date, but Now returns the actual time and Today will allways return 12AM
back. So for today:
=Now() returns 6/22/2005 9:55:04 AM
=Today() returns 6/22/2005 12:00:00 AM
I must say: I use Now mainly because of my history with VB.NET.
Jan Pieter Posthuma
"Glass" wrote:
> Jan Pieter... It worked great. Have two ancillary question: what is the
> difference between today and now? Is there a list of functions that are
> valid in report server for use in expressions? Online books didn't seem to
> help here.
> Appreciate the help...
> Glass
> "Jan Pieter Posthuma" wrote:
> > Hi,
> >
> > You can easely use the expression <code>=WeekDay(Now())</code> for
> > retrieving the actual weekday. This combined with an IIF expression you can
> > create the behaviour you need, like
> > <code>
> > =IIF(WeekDay(Now())=2, Now.AddDays(-3), Now.AddDays(-1))
> > </code>
> >
> > Hope this would help you
> >
> > Jan Pieter Posthuma
> >
> >
> >
> > "Glass" wrote:
> >
> > > Would like to set a date parameter default in the report designer based on
> > > the day of the week. So if it was Monday, then the default date would be set
> > > to =today.adddays(-3) otherwise it would default to =today.adddays(-1). Is
> > > there a dayOfWeek function that be used in an expression that returns either
> > > the numeric or the alpha of the week?
> > >
> > > Glass|||Thank you very much...
Glass
"Jan Pieter Posthuma" wrote:
> Glass,
> There is a little difference between Now() and Today(). Both return the same
> date, but Now returns the actual time and Today will allways return 12AM
> back. So for today:
> =Now() returns 6/22/2005 9:55:04 AM
> =Today() returns 6/22/2005 12:00:00 AM
> I must say: I use Now mainly because of my history with VB.NET.
> Jan Pieter Posthuma
> "Glass" wrote:
> > Jan Pieter... It worked great. Have two ancillary question: what is the
> > difference between today and now? Is there a list of functions that are
> > valid in report server for use in expressions? Online books didn't seem to
> > help here.
> >
> > Appreciate the help...
> >
> > Glass
> >
> > "Jan Pieter Posthuma" wrote:
> >
> > > Hi,
> > >
> > > You can easely use the expression <code>=WeekDay(Now())</code> for
> > > retrieving the actual weekday. This combined with an IIF expression you can
> > > create the behaviour you need, like
> > > <code>
> > > =IIF(WeekDay(Now())=2, Now.AddDays(-3), Now.AddDays(-1))
> > > </code>
> > >
> > > Hope this would help you
> > >
> > > Jan Pieter Posthuma
> > >
> > >
> > >
> > > "Glass" wrote:
> > >
> > > > Would like to set a date parameter default in the report designer based on
> > > > the day of the week. So if it was Monday, then the default date would be set
> > > > to =today.adddays(-3) otherwise it would default to =today.adddays(-1). Is
> > > > there a dayOfWeek function that be used in an expression that returns either
> > > > the numeric or the alpha of the week?
> > > >
> > > > Glass|||"Glass" skrev:
> Thank you very much...
> Glass
> "Jan Pieter Posthuma" wrote:
> > Glass,
> >
> > There is a little difference between Now() and Today(). Both return the same
> > date, but Now returns the actual time and Today will allways return 12AM
> > back. So for today:
> > =Now() returns 6/22/2005 9:55:04 AM
> > =Today() returns 6/22/2005 12:00:00 AM
> >
> > I must say: I use Now mainly because of my history with VB.NET.
> >
> > Jan Pieter Posthuma
> >
> > "Glass" wrote:
> >
> > > Jan Pieter... It worked great. Have two ancillary question: what is the
> > > difference between today and now? Is there a list of functions that are
> > > valid in report server for use in expressions? Online books didn't seem to
> > > help here.
> > >
> > > Appreciate the help...
> > >
> > > Glass
> > >
> > > "Jan Pieter Posthuma" wrote:
> > >
> > > > Hi,
> > > >
> > > > You can easely use the expression <code>=WeekDay(Now())</code> for
> > > > retrieving the actual weekday. This combined with an IIF expression you can
> > > > create the behaviour you need, like
> > > > <code>
> > > > =IIF(WeekDay(Now())=2, Now.AddDays(-3), Now.AddDays(-1))
> > > > </code>
> > > >
> > > > Hope this would help you
> > > >
> > > > Jan Pieter Posthuma
> > > >
> > > >
> > > >
> > > > "Glass" wrote:
> > > >
> > > > > Would like to set a date parameter default in the report designer based on
> > > > > the day of the week. So if it was Monday, then the default date would be set
> > > > > to =today.adddays(-3) otherwise it would default to =today.adddays(-1). Is
> > > > > there a dayOfWeek function that be used in an expression that returns either
> > > > > the numeric or the alpha of the week?
> > > > >
> > > > > Glass
anna jag behöver verkligen din hjälp nuu !!sql

Wednesday, March 7, 2012

datetime + sp2?

In report designer using the data tab when testing the datetime parameters
the datetime is being shown as UK locale and the data is being rendered
properly (UK locale). However, if I then switch to the preview tab the
datetime parameters are being formatted US locale. If I deploy the result is
the same, US style locale.
I have set the report language to English UK the machine locale is set to
UK, IE is set to en-gb. What can I do next?
I was wondering if this is an sp2 issue as sp1 fixed the locale issues.
Thanks
FrankWhat is the VS languge set to?
--
Brian Welcker
Group Program Manager
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Frank Ashley" <aa@.aa.com> wrote in message
news:eCL9Mj2SFHA.2560@.TK2MSFTNGP09.phx.gbl...
> In report designer using the data tab when testing the datetime parameters
> the datetime is being shown as UK locale and the data is being rendered
> properly (UK locale). However, if I then switch to the preview tab the
> datetime parameters are being formatted US locale. If I deploy the result
> is the same, US style locale.
> I have set the report language to English UK the machine locale is set to
> UK, IE is set to en-gb. What can I do next?
> I was wondering if this is an sp2 issue as sp1 fixed the locale issues.
> Thanks
> Frank
>
>|||VS2003 is set to
Tools | International Settings | Language | Same as Microsoft office
(language neutral)
Office 2003 Enabled langauge is set to English (UK) and default behaviour is
set to English UK.
Hope this helps.
Frank
"Brian Welcker [MSFT]" <bwelcker@.online.microsoft.com> wrote in message
news:%23n2x5x6SFHA.3188@.TK2MSFTNGP09.phx.gbl...
> What is the VS languge set to?
> --
> Brian Welcker
> Group Program Manager
> Microsoft SQL Server Reporting Services
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> "Frank Ashley" <aa@.aa.com> wrote in message
> news:eCL9Mj2SFHA.2560@.TK2MSFTNGP09.phx.gbl...
>> In report designer using the data tab when testing the datetime
>> parameters the datetime is being shown as UK locale and the data is being
>> rendered properly (UK locale). However, if I then switch to the preview
>> tab the datetime parameters are being formatted US locale. If I deploy
>> the result is the same, US style locale.
>> I have set the report language to English UK the machine locale is set to
>> UK, IE is set to en-gb. What can I do next?
>> I was wondering if this is an sp2 issue as sp1 fixed the locale issues.
>> Thanks
>> Frank
>>
>>
>|||Can you try a non-English locale? I'm stumped.
--
Brian Welcker
Group Program Manager
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Frank Ashley" <aa@.aa.com> wrote in message
news:uUaOA$7SFHA.1044@.TK2MSFTNGP10.phx.gbl...
> VS2003 is set to
> Tools | International Settings | Language | Same as Microsoft office
> (language neutral)
> Office 2003 Enabled langauge is set to English (UK) and default behaviour
> is set to English UK.
> Hope this helps.
> Frank
>
> "Brian Welcker [MSFT]" <bwelcker@.online.microsoft.com> wrote in message
> news:%23n2x5x6SFHA.3188@.TK2MSFTNGP09.phx.gbl...
>> What is the VS languge set to?
>> --
>> Brian Welcker
>> Group Program Manager
>> Microsoft SQL Server Reporting Services
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>> "Frank Ashley" <aa@.aa.com> wrote in message
>> news:eCL9Mj2SFHA.2560@.TK2MSFTNGP09.phx.gbl...
>> In report designer using the data tab when testing the datetime
>> parameters the datetime is being shown as UK locale and the data is
>> being rendered properly (UK locale). However, if I then switch to the
>> preview tab the datetime parameters are being formatted US locale. If I
>> deploy the result is the same, US style locale.
>> I have set the report language to English UK the machine locale is set
>> to UK, IE is set to en-gb. What can I do next?
>> I was wondering if this is an sp2 issue as sp1 fixed the locale issues.
>> Thanks
>> Frank
>>
>>
>>
>|||Hi Brian,
I changed the locale to Finnish and the dates were rendered as dd.mm.yyyy
hh:mm:ss in the data tab but still the drop down on the preview tab showed
mm/dd/yyyy hh:mm:ss
I then tried removing Reporting Services and re-installing (going straight
to sp2, bypassing sp1) but still the same results.
regards
Frank
"Brian Welcker [MSFT]" <bwelcker@.online.microsoft.com> wrote in message
news:u1c$ioNTFHA.2828@.TK2MSFTNGP10.phx.gbl...
> Can you try a non-English locale? I'm stumped.
> --
> Brian Welcker
> Group Program Manager
> Microsoft SQL Server Reporting Services
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> "Frank Ashley" <aa@.aa.com> wrote in message
> news:uUaOA$7SFHA.1044@.TK2MSFTNGP10.phx.gbl...
>> VS2003 is set to
>> Tools | International Settings | Language | Same as Microsoft office
>> (language neutral)
>> Office 2003 Enabled langauge is set to English (UK) and default behaviour
>> is set to English UK.
>> Hope this helps.
>> Frank
>>
>> "Brian Welcker [MSFT]" <bwelcker@.online.microsoft.com> wrote in message
>> news:%23n2x5x6SFHA.3188@.TK2MSFTNGP09.phx.gbl...
>> What is the VS languge set to?
>> --
>> Brian Welcker
>> Group Program Manager
>> Microsoft SQL Server Reporting Services
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>> "Frank Ashley" <aa@.aa.com> wrote in message
>> news:eCL9Mj2SFHA.2560@.TK2MSFTNGP09.phx.gbl...
>> In report designer using the data tab when testing the datetime
>> parameters the datetime is being shown as UK locale and the data is
>> being rendered properly (UK locale). However, if I then switch to the
>> preview tab the datetime parameters are being formatted US locale. If I
>> deploy the result is the same, US style locale.
>> I have set the report language to English UK the machine locale is set
>> to UK, IE is set to en-gb. What can I do next?
>> I was wondering if this is an sp2 issue as sp1 fixed the locale issues.
>> Thanks
>> Frank
>>
>>
>>
>>
>