Friday, March 30, 2012

How to conver 24 Hrs. time into 12 Hrs. time

hi
plz help me i have a varchar time like '18:30:15' and i want to convert it into '06:30:15 PM' format
plz help meLook convert statement with it's formats

how to controll user access in comercial deployment?

Hello,
We have used SSAS and SSRS to develop a BI reporting suite for our data
warehouse and would like to deploy this into our customer base, but at the
same time protect our investment.
How do we control or limit the number of users that can use our cubes and
reports? We would like to control user numbers by a licence arrangement -
either concurrent or named - but fear once a user has our developments
installed they only need to increase their MS licences and away they go...
Any help and advice appreciated.
StephenYou could do the following for named users.
1. Have your own routine that authorizes. Put the user names into a table.
Then somewhere else have the total number allowed encrypted.
2. In your reports (or even better in stored procedures) use the User!UserID
global parameter and verify the user. You could do this in a custom assembly
too. You could put a nag message on each report.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Stephen Lonsdale" <StephenLonsdale@.discussions.microsoft.com> wrote in
message news:4AE7D682-F6D1-4E60-8641-03EC900EA69D@.microsoft.com...
> Hello,
> We have used SSAS and SSRS to develop a BI reporting suite for our data
> warehouse and would like to deploy this into our customer base, but at the
> same time protect our investment.
> How do we control or limit the number of users that can use our cubes and
> reports? We would like to control user numbers by a licence arrangement -
> either concurrent or named - but fear once a user has our developments
> installed they only need to increase their MS licences and away they go...
> Any help and advice appreciated.
> Stephen

How to control visibility of table columns at runtime?

Hi all..

Using ReportViewer in an ASPX page, is it possible to hide certain columns of a table at runtime?

That table is databound to a business object and I'm using local reporting capabilities of Visual Studio 2005.

Thanks

Jaime

I assume you are using a "table" reportitem. In report designer you can select the entire column of a table. In the properties window (F4), you should then see a "Visibility" property. You could set the Visibility.Hidden property to e.g. =Parameters!HideColumns.Value (assuming HideColumns is a boolean report parameter).

-- Robert

|||

Hi Robert..

I meant programmatically. How can I change Visibility property of the table using code. Suppose the table is named tblDatos and report viewer control is named rptBusqueda.

Jaime

How to control visibility of table columns at runtime?

Hi all..

Using ReportViewer in an ASPX page, is it possible to hide certain columns of a table at runtime?

That table is databound to a business object and I'm using local reporting capabilities of Visual Studio 2005.

Thanks

Jaime

I assume you are using a "table" reportitem. In report designer you can select the entire column of a table. In the properties window (F4), you should then see a "Visibility" property. You could set the Visibility.Hidden property to e.g. =Parameters!HideColumns.Value (assuming HideColumns is a boolean report parameter).

-- Robert

|||

Hi Robert..

I meant programmatically. How can I change Visibility property of the table using code. Suppose the table is named tblDatos and report viewer control is named rptBusqueda.

Jaime

how to control the table's column number

Hi,

When I add the table into the report, the default column number is 3. Let's say I need 10 columns on the report, besides right click on the last column and click on "add column right" to add the other 7 columns, is there any easy way?

Thanks.

Sorry, there is no other way of doing this. You have to add additional columns through the popup menu.

-- Robert

sql

How to control the security in this case?

Dear all,
I have a SQL Server 2000 in my head office, it has several databases.
However, one of the databases is maintained by a colleague of a regional
office. He has the all the authority (read / write) to work on this database
.
But there is a problem, we have developed some DTS packages in head office
and this colleague is going to make his own packages. We would like to have
a
control that this colleague is not able to access our DTS packages (not even
read), he can only opens his own the DTS packages.
Is there any control to achieve this purpose? Please advise. Thanks a lot.
IvanOpen the packages in design mode, use "save as" and set the owner and user
password.
AMB
"Ivan" wrote:

> Dear all,
> I have a SQL Server 2000 in my head office, it has several databases.
> However, one of the databases is maintained by a colleague of a regional
> office. He has the all the authority (read / write) to work on this databa
se.
> But there is a problem, we have developed some DTS packages in head office
> and this colleague is going to make his own packages. We would like to hav
e a
> control that this colleague is not able to access our DTS packages (not ev
en
> read), he can only opens his own the DTS packages.
> Is there any control to achieve this purpose? Please advise. Thanks a lot.
> Ivan
>|||Hi, Alejandro
I'm afrais that does not solve the problem. I still keep seeing the DTS's
created by others.
"Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> wrote in message
news:B1A8ECBE-047C-4095-889A-A7DA9C4BFD04@.microsoft.com...[vbcol=seagreen]
> Open the packages in design mode, use "save as" and set the owner and user
> password.
>
> AMB
> "Ivan" wrote:
>
database.[vbcol=seagreen]
office[vbcol=seagreen]
have a[vbcol=seagreen]
even[vbcol=seagreen]
lot.[vbcol=seagreen]|||Hi Uri,
It is allowed that the colleague in the regional office to create his own
DTS. I just don't want to view the DTS created in my head office.
Besides setting password in each DTS package, is there any other way?
Thanks.
Ivan
"Uri Dimant" wrote:

> Hi, Alejandro
> I'm afrais that does not solve the problem. I still keep seeing the DTS's
> created by others.
>
> "Alejandro Mesa" <AlejandroMesa@.discussions.microsoft.com> wrote in messag
e
> news:B1A8ECBE-047C-4095-889A-A7DA9C4BFD04@.microsoft.com...
> database.
> office
> have a
> even
> lot.
>
>

How to control the report export to a pdf in Landscape mode?

hi,
I have a report and becuase of too many fields, I want to export pdf in
landscape mode. Is there any way to control this?

Thanks

oh, got it.
To do this, need to set the width of the page to 11inchs. And the width of body mostly should be 10 inchs or less. It will export the pdf document as landscape mode automatically.|||

While I am happy to hear that you set portrait and landscape in the width and height properties, it does not work.

I changed my L and R margins to about .2 and put in the width and height as 11 X 8.5.

I set my Body to at least 1/2 inch smaller that my margins to the paper size, and when I preview it, it's landscape. When I view it in PDF, it's portrait and I either have to set the printer or the pdf everytime. It also prints portrait directly to my printer, unless I change the printer setup.

It doesn't work at all with my installed PDF Writer, I have to Export to PDF thru the RS print preview.

Halp!

How to control the report export to a pdf in Landscape mode?

hi,
I have a report and becuase of too many fields, I want to export pdf in
landscape mode. Is there any way to control this?

Thanks

oh, got it.
To do this, need to set the width of the page to 11inchs. And the width of body mostly should be 10 inchs or less. It will export the pdf document as landscape mode automatically.|||

While I am happy to hear that you set portrait and landscape in the width and height properties, it does not work.

I changed my L and R margins to about .2 and put in the width and height as 11 X 8.5.

I set my Body to at least 1/2 inch smaller that my margins to the paper size, and when I preview it, it's landscape. When I view it in PDF, it's portrait and I either have to set the printer or the pdf everytime. It also prints portrait directly to my printer, unless I change the printer setup.

It doesn't work at all with my installed PDF Writer, I have to Export to PDF thru the RS print preview.

Halp!

|||same problem.plz plz help !!!!!!!!!!!!!!!!!!!!|||to solve this you should set PageHeight and PageWidth for element Report in *.rdlc file like this:

<PageHeight>8.5in</PageHeight>
<PageWidth>11in</PageWidth>
</Report>

How to control the report export to a pdf in Landscape mode?

hi,
I have a report and becuase of too many fields, I want to export pdf in
landscape mode. Is there any way to control this?I agree. They should also have a SendTo right from the preview and
hopefully add XPS format before next product.
--
William Stacey [MVP]
"Nick" <nick_1394@.yahoo.com.cn> wrote in message
news:1137696432.086601.318380@.g43g2000cwa.googlegroups.com...
| hi,
| I have a report and becuase of too many fields, I want to export pdf in
| landscape mode. Is there any way to control this?
||||Have you tried changing the Report's Page Size? Change the Height to 21cm (8
Inches?) and WIdth to 29,7 (11?) and you get landscape. It will render as
"landscape" in your Report Manager too, but usually the users' screens are
wide enough so it's not really a problem.
Kaisa M. Lindahl
"Nick" <nick_1394@.yahoo.com.cn> wrote in message
news:1137696432.086601.318380@.g43g2000cwa.googlegroups.com...
> hi,
> I have a report and becuase of too many fields, I want to export pdf in
> landscape mode. Is there any way to control this?
>|||That works. Did not see those. Thanks.
--
William Stacey [MVP]
"Kaisa M. Lindahl" <kaisaml@.hotmail.com> wrote in message
news:uqY6ylTHGHA.2064@.TK2MSFTNGP09.phx.gbl...
| Have you tried changing the Report's Page Size? Change the Height to 21cm
(8
| Inches?) and WIdth to 29,7 (11?) and you get landscape. It will render as
| "landscape" in your Report Manager too, but usually the users' screens are
| wide enough so it's not really a problem.
|
| Kaisa M. Lindahl
|
| "Nick" <nick_1394@.yahoo.com.cn> wrote in message
| news:1137696432.086601.318380@.g43g2000cwa.googlegroups.com...
| > hi,
| > I have a report and becuase of too many fields, I want to export pdf in
| > landscape mode. Is there any way to control this?
| >
|
|

how to control the number of row?

i want to contorl the output number of row with a certain number when select data from table that not exceed the number with my setting.

For example,if the result is exceed the 500 rows, then i just require 200 rows, that what is the command of this function?

Thanks for any help...

You can try something like:

SELECT top 500
...
from TableName

another more archaic form is to execute

SET ROWCOUNT 500

However, this will also limit the number of records update or inserted, deleted etc. Turn off the limit by:

SET ROWCOUNT 0

The TOP option is in general the better option. Look the two up in books online.

sql

How to control the loading of SqlDataSource?

I have an SqlDatSource that I have fully setup at design time, but I don't want it to open and load as soon as the page loads, instead I want to open it based on a condition.

How do you do that with a DataSource?

I know that I can simply remove the Select query, and then set it at run time, but I'm looking for something better, that allows me to have the Select query set at design time, in part because I have a lot of parameters.

Usually you have a control such as GridView or DetailsView that is connected to the SqlDataSource through its DataSourceId attribute. This will cause it to execute the query. If you leave the attribute empty the query will not be executed. From code you can set the DataSource and then call DataBind(). That will cause the SqlDataSource to execute:

GridView1.DataSource = SqlDataSource1;GridView1.DataBind();// Now the query is executed
|||

Within the SqlSataSource.Selecting event, you will have access to the Cancel property which you can set based on your conditions. If Cancel is set to True, then the Select event will not occur.

|||

while michielvoo's way is probably better, another way you can get the date to not display is to just set the GridView's Visible="false" initially, if you want the datasourceID property of the sqldatasource to be defined in the contol creation. Then, in your button_click event or whatever you do to get the data, you do:

VB:

GridView1.DataBind()
GridView1.Visible = True

C#:

GridView1.DataBind();
GridView1.Visible = True;

how to control the distance between the two matrix? or (matirx and table )

hi everyone:

the report show two tables two matrixs

how can i control the distance between them

I want to set the same distance between the table and matrix

or (table and table )

Younger,

You could possible place your tables and Matrix each inside of a rectangle and then maintain the distance between your rectangle should get you to your desired results.

Ham

|||

Ham

Thank you very much

Your idea is good, that is worked well.

Younger

How to control SqlDataSource if we know only DataSourceID ?

Anyone can help me ?Smile

Can you explain your issue? The DataSourceID points to the ID of your SqlDataSource. The SqlDataSource defines a SelectCommand which builds the collection of items which are bound to your databound control.

You can even have more than 1 databound control on the page with the same DataSourceID, like a GridView and a DetailsView. As you select a row in the GridView you can use the DetailsView to edit the row. There are many examples online for databound controls.

Try this...

http://www.asp.net/learn/dataaccess/default.aspx?tabid=63

|||

In context I have an DataSourceID, I want to change SelectCommand of SqlDataSource(before I don't know how to do this-this is my problem)

But now I know -the decision is using method FindControl

anyway Thank you very much !

Now I have a new question !

The question is how to know column's name of DataSource(not DataSet) ?

Do you know this ?

|||

To update the SelectCommand you can do it manually in the code view as opposed to design view. You can also use the wizard to update the SqlDatasource.

For knowing the column's name, that all depends on the Datasource. If the Datasource is not a DataSet and is instead a collection of objects the column name could be one of the properties on the objects.

Or are you thinking of a DataTable? When a SQL result is bound to a GridView using a SqlDatasource it does return a DataSet and it assumes it will use the first DataTable on the DataSet.

ds.Tables[0]

Is this what you needed to know?

|||

offwhite:

To update the SelectCommand you can do it manually in the code view as opposed to design view. You can also use the wizard to update the SqlDatasource.

For knowing the column's name, that all depends on the Datasource. If the Datasource is not a DataSet and is instead a collection of objects the column name could be one of the properties on the objects.

Or are you thinking of a DataTable? When a SQL result is bound to a GridView using a SqlDatasource it does return a DataSet and it assumes it will use the first DataTable on the DataSet.

ds.Tables[0]

Is this what you needed to know?

reality I don't understand you !

All I have :that is SqlDataSource

All I need :that is names of columns

But I don't know how...

:(

How to control SQL Server 2005 Express installed as a "prerequisite"


Suppose I check "SQL Server 2005 Express Edition" as one of the prerequisites for a custom app in a Windows Setup project.

From reading whatever docs I could get my hands on, it's still not clear to me how to control the installation of SQL Server Express with respect to things like instance name, service account, etc, etc.

In other words, this is stuff that's normally the domain of template.ini. However, there's no clear indication of where I should put template.ini so that the install of "prerequisite" SQL Server Express will see it and configure accordingly...

Thanks in advance to anyone who can help solve this...

Josh

Josh, template.ini is not used for configuration settings (as the .iss files were in SQL 2000). This file merely is used as documentation for creating silent installs by describing which flags are used in various situations.

As for another application installing SQL 2005 Express, I would assume that the application is controlling the install (instance name, accounts, etc) so that it can connect after install. If they are not exposing these install features during their install, they probably are using some default values for all installs.

Thanks,
Samuel Lester (MSFT)

|||

Samuel:

Yep, it looks like the parameters (at least, all the ones I tried) are recognized when supplied on the command line.

One parameter I haven't been able to find, though, is one that tells SQL Server Express Edition to use port 1433 instead of dynamic ports. I know about DISABLENETWORKPROTOCOLS (and it, too, works as expected), but it only activates TCP -- it doesn't affect the port-assignment scheme.

Thanks,
Josh

How to control SQL Server 2000 login and logout Method / Event.

Thanks !
Is there a question somewhere in that post?
*mike hodgson* |/ database administrator/ | mallesons stephen jaques
*T* +61 (2) 9296 3668 |* F* +61 (2) 9296 3885 |* M* +61 (408) 675 907
*E* mailto:mike.hodgson@.mallesons.nospam.com |* W* http://www.mallesons.com
SOHO wrote:
|||Hi,
Did you mean the Enable auditing in SQL Server 2000 Login/ Logout, Then
there is no control to control those.
Could you please explain us in details about your actual requirement?
Thanks
Hari
SQL Server MVP
"SOHO" <hkwin2000@.hotmail.com> wrote in message
news:%23$0ZCplcFHA.3032@.TK2MSFTNGP10.phx.gbl...
>
> --
> Thanks !
>
>
|||Sorry!
Thanks !
"SOHO" <hkwin2000@.hotmail.com> glsD:%23$0ZCplcFHA.3032@.TK2MSFTNGP10.phx .gbl...
>
> --
> Thanks !
>
>
sql

How to control SQL Server 2000 login and logout Method / Event.

Thanks !
Is there a question somewhere in that post?
*mike hodgson* |/ database administrator/ | mallesons stephen jaques
*T* +61 (2) 9296 3668 |* F* +61 (2) 9296 3885 |* M* +61 (408) 675 907
*E* mailto:mike.hodgson@.mallesons.nospam.com |* W* http://www.mallesons.com
SOHO wrote:
|||Please don't cross post
Greg Jackson
PDX, Oregon
|||Hi,
Did you mean the Enable auditing in SQL Server 2000 Login/ Logout, Then
there is no control to control those.
Could you please explain us in details about your actual requirement?
Thanks
Hari
SQL Server MVP
"SOHO" <hkwin2000@.hotmail.com> wrote in message
news:%23$0ZCplcFHA.3032@.TK2MSFTNGP10.phx.gbl...
>
> --
> Thanks !
>
>
|||Sorry!
Thanks !
"SOHO" <hkwin2000@.hotmail.com> glsD:%23$0ZCplcFHA.3032@.TK2MSFTNGP10.phx .gbl...
>
> --
> Thanks !
>
>

How to control SQL Server 2000 login and logout Method / Event.

Thanks !
Is there a question somewhere in that post?
*mike hodgson* |/ database administrator/ | mallesons stephen jaques
*T* +61 (2) 9296 3668 |* F* +61 (2) 9296 3885 |* M* +61 (408) 675 907
*E* mailto:mike.hodgson@.mallesons.nospam.com |* W* http://www.mallesons.com
SOHO wrote:
|||Hi,
Did you mean the Enable auditing in SQL Server 2000 Login/ Logout, Then
there is no control to control those.
Could you please explain us in details about your actual requirement?
Thanks
Hari
SQL Server MVP
"SOHO" <hkwin2000@.hotmail.com> wrote in message
news:%23$0ZCplcFHA.3032@.TK2MSFTNGP10.phx.gbl...
>
> --
> Thanks !
>
>
|||Sorry!
Thanks !
"SOHO" <hkwin2000@.hotmail.com> glsD:%23$0ZCplcFHA.3032@.TK2MSFTNGP10.phx .gbl...
>
> --
> Thanks !
>
>

How to control SQL Server 2000 login and logout Method / Event.

--
Thanks !This is a multi-part message in MIME format.
--080702060202030100030105
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Is there a question somewhere in that post?
--
*mike hodgson* |/ database administrator/ | mallesons stephen jaques
*T* +61 (2) 9296 3668 |* F* +61 (2) 9296 3885 |* M* +61 (408) 675 907
*E* mailto:mike.hodgson@.mallesons.nospam.com |* W* http://www.mallesons.com
SOHO wrote:
--080702060202030100030105
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<tt>Is there a question somewhere in that post?</tt>
<div class="moz-signature">
<title></title>
<meta http-equiv="Content-Type" content="text/html; ">
<p><span lang="en-au"><font face="Tahoma" size="2">--<br>
</font> </span><b><span lang="en-au"><font face="Tahoma" size="2">mike
hodgson</font></span></b><span lang="en-au"> <font face="Tahoma"
size="2">|</font><i><font face="Tahoma"> </font><font face="Tahoma"
size="2"> database administrator</font></i><font face="Tahoma" size="2">
| mallesons</font><font face="Tahoma"> </font><font face="Tahoma"
size="2">stephen</font><font face="Tahoma"> </font><font face="Tahoma"
size="2"> jaques</font><font face="Tahoma"><br>
</font><b><font face="Tahoma" size="2">T</font></b><font face="Tahoma"
size="2"> +61 (2) 9296 3668 |</font><b><font face="Tahoma"> </font><font
face="Tahoma" size="2"> F</font></b><font face="Tahoma" size="2"> +61
(2) 9296 3885 |</font><b><font face="Tahoma"> </font><font
face="Tahoma" size="2">M</font></b><font face="Tahoma" size="2"> +61
(408) 675 907</font><br>
<b><font face="Tahoma" size="2">E</font></b><font face="Tahoma" size="2">
<a href="http://links.10026.com/?link=mailto:mike.hodgson@.mallesons.nospam.com">
mailto:mike.hodgson@.mallesons.nospam.com</a> |</font><b><font
face="Tahoma"> </font><font face="Tahoma" size="2">W</font></b><font
face="Tahoma" size="2"> <a href="http://links.10026.com/?link=/">http://www.mallesons.com">
http://www.mallesons.com</a></font></span> </p>
</div>
<br>
<br>
SOHO wrote:
</body>
</html>
--080702060202030100030105--|||Hi,
Did you mean the Enable auditing in SQL Server 2000 Login/ Logout, Then
there is no control to control those.
Could you please explain us in details about your actual requirement?
Thanks
Hari
SQL Server MVP
"SOHO" <hkwin2000@.hotmail.com> wrote in message
news:%23$0ZCplcFHA.3032@.TK2MSFTNGP10.phx.gbl...
>
> --
> Thanks !
>
>|||Sorry!
--
Thanks !
"SOHO" <hkwin2000@.hotmail.com> ¼¶¼g©ó¶l¥ó·s»D:%23$0ZCplcFHA.3032@.TK2MSFTNGP10.phx.gbl...
>
> --
> Thanks !
>
>

How to control SQL Server 2000 login and logout Method / Event.

How to control SQL Server 2000 login and logout Method / Event.Is there a question somewhere in that post?
*mike hodgson* |/ database administrator/ | mallesons stephen jaques
*T* +61 (2) 9296 3668 |* F* +61 (2) 9296 3885 |* M* +61 (408) 675 907
*E* mailto:mike.hodgson@.mallesons.nospam.com |* W* http://www.mallesons.com
SOHO wrote:|||Hi,
Did you mean the Enable auditing in SQL Server 2000 Login/ Logout, Then
there is no control to control those.
Could you please explain us in details about your actual requirement?
Thanks
Hari
SQL Server MVP
"SOHO" <hkwin2000@.hotmail.com> wrote in message
news:%23$0ZCplcFHA.3032@.TK2MSFTNGP10.phx.gbl...
>
> --
> Thanks !
>
>|||Sorry!
Thanks !
"SOHO" <hkwin2000@.hotmail.com> glsD:%23$0ZCplcFHA.3032@.TK2MSFTNGP10.phx.gbl...[vbc
ol=seagreen]
>
> --
> Thanks !
>
>[/vbcol]

How to control SQL Server 2000 login and logout Method / Event.

Thanks !
Is there a question somewhere in that post?
*mike hodgson* |/ database administrator/ | mallesons stephen jaques
*T* +61 (2) 9296 3668 |* F* +61 (2) 9296 3885 |* M* +61 (408) 675 907
*E* mailto:mike.hodgson@.mallesons.nospam.com |* W* http://www.mallesons.com
SOHO wrote:
|||Hi,
Did you mean the Enable auditing in SQL Server 2000 Login/ Logout, Then
there is no control to control those.
Could you please explain us in details about your actual requirement?
Thanks
Hari
SQL Server MVP
"SOHO" <hkwin2000@.hotmail.com> wrote in message
news:%23$0ZCplcFHA.3032@.TK2MSFTNGP10.phx.gbl...
>
> --
> Thanks !
>
>
|||Sorry!
Thanks !
"SOHO" <hkwin2000@.hotmail.com> glsD:%23$0ZCplcFHA.3032@.TK2MSFTNGP10.phx .gbl...
>
> --
> Thanks !
>
>
sql