I'm failry new to Reporting Services and I need to put the name of the
previous month into the Report Header. For example I need it to look like
"November 2004..." How would I go about getting this into the Report Header.
Thanks in advance,
BJYOu can use: =Now().AddMonths(-1)
If you want to format it to display the way you showed, you can use:
=format(Now().AddMonths(-1), "MMMM dd, yyyy)
Charles Kangai, MCT, MCDBA
"BJ Castrellon" wrote:
> I'm failry new to Reporting Services and I need to put the name of the
> previous month into the Report Header. For example I need it to look like
> "November 2004..." How would I go about getting this into the Report Header.
> Thanks in advance,
> BJ|||You can use the expression: =Now().AddMonths(-1)
If you want to format it the way you have in your question, you can do use
the expression: =format(Now().AddMonths(-1), "MMMM yyyy")
Charles Kangai, MCT, MCDBA
"BJ Castrellon" wrote:
> I'm failry new to Reporting Services and I need to put the name of the
> previous month into the Report Header. For example I need it to look like
> "November 2004..." How would I go about getting this into the Report Header.
> Thanks in advance,
> BJ|||Is this possible with a report parameter?
I have a date being passed in and I need to display the previous month of
that date. So in a text box I put this
=datetime.parameter!startdate.addmonths(-1).tostring("MMMM")
but get only errors.
Has anyone had to do this before?
"Charles Kangai" wrote:
> You can use the expression: =Now().AddMonths(-1)
> If you want to format it the way you have in your question, you can do use
> the expression: =format(Now().AddMonths(-1), "MMMM yyyy")
> Charles Kangai, MCT, MCDBA
> "BJ Castrellon" wrote:
> > I'm failry new to Reporting Services and I need to put the name of the
> > previous month into the Report Header. For example I need it to look like
> > "November 2004..." How would I go about getting this into the Report Header.
> >
> > Thanks in advance,
> >
> > BJ|||May be this helps.
=MonthName(format(Parameters!date.Value.addmonths(-1),"MM"))
"Ben Sullins" <BenSullins@.discussions.microsoft.com> wrote in message
news:EE5DCBC0-870F-4D99-B147-D6EDA3747B8B@.microsoft.com...
> Is this possible with a report parameter?
> I have a date being passed in and I need to display the previous month of
> that date. So in a text box I put this
> =datetime.parameter!startdate.addmonths(-1).tostring("MMMM")
> but get only errors.
> Has anyone had to do this before?
>
> "Charles Kangai" wrote:
> > You can use the expression: =Now().AddMonths(-1)
> > If you want to format it the way you have in your question, you can do
use
> > the expression: =format(Now().AddMonths(-1), "MMMM yyyy")
> >
> > Charles Kangai, MCT, MCDBA
> >
> > "BJ Castrellon" wrote:
> >
> > > I'm failry new to Reporting Services and I need to put the name of the
> > > previous month into the Report Header. For example I need it to look
like
> > > "November 2004..." How would I go about getting this into the Report
Header.
> > >
> > > Thanks in advance,
> > >
> > > BJ|||That didn't work but I was able to find this peice that did..
CDate(Parameters!startdate.Value).AddMonths(-1).ToString("MMMM")
"saglamtimur" wrote:
> May be this helps.
> =MonthName(format(Parameters!date.Value.addmonths(-1),"MM"))
>
> "Ben Sullins" <BenSullins@.discussions.microsoft.com> wrote in message
> news:EE5DCBC0-870F-4D99-B147-D6EDA3747B8B@.microsoft.com...
> > Is this possible with a report parameter?
> >
> > I have a date being passed in and I need to display the previous month of
> > that date. So in a text box I put this
> > =datetime.parameter!startdate.addmonths(-1).tostring("MMMM")
> > but get only errors.
> >
> > Has anyone had to do this before?
> >
> >
> > "Charles Kangai" wrote:
> >
> > > You can use the expression: =Now().AddMonths(-1)
> > > If you want to format it the way you have in your question, you can do
> use
> > > the expression: =format(Now().AddMonths(-1), "MMMM yyyy")
> > >
> > > Charles Kangai, MCT, MCDBA
> > >
> > > "BJ Castrellon" wrote:
> > >
> > > > I'm failry new to Reporting Services and I need to put the name of the
> > > > previous month into the Report Header. For example I need it to look
> like
> > > > "November 2004..." How would I go about getting this into the Report
> Header.
> > > >
> > > > Thanks in advance,
> > > >
> > > > BJ
>
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment