Showing posts with label display. Show all posts
Showing posts with label display. Show all posts

Thursday, March 29, 2012

How Overwrite display text of Multi Select Dropdownlist

Hi.
I would like to overwrite a text which is displayed on a dropdownlist
when all items are selected. (with multi-selection enabled)
By default when all items are selected they are displayed separated by
coma, Instead of all items listed in a dropdown display I would like
to have for example "All Items"
Is it possible?
Thanks,
MaciejIn your dataset (or your proc, depending on how you set it up), you
need two columns. One of which should contain values to pass as
parameters, the other should contain the labels you want to see. Then
you can set up the available values section of the parameter so that
the value field points to your values and the label field points to
your labels. There are a few ways to add the "All" parameter. Here's
the one from Chris Hays' blog: http://blogs.msdn.com/chrishays/archive/2004/07/27/AllParameterValue.aspx
On Jan 22, 12:08 pm, MacChojna...@.googlemail.com wrote:
> Hi.
> I would like to overwrite a text which is displayed on a dropdownlist
> when all items are selected. (with multi-selection enabled)
> By default when all items are selected they are displayed separated by
> coma, Instead of all items listed in a dropdown display I would like
> to have for example "All Items"
> Is it possible?
> Thanks,
> Maciej|||In your dataset (or your proc, depending on how you set it up), you
need two columns. One of which should contain values to pass as
parameters, the other should contain the labels you want to see. Then
you can set up the available values section of the parameter so that
the value field points to your values and the label field points to
your labels. There are a few ways to add the "All" parameter. Here's
the one from Chris Hays' blog:
http://blogs.msdn.com/chrishays/archive/2004/07/27/AllParameterValue.aspx
Bear in mind, though - if you're using multi-select you're always
going to have the option given to select all from the multi-select as
opposed to your version of 'all' which exists as a single selection on
the list. I'm not sure you can suppress that, either.
Adam
On Jan 22, 12:08 pm, MacChojna...@.googlemail.com wrote:
> Hi.
> I would like to overwrite a text which is displayed on a dropdownlist
> when all items are selected. (with multi-selection enabled)
> By default when all items are selected they are displayed separated by
> coma, Instead of all items listed in a dropdown display I would like
> to have for example "All Items"
> Is it possible?
> Thanks,
> Maciej|||Thanks, Adam but this is not exactly what I'm looking for.
I want to have some text which overwrite text displayed in dropdown.
Lets say that we have 10 Items in dropdown,
Item1 and Item2 are selected dropdown so it displays Item1,Item2
when I select also Item5 dropdown displays Item1,Item2,Item5.
Thing is that I don't want to see this text in dropdown. I want to
have in that place something different:
Instead of "Item1,Item2,Item5" - "Text"
Thanks,
Maciej
On 22 Sty, 19:47, Adam Schmitt <adam.schm...@.gmail.com> wrote:
> In your dataset (or your proc, depending on how you set it up), you
> need two columns. One of which should contain values to pass as
> parameters, the other should contain the labels you want to see. Then
> you can set up the available values section of the parameter so that
> the value field points to your values and the label field points to
> your labels. There are a few ways to add the "All" parameter. Here's
> the one from Chris Hays' blog:http://blogs.msdn.com/chrishays/archive/2004=
/07/27/AllParameterValue...
> Bear in mind, though - if you're using multi-select you're always
> going to have the option given to select all from the multi-select as
> opposed to your version of 'all' which exists as a single selection on
> the list. I'm not sure you can suppress that, either.
> Adam
> On Jan 22, 12:08 pm, MacChojna...@.googlemail.com wrote:
>
> > Hi.
> > I would like tooverwriteatextwhich is displayed on adropdownlist
> > when all items are selected. (with multi-selection enabled)
> > By default when all items are selected they are displayed separated by
> > coma, Instead of all items listed in a dropdown display I would like
> > to have for example "All Items"
> > Is it possible?
> > Thanks,
> > Maciej- Ukryj cytowany tekst -
> - Poka=BF cytowany tekst -|||Regardless of what SSRS is capable of, what you're trying to do can
only be done theoretically if you have a replacement value for every
possible combination of available values. That said, if you didn't
have a terribly large set of available values, you could always create
a single select parameter and populate it with all of those possible
combinations, separated by commas, as values. That way you could
associate the appropriate text with those values in another field on
the database side and use that second field as your text. Other than
that, though, I'm not so sure you could replace that text short of
hiding the parameter and having the user ignore it completely (not
terribly useful if they need to be able to select values from it).
Good luck.
Adam
On Feb 26, 2:48 am, MacChojna...@.googlemail.com wrote:
> Thanks, Adam but this is not exactly what I'm looking for.
> I want to have some text which overwrite text displayed in dropdown.
> Lets say that we have 10 Items in dropdown,
> Item1 and Item2 are selected dropdown so it displays Item1,Item2
> when I select also Item5 dropdown displays Item1,Item2,Item5.
> Thing is that I don't want to see this text in dropdown. I want to
> have in that place something different:
> Instead of "Item1,Item2,Item5" - "Text"
> Thanks,
> Maciej
> On 22 Sty, 19:47, Adam Schmitt <adam.schm...@.gmail.com> wrote:
> > In your dataset (or your proc, depending on how you set it up), you
> > need two columns. One of which should contain values to pass as
> > parameters, the other should contain the labels you want to see. Then
> > you can set up the available values section of the parameter so that
> > the value field points to your values and the label field points to
> > your labels. There are a few ways to add the "All" parameter. Here's
> > the one from Chris Hays' blog:http://blogs.msdn.com/chrishays/archive/20=
04/07/27/AllParameterValue...
> > Bear in mind, though - if you're using multi-select you're always
> > going to have the option given to select all from the multi-select as
> > opposed to your version of 'all' which exists as a single selection on
> > the list. I'm not sure you can suppress that, either.
> > Adam
> > On Jan 22, 12:08 pm, MacChojna...@.googlemail.com wrote:
> > > Hi.
> > > I would like tooverwriteatextwhich is displayed on adropdownlist
> > > when all items are selected. (with multi-selection enabled)
> > > By default when all items are selected they are displayed separated by=
> > > coma, Instead of all items listed in a dropdown display I would like
> > > to have for example "All Items"
> > > Is it possible?
> > > Thanks,
> > > Maciej- Ukryj cytowany tekst -
> > - Poka=BF cytowany tekst -

Wednesday, March 28, 2012

How not to display all databases under sql2k using sql management studio?

When you use sql 2005 management studio to connect to a sql 2005 server, you can deny view on any database and one user will not be able to see any database that he/she does not own.

However, what about if this person uses sql 2005 management studio to connect to a sql 2000 server. Since sql 2005 management studio does not call the store procedure sp_MSdbuseraccess, it will display all the database in the server.

It does not seem like I can use "deny view on any database to username" on a sql 2000 server.

Does anyone have any idea what I need to do in order to not show all the database when I use sql 2005 management studio to connect to a sql 2000 server box?

Thank you.EM will show the database as existing, but you can still deny access to the database and prevent people from opening it up or viewing the objects and data inside it.

Only admins should be using Enterprise Manager anyway...|||What I want to do is to deny any login id (who owns certain database) to not be able to see other database at all.

Just like sql 2005, you can run "deny view any database to userid"

However, doesn't seem like sql 2000 has this command.|||The databases are like houses. You can prevent people from going inside, but you can't prevent people from seeing them.

Wednesday, March 7, 2012

How is his done

Hi,
I have the foll table
col1 col2
1 2002-01-01
1 2003-01-01
1 2004-01-01
2 2004-01-01
1 2005-01-01
how can I display the most recent 2 or 3 of id 1?
ThanksCreate a ranking expression for col2 based on a partition of col1 and
generate the subset. To put it in perspective:
SELECT *
FROM tbl t1
WHERE ( SELECT COUNT(*) FROM tbl t2
WHERE t1.col1 = t2.col1
AND t1.col2 <= t2.col2 ) <= 2 ;
Essentially the subquery in the WHERE clause is the ranking expression that
generates the quota. In SQL 2005, you can use RANK() function like:
SELECT *
FROM ( SELECT col1, col2,
RANK() OVER ( PARTITION BY col1
ORDER BY col2 ) AS "rank"
FROM tbl ) D
WHERE rank <= 2 ;
Anith|||For SQL 2000:
(If you want the most recent 2)
SELECT TOP 2
Col1
, Col2
FROM MyTable
WHERE Col1 = 1
ORDER BY Col2 DESC
--
Arnie Rowland, YACE*
"To be successful, your heart must accompany your knowledge."
*Yet Another certification Exam
"Anith Sen" <anith@.bizdatasolutions.com> wrote in message news:u6vfA0umGHA.4700@.TK2MSFTNGP0
3.phx.gbl...
> Create a ranking expression for col2 based on a partition of col1 and
> generate the subset. To put it in perspective:
>
> SELECT *
> FROM tbl t1
> WHERE ( SELECT COUNT(*) FROM tbl t2
> WHERE t1.col1 = t2.col1
> AND t1.col2 <= t2.col2 ) <= 2 ;
>
> Essentially the subquery in the WHERE clause is the ranking expression tha
t
> generates the quota. In SQL 2005, you can use RANK() function like:
>
> SELECT *
> FROM ( SELECT col1, col2,
> RANK() OVER ( PARTITION BY col1
> ORDER BY col2 ) AS "rank"
> FROM tbl ) D
> WHERE rank <= 2 ;
>
> --
> Anith
>
>|||Hi,
Your solution seems to work excellent. Actually I can then adjust it on the
fly to return the specified amount by changing the <= 2 at the end, however,
there is a slight performance hit on a hugh table. I guess that's because of
the count(*). I tested it on a 500000 row table.
Thanks
"Anith Sen" wrote:

> Create a ranking expression for col2 based on a partition of col1 and
> generate the subset. To put it in perspective:
> SELECT *
> FROM tbl t1
> WHERE ( SELECT COUNT(*) FROM tbl t2
> WHERE t1.col1 = t2.col1
> AND t1.col2 <= t2.col2 ) <= 2 ;
> Essentially the subquery in the WHERE clause is the ranking expression tha
t
> generates the quota. In SQL 2005, you can use RANK() function like:
> SELECT *
> FROM ( SELECT col1, col2,
> RANK() OVER ( PARTITION BY col1
> ORDER BY col2 ) AS "rank"
> FROM tbl ) D
> WHERE rank <= 2 ;
> --
> Anith
>
>|||Hi,
Your solution seems to work excellent. Actually I can then adjust it on the
fly to return the specified amount by changing the <= 2 at the end, however,
there is a slight performance hit on a hugh table. I guess that's because of
the count(*). I tested it on a 500000 row table.
Thanks
"Anith Sen" wrote:

> Create a ranking expression for col2 based on a partition of col1 and
> generate the subset. To put it in perspective:
> SELECT *
> FROM tbl t1
> WHERE ( SELECT COUNT(*) FROM tbl t2
> WHERE t1.col1 = t2.col1
> AND t1.col2 <= t2.col2 ) <= 2 ;
> Essentially the subquery in the WHERE clause is the ranking expression tha
t
> generates the quota. In SQL 2005, you can use RANK() function like:
> SELECT *
> FROM ( SELECT col1, col2,
> RANK() OVER ( PARTITION BY col1
> ORDER BY col2 ) AS "rank"
> FROM tbl ) D
> WHERE rank <= 2 ;
> --
> Anith
>
>

How Image Display From SqlServer To Image Control

I have learned lots of informative thing from your forums. I have little problem regarding "Display image from SQL Server on ASP.NET" I have done it and image display on my page from SQL Server. I have cleared you here I have adopt two different methods which are following for displaying picture.1.Response.BinaryWrite(rd("picture"))2.image.Save(Response.OutputStream, ImageFormat.Jpeg)but in both above methods I have faced little problem when image display on my page all other information can not display and I also want to display picture on my specific location on the page. My second question is can use any web control like "Image1" to display image from SQL Server where my pictures are stored.Hope you will help me.Thanks and regardsAftab AbbasiI think what you are asking is how to put the picture someplace on the page rather than taking the entire page. To do that, reference you image frmo an <img tag or an <asp:image tag inside an existing page. You can reference an image handler also from inside the page the same way (through an img or image tag)|||thanks for your reply do u have any example kindly post here.|||

My basic need i should tell you here...i have lots of images which is stored on SQL Server 2000 and i just want
to retrive image from SQL Server and display into specific location like (Table , Cell).

Did i use any control likeImage Controlto display my picture which is stored not on physical drive which is stored
on SQL Server.

Hope u will help me with example (if u have).

Thanks and regards.


Aftab Abbasi

|||

Hi,

There on may samples for this on the web. Here is one of them:

http://codebetter.com/blogs/eric.wise/archive/2005/05/15/63236.aspx

HTH. If this does not answer you question, please feel free to mark the post as Not Answered and post your reply. Thanks!