Showing posts with label pull. Show all posts
Showing posts with label pull. Show all posts

Thursday, March 29, 2012

Formula help ... With Dates

I am pulling in the 2 digit month 01,02,03 etc.... and the four digit year(2005)
I want a formula to only pull the previous 12 months...
Any help... Ideas? I am fairly new to CR... not good w/ the formulas yet.Create a formula and put your date field in there and subtract 365 (the number of days in a year. Also, there is a Year(X) function, this should also prove to be useful.sql

Monday, March 19, 2012

Formatting database content

Hi
I have set up a SQL database to contain alist FAQ's for our company and
then plan to pull this info off using a web page.

So far I have entered the data but I am unable to control how it is
displayed inside SQL ie I cannot enter new blank lines I have tried
using lots of spaces but this does not work when I use the website to
display the info.

Is there a way of formatting and editing the data in the sql database
as I am unable to do this, if I try to edit the data in the database I
have to copy it to notepad delete what is in the database, edit the
text in notepad then paste it back in.

There must be a better way.

Please help

alamb200Sounds as if you need to convert your carraige return / line feed into the
HTML <BR> tag which will then give you the correct formatting on the screen.

If you want to do it in the database then use REPLACE( <col>, char(13) +
char(10), '<BR>' ) - check, it might be 10, 13 :)

Tony

--
Tony Rogerson
SQL Server MVP
http://sqlserverfaq.com - free video tutorials

<alamb200@.hotmail.com> wrote in message
news:1147771818.200249.269650@.j55g2000cwa.googlegr oups.com...
> Hi
> I have set up a SQL database to contain alist FAQ's for our company and
> then plan to pull this info off using a web page.
> So far I have entered the data but I am unable to control how it is
> displayed inside SQL ie I cannot enter new blank lines I have tried
> using lots of spaces but this does not work when I use the website to
> display the info.
> Is there a way of formatting and editing the data in the sql database
> as I am unable to do this, if I try to edit the data in the database I
> have to copy it to notepad delete what is in the database, edit the
> text in notepad then paste it back in.
> There must be a better way.
> Please help
> alamb200|||I have just had a look at the parameter tag but as I am new to SQL I am
not sure how I would put this place.

For example if my prefix charecter was / and my suffix charecter was \
for the sake of argument nad i wanted a new line after the full stop
in the following text how would I enter the information.

If your printer is no longer printing your logo's or overlays it may
have lost the images that have been "Flashed" on to it, to reflash your
printer follow the following instructions. Log on to SB Client and go
into the Company Files section. Next goto Runtime then Maintenance and
System Manager Menu.

Also I seem to be unable to edit text already in the database and have
to delete it and reenter it every time, is there an easier way of doing
that.

Thanks

Anthony

Tony Rogerson wrote:
> Sounds as if you need to convert your carraige return / line feed into the
> HTML <BR> tag which will then give you the correct formatting on the screen.
> If you want to do it in the database then use REPLACE( <col>, char(13) +
> char(10), '<BR>' ) - check, it might be 10, 13 :)
> Tony
> --
> Tony Rogerson
> SQL Server MVP
> http://sqlserverfaq.com - free video tutorials
>
> <alamb200@.hotmail.com> wrote in message
> news:1147771818.200249.269650@.j55g2000cwa.googlegr oups.com...
> > Hi
> > I have set up a SQL database to contain alist FAQ's for our company and
> > then plan to pull this info off using a web page.
> > So far I have entered the data but I am unable to control how it is
> > displayed inside SQL ie I cannot enter new blank lines I have tried
> > using lots of spaces but this does not work when I use the website to
> > display the info.
> > Is there a way of formatting and editing the data in the sql database
> > as I am unable to do this, if I try to edit the data in the database I
> > have to copy it to notepad delete what is in the database, edit the
> > text in notepad then paste it back in.
> > There must be a better way.
> > Please help
> > alamb200|||On 16 May 2006 04:13:58 -0700, alamb200@.hotmail.com wrote:

>I have just had a look at the parameter tag but as I am new to SQL I am
>not sure how I would put this place.
>For example if my prefix charecter was / and my suffix charecter was \
>for the sake of argument nad i wanted a new line after the full stop
>in the following text how would I enter the information.

Hi Anthony,

wiith the right front-end, there's no need to use parameters. For
instance, copy and paste the following into Query Analyzer and execute;
you'll see that the output has exactly the lline breaks yoou asked for:

CREATE TABLE test (KeyColumn int NOT NULL PRIMARY KEY,
DataColumn varchar(1000) NOT NULL)
INSERT INTO test (KeyColumn, DataColumn)
VALUES (1, 'If your printer is no longer printing your logo''s or
overlays it may have lost the images that have been "Flashed" on to it,
to reflash your printer follow the following instructions.
Log on to SB Client and go into the Company Files section.
Next goto Runtime then Maintenance and System Manager Menu.')
go
SELECT * FROM test
go
DROP TABLE test
go

(Note: beware of extra line breaks inserted by Usenet software. In the
intended code, there are line breaks after the periods, but no other
line breaks in the VALUES clause.)

>Also I seem to be unable to edit text already in the database and have
>to delete it and reenter it every time, is there an easier way of doing
>that.

That, too, is a problem with your frontend.

May I ask you what tool you are using as your frontend?

--
Hugo Kornelis, SQL Server MVP|||Hi

I am using a web page as my front end using ASP to pull the info from
the SQL database so I am in the position of either having multiple
columns with small bits of info in my database so I can format them how
I want

The other option is to have some commands built into the text in the
database entry which will be read by the system and control the
formatting when it is read.

Is this possible?

When I am trying to edit the info in the database all I am doing is
right clicking on the table in Enterprise manager and display all
columns and working on it from there.

Is this the right way to do this?

Anthony

Hugo Kornelis wrote:
> On 16 May 2006 04:13:58 -0700, alamb200@.hotmail.com wrote:
> >I have just had a look at the parameter tag but as I am new to SQL I am
> >not sure how I would put this place.
> >For example if my prefix charecter was / and my suffix charecter was \
> >for the sake of argument nad i wanted a new line after the full stop
> >in the following text how would I enter the information.
> Hi Anthony,
> wiith the right front-end, there's no need to use parameters. For
> instance, copy and paste the following into Query Analyzer and execute;
> you'll see that the output has exactly the lline breaks yoou asked for:
> CREATE TABLE test (KeyColumn int NOT NULL PRIMARY KEY,
> DataColumn varchar(1000) NOT NULL)
> INSERT INTO test (KeyColumn, DataColumn)
> VALUES (1, 'If your printer is no longer printing your logo''s or
> overlays it may have lost the images that have been "Flashed" on to it,
> to reflash your printer follow the following instructions.
> Log on to SB Client and go into the Company Files section.
> Next goto Runtime then Maintenance and System Manager Menu.')
> go
> SELECT * FROM test
> go
> DROP TABLE test
> go
> (Note: beware of extra line breaks inserted by Usenet software. In the
> intended code, there are line breaks after the periods, but no other
> line breaks in the VALUES clause.)
> >Also I seem to be unable to edit text already in the database and have
> >to delete it and reenter it every time, is there an easier way of doing
> >that.
> That, too, is a problem with your frontend.
> May I ask you what tool you are using as your frontend?
> --
> Hugo Kornelis, SQL Server MVP|||On 17 May 2006 02:01:41 -0700, alamb200@.hotmail.com wrote:

>Hi
>I am using a web page as my front end using ASP to pull the info from
>the SQL database so I am in the position of either having multiple
>columns with small bits of info in my database so I can format them how
>I want
>The other option is to have some commands built into the text in the
>database entry which will be read by the system and control the
>formatting when it is read.
>Is this possible?

Hi Anthony,

I'm not an ASP guy, so I don't know. Are you saying that linebreaks in a
long character data column are not displayed properly by ASP? Have you
consiedered asking for alternatives in one of the ASP groups?

>When I am trying to edit the info in the database all I am doing is
>right clicking on the table in Enterprise manager and display all
>columns and working on it from there.
>Is this the right way to do this?

No, definitely not. Data entry through Enterprise Manager is broken in
far more ways than I care to remember. Some of these errors are listed
by Aaron Bertrand at http://www.aspfaq.com/show.asp?id=2455.

--
Hugo Kornelis, SQL Server MVP|||Hi

Go to http://212.50.191.220/techfaq and enter restart in the search box
in the bottom center this pops up a new page of info pulled from my SQL
database. As you can see it can be difficult to read so I would like to
add some line breaks and if possible some other formatting.

When I pull the info in it comes as one big lump of text so ASP cannot
format it what I beleive from one of my earlier replies is that I can
embed some commands into the text held in the entry to be pulled out of
the database that ASP can read and turn into html formatting when it is
displayed on the page.

Is this correct and if so how do I add them.

Anthony
Hugo Kornelis wrote:
> On 17 May 2006 02:01:41 -0700, alamb200@.hotmail.com wrote:
> >Hi
> >I am using a web page as my front end using ASP to pull the info from
> >the SQL database so I am in the position of either having multiple
> >columns with small bits of info in my database so I can format them how
> >I want
> >The other option is to have some commands built into the text in the
> >database entry which will be read by the system and control the
> >formatting when it is read.
> >Is this possible?
> Hi Anthony,
> I'm not an ASP guy, so I don't know. Are you saying that linebreaks in a
> long character data column are not displayed properly by ASP? Have you
> consiedered asking for alternatives in one of the ASP groups?
> >When I am trying to edit the info in the database all I am doing is
> >right clicking on the table in Enterprise manager and display all
> >columns and working on it from there.
> >Is this the right way to do this?
> No, definitely not. Data entry through Enterprise Manager is broken in
> far more ways than I care to remember. Some of these errors are listed
> by Aaron Bertrand at http://www.aspfaq.com/show.asp?id=2455.
> --
> Hugo Kornelis, SQL Server MVP|||On 18 May 2006 06:53:21 -0700, alamb200@.hotmail.com wrote:

>Hi
>Go to http://212.50.191.220/techfaq

"The page cannot be found"

>When I pull the info in it comes as one big lump of text so ASP cannot
>format it

I can only repeat my previous suggestion: if ASP has trouble retaining
embedded CR/LF combinations from a varchar column, then the best place
to seek help is an ASP group.

--
Hugo Kornelis, SQL Server MVP|||(alamb200@.hotmail.com) writes:
> When I pull the info in it comes as one big lump of text so ASP cannot
> format it what I beleive from one of my earlier replies is that I can
> embed some commands into the text held in the entry to be pulled out of
> the database that ASP can read and turn into html formatting when it is
> displayed on the page.

Neither do I know much ASP, but I would assume that if you get some
text from the database, and spit it out between regular <P> tags,
that any line breaks will be blissfully ignored, as that is how HTML
works.

You could use the <PRE> tag to maintain the line-breaks, but the text
would be presented in a monospaced font, so it may look a bit ugly.

You could run this:

SELECT replace(col, char(13) + char(10), <BR />)

to change line breaks to <BR /> tags. The <BR /> introduces a line break
in the text.

You could also store the text in HTML format.

But as Hugo says, asking in an ASP group is probably a good idea.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

Friday, March 9, 2012

Formating

I am creating an extraction routine and need to pull out an invoice number
from a table. However as part of transferring this to a new system I need to
add leading zeroes to the front of the field.
eg 456 into 000456.
I`m sure I am having brain fade here but can`t think of the way to do this.
Any help gratefully received.SELECT RIGHT('000000' + CONVERT(varchar(20),456),6)
HTH, Jens Suessmeyer.

Sunday, February 26, 2012

Format money MS SQL field data as number with commas and no decimals

If I pull a value from a MSSQL field with is defined as money, how can I get it to display in a textbox with commas and NO decimals?

87000.0000 = 87,000

I can currently remove the decimals like below but is there a way to add the commas as well?

decRevenue = drMyData("Revenue")

txtRevenue.Text = decRevenue.ToString("f0")

It current shows "87000".

http://msdn2.microsoft.com/en-us/library/dwhawy9k(VS.80).aspx

Friday, February 24, 2012

Format data?

1. What format should i use to change data from '32560' to this '32,560' ?
2. How can i pull data for previous 13 months?"GGill" wrote:
> 1. What format should i use to change data from '32560' to this '32,560' ?
[ user FormatCurrency in the expression ]
> 2. How can i pull data for previous 13 months?
[You can do this like where yourdatecolumn > DATEADD(month, -13,
getdate())] you can do this in different ways also..|||1. If i use FormatCurrency then it will show data with '$32,560.00'. i need
to view like this '32,560'
I used Format - 'N' and it shows '32,560.00' . How to change decimal to 0 so
i will not see last two 0's?
2. In my report i need to change format to E_Month field;
from this data '200502' change format to this '02/2005' and then i need to
show previous 13 months?
"Sriman" wrote:
> "GGill" wrote:
> > 1. What format should i use to change data from '32560' to this '32,560' ?
> [ user FormatCurrency in the expression ]
> >
> > 2. How can i pull data for previous 13 months?
> [You can do this like where yourdatecolumn > DATEADD(month, -13,
> getdate())] you can do this in different ways also..|||Ignore question #1, I fixed that problem.
I used Format - N0.
I still have problem with month format question #2 '
"GGill" wrote:
> 1. If i use FormatCurrency then it will show data with '$32,560.00'. i need
> to view like this '32,560'
> I used Format - 'N' and it shows '32,560.00' . How to change decimal to 0 so
> i will not see last two 0's?
> 2. In my report i need to change format to E_Month field;
> from this data '200502' change format to this '02/2005' and then i need to
> show previous 13 months?
> "Sriman" wrote:
> > "GGill" wrote:
> >
> > > 1. What format should i use to change data from '32560' to this '32,560' ?
> > [ user FormatCurrency in the expression ]
> > >
> > > 2. How can i pull data for previous 13 months?
> > [You can do this like where yourdatecolumn > DATEADD(month, -13,
> > getdate())] you can do this in different ways also..|||I'm not sure what you mean when you say 'Show the 13 previous months', but if
your trying to figure out what 13 months prior would be, just use the DateAdd
function
DateAdd(m,-13,E_Date)
You may require changing "E_Month" into a date like:
E_Date=Right(EMonth,2) & "/01/" & Left(EMonth,4)
"GGill" wrote:
> Ignore question #1, I fixed that problem.
> I used Format - N0.
> I still have problem with month format question #2 '
> "GGill" wrote:
> > 1. If i use FormatCurrency then it will show data with '$32,560.00'. i need
> > to view like this '32,560'
> > I used Format - 'N' and it shows '32,560.00' . How to change decimal to 0 so
> > i will not see last two 0's?
> > 2. In my report i need to change format to E_Month field;
> > from this data '200502' change format to this '02/2005' and then i need to
> > show previous 13 months?
> >
> > "Sriman" wrote:
> >
> > > "GGill" wrote:
> > >
> > > > 1. What format should i use to change data from '32560' to this '32,560' ?
> > > [ user FormatCurrency in the expression ]
> > > >
> > > > 2. How can i pull data for previous 13 months?
> > > [You can do this like where yourdatecolumn > DATEADD(month, -13,
> > > getdate())] you can do this in different ways also..|||Where should i add this in my report
E_Date=Right(EMonth,2) & "/01/" & Left(EMonth,4)
"Michael C" wrote:
> I'm not sure what you mean when you say 'Show the 13 previous months', but if
> your trying to figure out what 13 months prior would be, just use the DateAdd
> function
> DateAdd(m,-13,E_Date)
> You may require changing "E_Month" into a date like:
> E_Date=Right(EMonth,2) & "/01/" & Left(EMonth,4)
> "GGill" wrote:
> > Ignore question #1, I fixed that problem.
> > I used Format - N0.
> >
> > I still have problem with month format question #2 '
> >
> > "GGill" wrote:
> >
> > > 1. If i use FormatCurrency then it will show data with '$32,560.00'. i need
> > > to view like this '32,560'
> > > I used Format - 'N' and it shows '32,560.00' . How to change decimal to 0 so
> > > i will not see last two 0's?
> > > 2. In my report i need to change format to E_Month field;
> > > from this data '200502' change format to this '02/2005' and then i need to
> > > show previous 13 months?
> > >
> > > "Sriman" wrote:
> > >
> > > > "GGill" wrote:
> > > >
> > > > > 1. What format should i use to change data from '32560' to this '32,560' ?
> > > > [ user FormatCurrency in the expression ]
> > > > >
> > > > > 2. How can i pull data for previous 13 months?
> > > > [You can do this like where yourdatecolumn > DATEADD(month, -13,
> > > > getdate())] you can do this in different ways also..|||Thank you.
It works.
"GGill" wrote:
> Where should i add this in my report
> E_Date=Right(EMonth,2) & "/01/" & Left(EMonth,4)
>
> "Michael C" wrote:
> > I'm not sure what you mean when you say 'Show the 13 previous months', but if
> > your trying to figure out what 13 months prior would be, just use the DateAdd
> > function
> >
> > DateAdd(m,-13,E_Date)
> >
> > You may require changing "E_Month" into a date like:
> >
> > E_Date=Right(EMonth,2) & "/01/" & Left(EMonth,4)
> >
> > "GGill" wrote:
> >
> > > Ignore question #1, I fixed that problem.
> > > I used Format - N0.
> > >
> > > I still have problem with month format question #2 '
> > >
> > > "GGill" wrote:
> > >
> > > > 1. If i use FormatCurrency then it will show data with '$32,560.00'. i need
> > > > to view like this '32,560'
> > > > I used Format - 'N' and it shows '32,560.00' . How to change decimal to 0 so
> > > > i will not see last two 0's?
> > > > 2. In my report i need to change format to E_Month field;
> > > > from this data '200502' change format to this '02/2005' and then i need to
> > > > show previous 13 months?
> > > >
> > > > "Sriman" wrote:
> > > >
> > > > > "GGill" wrote:
> > > > >
> > > > > > 1. What format should i use to change data from '32560' to this '32,560' ?
> > > > > [ user FormatCurrency in the expression ]
> > > > > >
> > > > > > 2. How can i pull data for previous 13 months?
> > > > > [You can do this like where yourdatecolumn > DATEADD(month, -13,
> > > > > getdate())] you can do this in different ways also..|||Well, that really depends on your report, but if your trying to pull all the
data from the E_Month and back 13 months then I would add it to your dataset
(SQL).
SELECT *
FROM MySource
WHERE
E_Month BETWEEN
CDate(Right(EMonth,2) & "/01/" & Left(EMonth,4))
AND
DateAdd(m,-13,Right(EMonth,2) & "/01/" &
Left(EMonth,4))
Micahel
"GGill" wrote:
> Where should i add this in my report
> E_Date=Right(EMonth,2) & "/01/" & Left(EMonth,4)
>
> "Michael C" wrote:
> > I'm not sure what you mean when you say 'Show the 13 previous months', but if
> > your trying to figure out what 13 months prior would be, just use the DateAdd
> > function
> >
> > DateAdd(m,-13,E_Date)
> >
> > You may require changing "E_Month" into a date like:
> >
> > E_Date=Right(EMonth,2) & "/01/" & Left(EMonth,4)
> >
> > "GGill" wrote:
> >
> > > Ignore question #1, I fixed that problem.
> > > I used Format - N0.
> > >
> > > I still have problem with month format question #2 '
> > >
> > > "GGill" wrote:
> > >
> > > > 1. If i use FormatCurrency then it will show data with '$32,560.00'. i need
> > > > to view like this '32,560'
> > > > I used Format - 'N' and it shows '32,560.00' . How to change decimal to 0 so
> > > > i will not see last two 0's?
> > > > 2. In my report i need to change format to E_Month field;
> > > > from this data '200502' change format to this '02/2005' and then i need to
> > > > show previous 13 months?
> > > >
> > > > "Sriman" wrote:
> > > >
> > > > > "GGill" wrote:
> > > > >
> > > > > > 1. What format should i use to change data from '32560' to this '32,560' ?
> > > > > [ user FormatCurrency in the expression ]
> > > > > >
> > > > > > 2. How can i pull data for previous 13 months?
> > > > > [You can do this like where yourdatecolumn > DATEADD(month, -13,
> > > > > getdate())] you can do this in different ways also..|||Thank you.
Works great.
"Michael C" wrote:
> Well, that really depends on your report, but if your trying to pull all the
> data from the E_Month and back 13 months then I would add it to your dataset
> (SQL).
> SELECT *
> FROM MySource
> WHERE
> E_Month BETWEEN
> CDate(Right(EMonth,2) & "/01/" & Left(EMonth,4))
> AND
> DateAdd(m,-13,Right(EMonth,2) & "/01/" &
> Left(EMonth,4))
> Micahel
>
> "GGill" wrote:
> > Where should i add this in my report
> >
> > E_Date=Right(EMonth,2) & "/01/" & Left(EMonth,4)
> >
> >
> > "Michael C" wrote:
> >
> > > I'm not sure what you mean when you say 'Show the 13 previous months', but if
> > > your trying to figure out what 13 months prior would be, just use the DateAdd
> > > function
> > >
> > > DateAdd(m,-13,E_Date)
> > >
> > > You may require changing "E_Month" into a date like:
> > >
> > > E_Date=Right(EMonth,2) & "/01/" & Left(EMonth,4)
> > >
> > > "GGill" wrote:
> > >
> > > > Ignore question #1, I fixed that problem.
> > > > I used Format - N0.
> > > >
> > > > I still have problem with month format question #2 '
> > > >
> > > > "GGill" wrote:
> > > >
> > > > > 1. If i use FormatCurrency then it will show data with '$32,560.00'. i need
> > > > > to view like this '32,560'
> > > > > I used Format - 'N' and it shows '32,560.00' . How to change decimal to 0 so
> > > > > i will not see last two 0's?
> > > > > 2. In my report i need to change format to E_Month field;
> > > > > from this data '200502' change format to this '02/2005' and then i need to
> > > > > show previous 13 months?
> > > > >
> > > > > "Sriman" wrote:
> > > > >
> > > > > > "GGill" wrote:
> > > > > >
> > > > > > > 1. What format should i use to change data from '32560' to this '32,560' ?
> > > > > > [ user FormatCurrency in the expression ]
> > > > > > >
> > > > > > > 2. How can i pull data for previous 13 months?
> > > > > > [You can do this like where yourdatecolumn > DATEADD(month, -13,
> > > > > > getdate())] you can do this in different ways also..|||My pleasure, glad I could help.
Michael
"GGill" wrote:
> Thank you.
> Works great.
> "Michael C" wrote:
> > Well, that really depends on your report, but if your trying to pull all the
> > data from the E_Month and back 13 months then I would add it to your dataset
> > (SQL).
> >
> > SELECT *
> > FROM MySource
> > WHERE
> > E_Month BETWEEN
> > CDate(Right(EMonth,2) & "/01/" & Left(EMonth,4))
> > AND
> > DateAdd(m,-13,Right(EMonth,2) & "/01/" &
> > Left(EMonth,4))
> >
> > Micahel
> >
> >
> > "GGill" wrote:
> >
> > > Where should i add this in my report
> > >
> > > E_Date=Right(EMonth,2) & "/01/" & Left(EMonth,4)
> > >
> > >
> > > "Michael C" wrote:
> > >
> > > > I'm not sure what you mean when you say 'Show the 13 previous months', but if
> > > > your trying to figure out what 13 months prior would be, just use the DateAdd
> > > > function
> > > >
> > > > DateAdd(m,-13,E_Date)
> > > >
> > > > You may require changing "E_Month" into a date like:
> > > >
> > > > E_Date=Right(EMonth,2) & "/01/" & Left(EMonth,4)
> > > >
> > > > "GGill" wrote:
> > > >
> > > > > Ignore question #1, I fixed that problem.
> > > > > I used Format - N0.
> > > > >
> > > > > I still have problem with month format question #2 '
> > > > >
> > > > > "GGill" wrote:
> > > > >
> > > > > > 1. If i use FormatCurrency then it will show data with '$32,560.00'. i need
> > > > > > to view like this '32,560'
> > > > > > I used Format - 'N' and it shows '32,560.00' . How to change decimal to 0 so
> > > > > > i will not see last two 0's?
> > > > > > 2. In my report i need to change format to E_Month field;
> > > > > > from this data '200502' change format to this '02/2005' and then i need to
> > > > > > show previous 13 months?
> > > > > >
> > > > > > "Sriman" wrote:
> > > > > >
> > > > > > > "GGill" wrote:
> > > > > > >
> > > > > > > > 1. What format should i use to change data from '32560' to this '32,560' ?
> > > > > > > [ user FormatCurrency in the expression ]
> > > > > > > >
> > > > > > > > 2. How can i pull data for previous 13 months?
> > > > > > > [You can do this like where yourdatecolumn > DATEADD(month, -13,
> > > > > > > getdate())] you can do this in different ways also..|||On Jul 17, 12:56 pm, GGill <GG...@.discussions.microsoft.com> wrote:
> 1. What format should i use to change data from '32560' to this '32,560' ?
> 2. How can i pull data for previous 13 months?
1. In the Format section of the Properties window (F4), enter in:
#,0
2. If you do not want to do this in the stored procedure/query that
sources the report, you can filter the table/matrix control's data
(via: right-click the top-left of a table/matrix control -> select
Properties -> select the Filters tab) w/an expression similar to the
following:
set the Expression to something like: =Fields!SomeFieldName.Value; set
the Operator equal '>'; set the Value to: =DateAdd("m", -13, Now())
Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant