In layout view: how do I group all the company names together who have the same value for a certain field? For instance, 10 companies all have the same booth size, but in Preview mode, it lists each company seprately with the booth size on each line. I need to have the booth size listed once with all the companies who share that common size. I have tried adding a group and using the expression for the company name as well as the booth size and it does not work. Can someone provide some detailed instructions?
Thank you,
Bil
From http://www.developmentnow.com/g/115_0_0_0_0_0/sql-server-reporting-services.ht
Posted via DevelopmentNow.com Group
http://www.developmentnow.comIf I am understanding correctly you want to have the booth size and then
show all companies under that that match that description. Have you tried
grouping it by the booth size and then put your companies in the detail?
"Bkana" <nospam@.developmentnow.com> wrote in message
news:97f68ac4-a6e2-429d-a4e5-3b98fed63020@.developmentnow.com...
> In layout view: how do I group all the company names together who have the
> same value for a certain field? For instance, 10 companies all have the
> same booth size, but in Preview mode, it lists each company seprately with
> the booth size on each line. I need to have the booth size listed once
> with all the companies who share that common size. I have tried adding a
> group and using the expression for the company name as well as the booth
> size and it does not work. Can someone provide some detailed instructions?
> Thank you,
> Bill
> From
> http://www.developmentnow.com/g/115_0_0_0_0_0/sql-server-reporting-services.htm
> Posted via DevelopmentNow.com Groups
> http://www.developmentnow.com
Showing posts with label instance. Show all posts
Showing posts with label instance. Show all posts
Friday, March 30, 2012
Monday, March 12, 2012
Group by, ignore common words
When using GROUP BY to sort the results of a select statement, is it
possible to have it ignore certain common words. i.e "The", "A".
For instance, say you were sorting a list of book titles; you would
want "The Promise of Happiness" to be near "Pride and Prejudice", not
"Theatre Talk: Voices of Irish Theatre Practitioners".
Thanks.A) GROUP BY is not used for sorting. Use ORDER BY for sorting. GROUP BY
can use other algorithms than sorting for what it does (grouping) so it
can't be trusted to always return a sorted order.
B) Not easily... Can you store 'The Promise of Happiness" as "Promise of
Happiness, The" ?
Adam Machanic
SQL Server MVP
http://www.sqljunkies.com/weblog/amachanic
--
"never-aways" <nospam@.nospam.com> wrote in message
news:rbtr21l5lnfu33brj4it87rornnf9ubfcl@.
4ax.com...
> When using GROUP BY to sort the results of a select statement, is it
> possible to have it ignore certain common words. i.e "The", "A".
> For instance, say you were sorting a list of book titles; you would
> want "The Promise of Happiness" to be near "Pride and Prejudice", not
> "Theatre Talk: Voices of Irish Theatre Practitioners".
> Thanks.|||What about creating a user defined function that returns the "stripped"
value? You could order by on that.|||What about using this in the order by
SELECT
BookTitle
FROM
BookTitles
ORDER BY
REPLACE(SUBSTRING(BookTitle, 1, 4), 'The ', '') +
SUBSTRING(BookTitle, 5, LEN(BookTitle))
It should work, as long as there aren't any other characters except a space
after "the".
Simon Worth
"never-aways" <nospam@.nospam.com> wrote in message
news:rbtr21l5lnfu33brj4it87rornnf9ubfcl@.
4ax.com...
> When using GROUP BY to sort the results of a select statement, is it
> possible to have it ignore certain common words. i.e "The", "A".
> For instance, say you were sorting a list of book titles; you would
> want "The Promise of Happiness" to be near "Pride and Prejudice", not
> "Theatre Talk: Voices of Irish Theatre Practitioners".
> Thanks.
possible to have it ignore certain common words. i.e "The", "A".
For instance, say you were sorting a list of book titles; you would
want "The Promise of Happiness" to be near "Pride and Prejudice", not
"Theatre Talk: Voices of Irish Theatre Practitioners".
Thanks.A) GROUP BY is not used for sorting. Use ORDER BY for sorting. GROUP BY
can use other algorithms than sorting for what it does (grouping) so it
can't be trusted to always return a sorted order.
B) Not easily... Can you store 'The Promise of Happiness" as "Promise of
Happiness, The" ?
Adam Machanic
SQL Server MVP
http://www.sqljunkies.com/weblog/amachanic
--
"never-aways" <nospam@.nospam.com> wrote in message
news:rbtr21l5lnfu33brj4it87rornnf9ubfcl@.
4ax.com...
> When using GROUP BY to sort the results of a select statement, is it
> possible to have it ignore certain common words. i.e "The", "A".
> For instance, say you were sorting a list of book titles; you would
> want "The Promise of Happiness" to be near "Pride and Prejudice", not
> "Theatre Talk: Voices of Irish Theatre Practitioners".
> Thanks.|||What about creating a user defined function that returns the "stripped"
value? You could order by on that.|||What about using this in the order by
SELECT
BookTitle
FROM
BookTitles
ORDER BY
REPLACE(SUBSTRING(BookTitle, 1, 4), 'The ', '') +
SUBSTRING(BookTitle, 5, LEN(BookTitle))
It should work, as long as there aren't any other characters except a space
after "the".
Simon Worth
"never-aways" <nospam@.nospam.com> wrote in message
news:rbtr21l5lnfu33brj4it87rornnf9ubfcl@.
4ax.com...
> When using GROUP BY to sort the results of a select statement, is it
> possible to have it ignore certain common words. i.e "The", "A".
> For instance, say you were sorting a list of book titles; you would
> want "The Promise of Happiness" to be near "Pride and Prejudice", not
> "Theatre Talk: Voices of Irish Theatre Practitioners".
> Thanks.
Wednesday, March 7, 2012
GROUP BY on same line?
Hi,
I want to do a group by in a Report (RS 2005), but the group by has to be on
the same line. For instance:
Imagine I have a table tblPerson (Name, FirtsName, Country, DateOfBirth,
...)
- Simpson, Homer, USA, 12-12-1970
- Johnson, Bart, Belgium, 05-02-1978
and a tblCars (Brand, Color, Year)
- Toyota, Blue, 2000
- Ford, Red, 2002
- Mercedes, Yellow, 1998
And Homer has the totyota and the Ford, and Bart has the Mercedes.
I would like to have my report-output like this:
Simpson, Homer, USA, Totoya, Blue
Ford, Red
Johnson, Bart, Belgium, Mercedes, Yellow
And not like this:
Simpson, Homer, USA
Totoya, Blue
Ford, Red
Johnson, Bart, Belgium
Mercedes, Yellow
How can I do this?
Thanks a lot in advance,
PieterHi,
Can be done. Done give the Give the "Name" e.g. Simpson in group header.
Instead give it in the detail itself and just right click the name field
textbox and check the "hide duplicate"
Amarnath
"Pieter Coucke" wrote:
> Hi,
> I want to do a group by in a Report (RS 2005), but the group by has to be on
> the same line. For instance:
> Imagine I have a table tblPerson (Name, FirtsName, Country, DateOfBirth,
> ...)
> - Simpson, Homer, USA, 12-12-1970
> - Johnson, Bart, Belgium, 05-02-1978
> and a tblCars (Brand, Color, Year)
> - Toyota, Blue, 2000
> - Ford, Red, 2002
> - Mercedes, Yellow, 1998
> And Homer has the totyota and the Ford, and Bart has the Mercedes.
> I would like to have my report-output like this:
> Simpson, Homer, USA, Totoya, Blue
> Ford, Red
> Johnson, Bart, Belgium, Mercedes, Yellow
> And not like this:
> Simpson, Homer, USA
> Totoya, Blue
> Ford, Red
> Johnson, Bart, Belgium
> Mercedes, Yellow
> How can I do this?
> Thanks a lot in advance,
> Pieter
>
>|||Thanks! That worked!
I want to do a group by in a Report (RS 2005), but the group by has to be on
the same line. For instance:
Imagine I have a table tblPerson (Name, FirtsName, Country, DateOfBirth,
...)
- Simpson, Homer, USA, 12-12-1970
- Johnson, Bart, Belgium, 05-02-1978
and a tblCars (Brand, Color, Year)
- Toyota, Blue, 2000
- Ford, Red, 2002
- Mercedes, Yellow, 1998
And Homer has the totyota and the Ford, and Bart has the Mercedes.
I would like to have my report-output like this:
Simpson, Homer, USA, Totoya, Blue
Ford, Red
Johnson, Bart, Belgium, Mercedes, Yellow
And not like this:
Simpson, Homer, USA
Totoya, Blue
Ford, Red
Johnson, Bart, Belgium
Mercedes, Yellow
How can I do this?
Thanks a lot in advance,
PieterHi,
Can be done. Done give the Give the "Name" e.g. Simpson in group header.
Instead give it in the detail itself and just right click the name field
textbox and check the "hide duplicate"
Amarnath
"Pieter Coucke" wrote:
> Hi,
> I want to do a group by in a Report (RS 2005), but the group by has to be on
> the same line. For instance:
> Imagine I have a table tblPerson (Name, FirtsName, Country, DateOfBirth,
> ...)
> - Simpson, Homer, USA, 12-12-1970
> - Johnson, Bart, Belgium, 05-02-1978
> and a tblCars (Brand, Color, Year)
> - Toyota, Blue, 2000
> - Ford, Red, 2002
> - Mercedes, Yellow, 1998
> And Homer has the totyota and the Ford, and Bart has the Mercedes.
> I would like to have my report-output like this:
> Simpson, Homer, USA, Totoya, Blue
> Ford, Red
> Johnson, Bart, Belgium, Mercedes, Yellow
> And not like this:
> Simpson, Homer, USA
> Totoya, Blue
> Ford, Red
> Johnson, Bart, Belgium
> Mercedes, Yellow
> How can I do this?
> Thanks a lot in advance,
> Pieter
>
>|||Thanks! That worked!
Sunday, February 19, 2012
Grid mode, Query Analyzer
Hi,
Does anyone know how to force Query Analyzer in Grid mode
to return results in chunks like it is in Text Mode? For
instance, when I have a query that returns results in a
loop, in Grid mode I would have to wait until the loop
exits to see the whole lot of them. With Text mode it's
different - I see results as I go.
--
Thanks,
OskarI do not think this is possible. Speaking as a developer, the grids in QA
auto adjusts their width taking into account the length of the header and
data, which would only be possible once you've loaded all the data into the
grid.
--
Peter Yeoh
http://www.yohz.com
Need smaller SQL2K backup files? Use MiniSQLBackup Lite, free!
"Oskar" <anonymous@.discussions.microsoft.com> wrote in message
news:086101c4b1b2$df5fd070$a401280a@.phx.gbl...
> Hi,
> Does anyone know how to force Query Analyzer in Grid mode
> to return results in chunks like it is in Text Mode? For
> instance, when I have a query that returns results in a
> loop, in Grid mode I would have to wait until the loop
> exits to see the whole lot of them. With Text mode it's
> different - I see results as I go.
> --
> Thanks,
> Oskar
>|||I can't see a problem here: each result returned in a loop
has its own headers and data, the length of which should
be known. Maybe Query Analyzer just can't/won't read this
information during the execution?
--
Thanks,
Oskar
>--Original Message--
>I do not think this is possible. Speaking as a
developer, the grids in QA
>auto adjusts their width taking into account the length
of the header and
>data, which would only be possible once you've loaded all
the data into the
>grid.
>--
>Peter Yeoh
>http://www.yohz.com
>Need smaller SQL2K backup files? Use MiniSQLBackup Lite,
free!
>
>"Oskar" <anonymous@.discussions.microsoft.com> wrote in
message
>news:086101c4b1b2$df5fd070$a401280a@.phx.gbl...
>> Hi,
>> Does anyone know how to force Query Analyzer in Grid
mode
>> to return results in chunks like it is in Text Mode? For
>> instance, when I have a query that returns results in a
>> loop, in Grid mode I would have to wait until the loop
>> exits to see the whole lot of them. With Text mode it's
>> different - I see results as I go.
>> --
>> Thanks,
>> Oskar
>
>.
>|||You mean there are multiple result sets returned? Then you're right, QA
(theoretically) should be able to display each result set as they come in.
--
Peter Yeoh
http://www.yohz.com
Need smaller SQL2K backup files? Use MiniSQLBackup Lite, free!
"Oskar" <anonymous@.discussions.microsoft.com> wrote in message
news:2de601c4b1c0$5c2592e0$a501280a@.phx.gbl...
> I can't see a problem here: each result returned in a loop
> has its own headers and data, the length of which should
> be known. Maybe Query Analyzer just can't/won't read this
> information during the execution?
> --
> Thanks,
> Oskar
> >--Original Message--
> >I do not think this is possible. Speaking as a
> developer, the grids in QA
> >auto adjusts their width taking into account the length
> of the header and
> >data, which would only be possible once you've loaded all
> the data into the
> >grid.
> >
> >--
> >Peter Yeoh
> >http://www.yohz.com
> >Need smaller SQL2K backup files? Use MiniSQLBackup Lite,
> free!
> >
> >
> >"Oskar" <anonymous@.discussions.microsoft.com> wrote in
> message
> >news:086101c4b1b2$df5fd070$a401280a@.phx.gbl...
> >> Hi,
> >>
> >> Does anyone know how to force Query Analyzer in Grid
> mode
> >> to return results in chunks like it is in Text Mode? For
> >> instance, when I have a query that returns results in a
> >> loop, in Grid mode I would have to wait until the loop
> >> exits to see the whole lot of them. With Text mode it's
> >> different - I see results as I go.
> >>
> >> --
> >> Thanks,
> >> Oskar
> >>
> >
> >
> >.
> >|||You're right, multiple result sets.
>--Original Message--
>You mean there are multiple result sets returned? Then
you're right, QA
>(theoretically) should be able to display each result set
as they come in.
>--
>Peter Yeoh
>http://www.yohz.com
>Need smaller SQL2K backup files? Use MiniSQLBackup Lite,
free!
>
>"Oskar" <anonymous@.discussions.microsoft.com> wrote in
message
>news:2de601c4b1c0$5c2592e0$a501280a@.phx.gbl...
>> I can't see a problem here: each result returned in a
loop
>> has its own headers and data, the length of which should
>> be known. Maybe Query Analyzer just can't/won't read
this
>> information during the execution?
>> --
>> Thanks,
>> Oskar
>> >--Original Message--
>> >I do not think this is possible. Speaking as a
>> developer, the grids in QA
>> >auto adjusts their width taking into account the length
>> of the header and
>> >data, which would only be possible once you've loaded
all
>> the data into the
>> >grid.
>> >
>> >--
>> >Peter Yeoh
>> >http://www.yohz.com
>> >Need smaller SQL2K backup files? Use MiniSQLBackup
Lite,
>> free!
>> >
>> >
>> >"Oskar" <anonymous@.discussions.microsoft.com> wrote in
>> message
>> >news:086101c4b1b2$df5fd070$a401280a@.phx.gbl...
>> >> Hi,
>> >>
>> >> Does anyone know how to force Query Analyzer in Grid
>> mode
>> >> to return results in chunks like it is in Text Mode?
For
>> >> instance, when I have a query that returns results
in a
>> >> loop, in Grid mode I would have to wait until the
loop
>> >> exits to see the whole lot of them. With Text mode
it's
>> >> different - I see results as I go.
>> >>
>> >> --
>> >> Thanks,
>> >> Oskar
>> >>
>> >
>> >
>> >.
>> >
>
>.
>
Does anyone know how to force Query Analyzer in Grid mode
to return results in chunks like it is in Text Mode? For
instance, when I have a query that returns results in a
loop, in Grid mode I would have to wait until the loop
exits to see the whole lot of them. With Text mode it's
different - I see results as I go.
--
Thanks,
OskarI do not think this is possible. Speaking as a developer, the grids in QA
auto adjusts their width taking into account the length of the header and
data, which would only be possible once you've loaded all the data into the
grid.
--
Peter Yeoh
http://www.yohz.com
Need smaller SQL2K backup files? Use MiniSQLBackup Lite, free!
"Oskar" <anonymous@.discussions.microsoft.com> wrote in message
news:086101c4b1b2$df5fd070$a401280a@.phx.gbl...
> Hi,
> Does anyone know how to force Query Analyzer in Grid mode
> to return results in chunks like it is in Text Mode? For
> instance, when I have a query that returns results in a
> loop, in Grid mode I would have to wait until the loop
> exits to see the whole lot of them. With Text mode it's
> different - I see results as I go.
> --
> Thanks,
> Oskar
>|||I can't see a problem here: each result returned in a loop
has its own headers and data, the length of which should
be known. Maybe Query Analyzer just can't/won't read this
information during the execution?
--
Thanks,
Oskar
>--Original Message--
>I do not think this is possible. Speaking as a
developer, the grids in QA
>auto adjusts their width taking into account the length
of the header and
>data, which would only be possible once you've loaded all
the data into the
>grid.
>--
>Peter Yeoh
>http://www.yohz.com
>Need smaller SQL2K backup files? Use MiniSQLBackup Lite,
free!
>
>"Oskar" <anonymous@.discussions.microsoft.com> wrote in
message
>news:086101c4b1b2$df5fd070$a401280a@.phx.gbl...
>> Hi,
>> Does anyone know how to force Query Analyzer in Grid
mode
>> to return results in chunks like it is in Text Mode? For
>> instance, when I have a query that returns results in a
>> loop, in Grid mode I would have to wait until the loop
>> exits to see the whole lot of them. With Text mode it's
>> different - I see results as I go.
>> --
>> Thanks,
>> Oskar
>
>.
>|||You mean there are multiple result sets returned? Then you're right, QA
(theoretically) should be able to display each result set as they come in.
--
Peter Yeoh
http://www.yohz.com
Need smaller SQL2K backup files? Use MiniSQLBackup Lite, free!
"Oskar" <anonymous@.discussions.microsoft.com> wrote in message
news:2de601c4b1c0$5c2592e0$a501280a@.phx.gbl...
> I can't see a problem here: each result returned in a loop
> has its own headers and data, the length of which should
> be known. Maybe Query Analyzer just can't/won't read this
> information during the execution?
> --
> Thanks,
> Oskar
> >--Original Message--
> >I do not think this is possible. Speaking as a
> developer, the grids in QA
> >auto adjusts their width taking into account the length
> of the header and
> >data, which would only be possible once you've loaded all
> the data into the
> >grid.
> >
> >--
> >Peter Yeoh
> >http://www.yohz.com
> >Need smaller SQL2K backup files? Use MiniSQLBackup Lite,
> free!
> >
> >
> >"Oskar" <anonymous@.discussions.microsoft.com> wrote in
> message
> >news:086101c4b1b2$df5fd070$a401280a@.phx.gbl...
> >> Hi,
> >>
> >> Does anyone know how to force Query Analyzer in Grid
> mode
> >> to return results in chunks like it is in Text Mode? For
> >> instance, when I have a query that returns results in a
> >> loop, in Grid mode I would have to wait until the loop
> >> exits to see the whole lot of them. With Text mode it's
> >> different - I see results as I go.
> >>
> >> --
> >> Thanks,
> >> Oskar
> >>
> >
> >
> >.
> >|||You're right, multiple result sets.
>--Original Message--
>You mean there are multiple result sets returned? Then
you're right, QA
>(theoretically) should be able to display each result set
as they come in.
>--
>Peter Yeoh
>http://www.yohz.com
>Need smaller SQL2K backup files? Use MiniSQLBackup Lite,
free!
>
>"Oskar" <anonymous@.discussions.microsoft.com> wrote in
message
>news:2de601c4b1c0$5c2592e0$a501280a@.phx.gbl...
>> I can't see a problem here: each result returned in a
loop
>> has its own headers and data, the length of which should
>> be known. Maybe Query Analyzer just can't/won't read
this
>> information during the execution?
>> --
>> Thanks,
>> Oskar
>> >--Original Message--
>> >I do not think this is possible. Speaking as a
>> developer, the grids in QA
>> >auto adjusts their width taking into account the length
>> of the header and
>> >data, which would only be possible once you've loaded
all
>> the data into the
>> >grid.
>> >
>> >--
>> >Peter Yeoh
>> >http://www.yohz.com
>> >Need smaller SQL2K backup files? Use MiniSQLBackup
Lite,
>> free!
>> >
>> >
>> >"Oskar" <anonymous@.discussions.microsoft.com> wrote in
>> message
>> >news:086101c4b1b2$df5fd070$a401280a@.phx.gbl...
>> >> Hi,
>> >>
>> >> Does anyone know how to force Query Analyzer in Grid
>> mode
>> >> to return results in chunks like it is in Text Mode?
For
>> >> instance, when I have a query that returns results
in a
>> >> loop, in Grid mode I would have to wait until the
loop
>> >> exits to see the whole lot of them. With Text mode
it's
>> >> different - I see results as I go.
>> >>
>> >> --
>> >> Thanks,
>> >> Oskar
>> >>
>> >
>> >
>> >.
>> >
>
>.
>
Subscribe to:
Posts (Atom)