Showing posts with label items. Show all posts
Showing posts with label items. Show all posts

Thursday, March 22, 2012

Bug?: rsMultiReportItemsInPageSectionExpression when one report item, but referenced twice

When I reference the same report item twice in my footer expression I get an
error saying that I've refereced two items. My motivation is the database
field on each page footer. I have a custom assembly instance that stores
the value from the first page, then returns it when I am passing in empty
values. I tried the page number from the globals collection but ran into
#Error...anyway, getting off base. My issue is that the report expression
references a single item twice. Should I be able to do this? If not,
should the error message be more specific?
Expression:
=IIf(IsNothing(ReportItems!txtSchoolNameHidden.Value)=False,
Code.loc.SchoolName(ReportItems!txtSchoolNameHidden.Value),
Code.loc.SchoolName(""))
Error:
[rsMultiReportItemsInPageSectionExpression] The Value expression for the
textbox 'txtSchoolName' refers to more than one report item. An expression
in a page header or footer can refer to only one report item.Submitted bug to Microsoft via Product Feedback
"Steve MunLeeuw" <smunson@.clearwire.net> wrote in message
news:%23RtLLbKNGHA.3728@.tk2msftngp13.phx.gbl...
> When I reference the same report item twice in my footer expression I get
> an error saying that I've refereced two items. My motivation is the
> database field on each page footer. I have a custom assembly instance
> that stores the value from the first page, then returns it when I am
> passing in empty values. I tried the page number from the globals
> collection but ran into #Error...anyway, getting off base. My issue is
> that the report expression references a single item twice. Should I be
> able to do this? If not, should the error message be more specific?
> Expression:
> =IIf(IsNothing(ReportItems!txtSchoolNameHidden.Value)=False,
> Code.loc.SchoolName(ReportItems!txtSchoolNameHidden.Value),
> Code.loc.SchoolName(""))
> Error:
> [rsMultiReportItemsInPageSectionExpression] The Value expression for the
> textbox 'txtSchoolName' refers to more than one report item. An
> expression in a page header or footer can refer to only one report item.
>

Saturday, February 25, 2012

Budget Clustering Standard Edition.

I am aware that the standard edition does not 'include'
fail over clustering.
I have read this newgroup on items containing the
budget / standard edition clustering.
I get the strong impression that 'budget clustering' is
strongly advised against.
WHY ?
Thanks for your attention,
ben brugman
Elaboration :
We want to have two options :
1. Standard edition.
2. Enterprise / San / Fail over.
Offcourse for high availability, you have to pay and
go for the second solution.
But to make the first solution as good as possible,
we are thinking in lines of the 'suggested' budget
fail over clustering.
So we plan :
Two servers with internal OS / SQL-server software.
Two Raid storage units which will be host based mirrored.
(So each file is stored four times).
Two locations, one for each server, storage unit.
If a part of the storage fails, there is plenty of redundancy.
But if a server fails we plan to do a fail over to the 'second'
machine, just reattaching the disks. (With MSA management
software).
We want the maximum amount of availability which can be
obtained with using the standard edition.
If that is not enough management can choose for the second
configuration, which will be more expensive.
We do not want to make the choice but supply the management
with enough 'numbers' and arguments to make a sollid choice on
the configuration.
1) Standard Edition is not supported
2) No Cluster resources will be created, thus adding tons of work during the
install
3) It is a violation of EULA
4) It will not failover properly
5) See number 1
Cheers,
Rod
"ben brugman" <ben@.niethier.nl> wrote in message
news:%23kCvdN%23REHA.1340@.TK2MSFTNGP12.phx.gbl...
> I am aware that the standard edition does not 'include'
> fail over clustering.
> I have read this newgroup on items containing the
> budget / standard edition clustering.
> I get the strong impression that 'budget clustering' is
> strongly advised against.
> WHY ?
> Thanks for your attention,
> ben brugman
>
>
>
>
> Elaboration :
> We want to have two options :
> 1. Standard edition.
> 2. Enterprise / San / Fail over.
> Offcourse for high availability, you have to pay and
> go for the second solution.
> But to make the first solution as good as possible,
> we are thinking in lines of the 'suggested' budget
> fail over clustering.
> So we plan :
> Two servers with internal OS / SQL-server software.
> Two Raid storage units which will be host based mirrored.
> (So each file is stored four times).
> Two locations, one for each server, storage unit.
> If a part of the storage fails, there is plenty of redundancy.
> But if a server fails we plan to do a fail over to the 'second'
> machine, just reattaching the disks. (With MSA management
> software).
> We want the maximum amount of availability which can be
> obtained with using the standard edition.
> If that is not enough management can choose for the second
> configuration, which will be more expensive.
> We do not want to make the choice but supply the management
> with enough 'numbers' and arguments to make a sollid choice on
> the configuration.
>
>
|||Sorry could you explain what "budget clustering" is? Are you talking about 3rd party software?
Thanks
DaveK
http://www.sqlporn.co.uk
|||He is asking about a low-cost cluster. Using Standard Edition instead of
Enterprise.
Cheers,
Rod
"DaveK" <anonymous@.discussions.microsoft.com> wrote in message
news:31F9BABD-78FB-4174-B831-9E1B0C3D3093@.microsoft.com...
> Sorry could you explain what "budget clustering" is? Are you talking about
3rd party software?
> Thanks
> DaveK
> http://www.sqlporn.co.uk
|||First of all thanks for your time.
I would like to go over the points one at the time.
In my original mail I did (on purpose) elaborate, but
only at the end of the message.
"Rodney R. Fournier [MVP]" <rod@.die.spam.die.nw-america.com> wrote in
message news:uonKad#REHA.3708@.TK2MSFTNGP10.phx.gbl...
> 1) Standard Edition is not supported
We do not intend to automatically fail over, but doing the fail over by
'hand',
in this group there are a lot of advices how to do this.

> 2) No Cluster resources will be created, thus adding tons of work during
the
> install
We need an extra machine and an extra installation of OS/SQL-server and
of course the setting up of the hardware and hardware management.
But I doubt if 'real' clustering has less work.

> 3) It is a violation of EULA
I do not see a violation of the EULA, with this set up.
(But then EULA's are so complex that allthough I do understand them,
this is not totaly 100 %).

> 4) It will not failover properly
I think by hand it wil. If this is not true please point out why.

> 5) See number 1
See number one.
As said we will do the switch manually, also switching the
application servers. (By newly resolving the name and reconnecting).
So the fail over is manually, but we do not need to restore and recover.
So there is less availability than for 'real' clustering, but more than
if a (backup) restore recover is done in case of a server failure.
Any new insights ?
ben brugman.

> Cheers,
> Rod
> "ben brugman" <ben@.niethier.nl> wrote in message
> news:%23kCvdN%23REHA.1340@.TK2MSFTNGP12.phx.gbl...
>
|||"Rodney R. Fournier [MVP]" <rod@.die.spam.die.nw-america.com> wrote in
message news:OskDg1#REHA.3660@.tk2msftngp13.phx.gbl...[vbcol=seagreen]
> He is asking about a low-cost cluster. Using Standard Edition instead of
> Enterprise.
> Cheers,
> Rod
> "DaveK" <anonymous@.discussions.microsoft.com> wrote in message
> news:31F9BABD-78FB-4174-B831-9E1B0C3D3093@.microsoft.com...
about
> 3rd party software?
>
I do not see the 'original message of DaveK, so I'll attach my anwser here.
By budget clustering, different people have different meanings.
What I did understand and mean by budget clustering is :
Using the standard edition SQL-server.
Setting up a second machine similar to the first machine.
If the first machine fails, attach the 'database' disks to the
second machine.
And start up SQL-server on the second machine.
Because this machine has a different name and ip address the
applications have to reconnect after a new name resolve.
(So this has to be changed as well).
Of course here we are missing a lot of the advantages of the
'real' clustering mechanism where 'everything' goed automatic.
(failure detection, switching over, name resolving and if the
application is cluster aware the reconnection).
But the advantage of this way creating high availability is that
you do not have to restore and recover a database in case of
a server failure.
So in my this 'might' give a higher availability then using the
backup and restore route.
Remarks :
Offcourse have you datastorage redundant. So that a storage failure
(disk or system) can be handled.
A server failure will be a rare event (using servers which have redundancy
in power supply, memory etc.). So during a server failure you might lose
some availability time.
But losing say an hour every two years because of a server failure, or
paying for the more expensive 'real fail over' capable system, is something
that has to be decided by the management.
Off course there will also be down time during regular upgrades of mainly
software and rearely hardware, but that can be planned.
Although we run a 7 x 24 hours shop, planned downtime is not to disruptive.
With my question, I hope to get some insight in how realistic this set up
is. I would like to form an opinion based on more than : "That won't work"
or "That is not supported" or "That is not allowed".
ben brugman
|||I think you want to look at creating a SQL Standby Server, which is
supported and very easy to do. Nothing to do with clustering, but neither
does your solution.
Cheers,
Rod
"ben brugman" <ben@.niethier.nl> wrote in message
news:c9k4ft$dt5$1@.reader10.wxs.nl...
> First of all thanks for your time.
> I would like to go over the points one at the time.
> In my original mail I did (on purpose) elaborate, but
> only at the end of the message.
>
> "Rodney R. Fournier [MVP]" <rod@.die.spam.die.nw-america.com> wrote in
> message news:uonKad#REHA.3708@.TK2MSFTNGP10.phx.gbl...
> We do not intend to automatically fail over, but doing the fail over by
> 'hand',
> in this group there are a lot of advices how to do this.
> the
> We need an extra machine and an extra installation of OS/SQL-server and
> of course the setting up of the hardware and hardware management.
> But I doubt if 'real' clustering has less work.
>
> I do not see a violation of the EULA, with this set up.
> (But then EULA's are so complex that allthough I do understand them,
> this is not totaly 100 %).
> I think by hand it wil. If this is not true please point out why.
>
> See number one.
> As said we will do the switch manually, also switching the
> application servers. (By newly resolving the name and reconnecting).
> So the fail over is manually, but we do not need to restore and recover.
> So there is less availability than for 'real' clustering, but more than
> if a (backup) restore recover is done in case of a server failure.
> Any new insights ?
> ben brugman.
>
>
|||Thanks,
ben
"Rodney R. Fournier [MVP]" <rod@.die.spam.die.nw-america.com> wrote in
message news:OIAIp1JSEHA.2936@.TK2MSFTNGP10.phx.gbl...[vbcol=seagreen]
> I think you want to look at creating a SQL Standby Server, which is
> supported and very easy to do. Nothing to do with clustering, but neither
> does your solution.
> Cheers,
> Rod
> "ben brugman" <ben@.niethier.nl> wrote in message
> news:c9k4ft$dt5$1@.reader10.wxs.nl...
during
>
|||"Rodney R. Fournier [MVP]" <rod@.die.spam.die.nw-america.com> wrote in
message news:OIAIp1JSEHA.2936@.TK2MSFTNGP10.phx.gbl...
> I think you want to look at creating a SQL Standby Server, which is
> supported and very easy to do. Nothing to do with clustering, but neither
> does your solution.
Did look up standby servers, but this is not what I meant.
In my mail I described that we didn't want to use the
backup / restore sequence, but just the switching of the
disks.
I have seen this mentioned as "budget clustering", but could
be wrong there. Sorry for that misunderstanding. Haven't got
a name / term for it.
ben
[vbcol=seagreen]
> Cheers,
> Rod
> "ben brugman" <ben@.niethier.nl> wrote in message
> news:c9k4ft$dt5$1@.reader10.wxs.nl...
during
>
|||FYI, you can do a fully functional "budget cluster" using standard edition
of SQL/Windows using Legato's clustering product. Of course, it ain't free,
so that might blow your budget :-)
Regards,
John
"ben brugman" <ben@.niethier.nl> wrote in message
news:c9k58t$e84$1@.reader10.wxs.nl...
> "Rodney R. Fournier [MVP]" <rod@.die.spam.die.nw-america.com> wrote in
> message news:OskDg1#REHA.3660@.tk2msftngp13.phx.gbl...
> about
> I do not see the 'original message of DaveK, so I'll attach my anwser
here.
> By budget clustering, different people have different meanings.
> What I did understand and mean by budget clustering is :
> Using the standard edition SQL-server.
> Setting up a second machine similar to the first machine.
> If the first machine fails, attach the 'database' disks to the
> second machine.
> And start up SQL-server on the second machine.
> Because this machine has a different name and ip address the
> applications have to reconnect after a new name resolve.
> (So this has to be changed as well).
> Of course here we are missing a lot of the advantages of the
> 'real' clustering mechanism where 'everything' goed automatic.
> (failure detection, switching over, name resolving and if the
> application is cluster aware the reconnection).
> But the advantage of this way creating high availability is that
> you do not have to restore and recover a database in case of
> a server failure.
> So in my this 'might' give a higher availability then using the
> backup and restore route.
> Remarks :
> Offcourse have you datastorage redundant. So that a storage failure
> (disk or system) can be handled.
> A server failure will be a rare event (using servers which have redundancy
> in power supply, memory etc.). So during a server failure you might lose
> some availability time.
> But losing say an hour every two years because of a server failure, or
> paying for the more expensive 'real fail over' capable system, is
something
> that has to be decided by the management.
> Off course there will also be down time during regular upgrades of mainly
> software and rearely hardware, but that can be planned.
> Although we run a 7 x 24 hours shop, planned downtime is not to
disruptive.
> With my question, I hope to get some insight in how realistic this set up
> is. I would like to form an opinion based on more than : "That won't work"
> or "That is not supported" or "That is not allowed".
> ben brugman
>

Sunday, February 12, 2012

brain teaser - stagger the order of the results

This one has been stumping me for several days. I can run a query that
returns several different items from several different manufacturers,
each with a ranking score. Each manufacturer can have any number of
items:

Item_Name Manufacturer rank
Item 1 Manu_A 82
Item 2 Manu_A 65
Item 3 Manu_A 41
Item 4 Manu_B 32
Item 5 Manu_C 21
Item 6 Manu_B 19

However, I would like the records to be ordered so that the highest
ranking item is shown first, then the next highest item from a
different manufacturer is shown second, then the next highest item from
a third manufacturer is show, etc.:

Item 1 Manu_A 82
Item 4 Manu_B 32
Item 5 Manu_C 21
Item 2 Manu_A 65
Item 6 Manu_B 19
Item 3 Manu_A 41

Does anyone have any thoughts on how to order the results in this
fashion?

thanks,

Matt WeinerIt would be useful to see how you compute the Rank value. Perhaps your
result is possible by adapting your existing query. From what you've
given us, try this:

SELECT T1.item_name, T1.manufacturer, T1.rank
FROM (/* Your query */) AS T1
JOIN (/* Your query */) AS T2
ON T1.manufacturer = T2.manufacturer
AND T1.rank <= T2.rank
GROUP BY T1.item_name, T1.manufacturer, T1.rank
ORDER BY COUNT(*), T1.rank DESC

Just substitute your query or a view that contains it after the FROM
and JOIN.

--
David Portas
SQL Server MVP
--|||thanks. It works great. I appreciate the help.

Matt

Bottom 10?

I know the select distinct TOP 10 returns top ten highest price items but
what about top 10 lowest priced items?
Thanks
S.This is a multi-part message in MIME format.
--=_NextPart_000_04E8_01C3CEEC.B41FEA20
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: 7bit
It's all in the ORDER BY:
select top 10
*
from
MyTable
order by
Price -- 10 cheapest
select top 10
*
from
MyTable
order by
Price DESC -- 10 most expensive
Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"SMAN" <ksanti@.nycap.rr.com> wrote in message
news:ODQ$ZYxzDHA.2156@.TK2MSFTNGP09.phx.gbl...
I know the select distinct TOP 10 returns top ten highest price items but
what about top 10 lowest priced items?
Thanks
S.
--=_NextPart_000_04E8_01C3CEEC.B41FEA20
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

It's all in the ORDER BY:
select top 10
=*
from
=MyTable
order by
=Price -- 10 cheapest
select top 10
=*
from
=MyTable
order by
Price DESC -- 10 most =expensive
-- Tom
---T=homas A. Moreau, BSc, PhD, MCSE, MCDBASQL Server MVPColumnist, SQL =Server ProfessionalToronto, ON Canadahttp://www.pinnaclepublishing.com/sql">www.pinnaclepublishing.com=/sql
"SMAN" wrote in message news:ODQ$ZYxzDHA.2156=@.TK2MSFTNGP09.phx.gbl...I know the select distinct TOP 10 returns top ten highest price items =butwhat about top 10 lowest priced items?ThanksS.

--=_NextPart_000_04E8_01C3CEEC.B41FEA20--|||SELECT TOP 10 * FROM <your table> ORDER BY Price
"SMAN" <ksanti@.nycap.rr.com> wrote in message
news:ODQ$ZYxzDHA.2156@.TK2MSFTNGP09.phx.gbl...
> I know the select distinct TOP 10 returns top ten highest price items but
> what about top 10 lowest priced items?
> Thanks
> S.
>|||ahh...makes cents to me now...thank you so much!!!!
"J Young" <thorium48@.hotmail.com> wrote in message
news:OohzYexzDHA.4060@.TK2MSFTNGP11.phx.gbl...
> SELECT TOP 10 * FROM <your table> ORDER BY Price
> "SMAN" <ksanti@.nycap.rr.com> wrote in message
> news:ODQ$ZYxzDHA.2156@.TK2MSFTNGP09.phx.gbl...
> > I know the select distinct TOP 10 returns top ten highest price items
but
> > what about top 10 lowest priced items?
> >
> > Thanks
> >
> > S.
> >
> >
>|||This is a multi-part message in MIME format.
--=_NextPart_000_053D_01C3CEEF.AEBA81F0
Content-Type: text/plain;
charset="Windows-1252"
Content-Transfer-Encoding: 7bit
But will it make dollars to you later ... ;-)
--
Tom
---
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
"SMAN" <ksanti@.nycap.rr.com> wrote in message
news:OkpBWjxzDHA.1736@.TK2MSFTNGP09.phx.gbl...
ahh...makes cents to me now...thank you so much!!!!
"J Young" <thorium48@.hotmail.com> wrote in message
news:OohzYexzDHA.4060@.TK2MSFTNGP11.phx.gbl...
> SELECT TOP 10 * FROM <your table> ORDER BY Price
> "SMAN" <ksanti@.nycap.rr.com> wrote in message
> news:ODQ$ZYxzDHA.2156@.TK2MSFTNGP09.phx.gbl...
> > I know the select distinct TOP 10 returns top ten highest price items
but
> > what about top 10 lowest priced items?
> >
> > Thanks
> >
> > S.
> >
> >
>
--=_NextPart_000_053D_01C3CEEF.AEBA81F0
Content-Type: text/html;
charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

But will it make dollars to you later =... ;-)
-- Tom
---T=homas A. Moreau, BSc, PhD, MCSE, MCDBASQL Server MVPColumnist, SQL =Server ProfessionalToronto, ON Canadahttp://www.pinnaclepublishing.com/sql">www.pinnaclepublishing.com=/sql
"SMAN" wrote in message news:OkpBWjxzDHA.1736=@.TK2MSFTNGP09.phx.gbl...ahh...makes cents to me now...thank you so much!!!!"J Young" =wrote in messagenews:OohzYexzDHA.4060=@.TK2MSFTNGP11.phx.gbl...> SELECT TOP 10 * FROM ORDER BY =Price>> "SMAN" wrote in message> news:ODQ$ZYxzDHA.2156=@.TK2MSFTNGP09.phx.gbl...> > I know the select distinct TOP 10 returns top ten highest price itemsbut> > what about top 10 lowest priced =items?> >> > Thanks> >> > S.> =>> >>>

--=_NextPart_000_053D_01C3CEEF.AEBA81F0--|||You had better throw in 'WITH TIES'.
Else, you'll get screwed when there are a few products with the same price.
And that goes for your 'TOP 10 highest' query too.
James Hokes
"J Young" <thorium48@.hotmail.com> wrote in message
news:OohzYexzDHA.4060@.TK2MSFTNGP11.phx.gbl...
> SELECT TOP 10 * FROM <your table> ORDER BY Price
> "SMAN" <ksanti@.nycap.rr.com> wrote in message
> news:ODQ$ZYxzDHA.2156@.TK2MSFTNGP09.phx.gbl...
> > I know the select distinct TOP 10 returns top ten highest price items
but
> > what about top 10 lowest priced items?
> >
> > Thanks
> >
> > S.
> >
> >
>