Showing posts with label local. Show all posts
Showing posts with label local. Show all posts

Friday, March 30, 2012

Hide fields with blank value

I am creataing a report with a Local Mode report and ReportViewer. Part of the report has an address:

[FName] [LName]
[Address1]
[Address2]
[City] [State] [ZIP]
[Phone]

So the data might come out on the report:

John Doe
123 Fake Street
Suite 32
Somewhere USA 00101
(800) 555-1212

Which is great, except if address2 is blank (as in most cases it is) it comes out:

John Doe
123 Fake Street

Somewhere USA 00101
(800) 555-1212

How can I make it Hide the [Address2] Field if it is blank, so that extrat line space is taken out?

Thanks

UPDATE** - As soon as i posted this site i realized when you use the expression for this, it should be =Field(Value) = "". I had =Field(Value) <> "". I was backwards. Sorry for the uncecessary post.

In the visibility property of textbox give the expression as

IIF(Len(Fields.Address2.value)>0,True,False)

Thanks

SubbuSmile

Monday, March 26, 2012

Hidden User?

Did a remote backup of a database used to run a live website.
Restored the database to my local MSDE installation.
Now cannot access the local database using the user login FRED, which is the
same as the website, as I use it for local testing. Get error message:
cannot open user default database login failed.
Cannot see FRED the user anywhere, yet if I look under Roles, FRED is listed
as a db_owner.
If try and add FRED, get error saying User or Role already exists on this
database.
How can I reactivate FRED on my local server?
hi Kevin,
"Kevin" <kevgrim@.tesco.net> ha scritto nel messaggio
news:%23BNg60wdEHA.2520@.TK2MSFTNGP12.phx.gbl...
> Did a remote backup of a database used to run a live website.
> Restored the database to my local MSDE installation.
> Now cannot access the local database using the user login FRED, which is
the
> same as the website, as I use it for local testing. Get error message:
> cannot open user default database login failed.
> Cannot see FRED the user anywhere, yet if I look under Roles, FRED is
listed
> as a db_owner.
> If try and add FRED, get error saying User or Role already exists on this
> database.
> How can I reactivate FRED on my local server?
>
this problem is known as "orphaned users"... you can have a look at a
perfect article by Neil Boyl abot the matter at
http://www.sqlservercentral.com/colu...okenlogins.asp
the system stored procedure sp_chang_users_logins use is explained for
solving your trouble
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.8.0 - DbaMgr ver 0.54.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply

Monday, March 12, 2012

Heterogeneous Query Internals

when executing a query joining a local table to a linked server's table, or when querying the linked server's table directly through a local session, does the engine "pass through" to the linked engine the query portion that can be addressed by that server?

for example. . .


select local.master, linked.detail
from mydb.dbo.mytable local inner join linked.yourdb.dbo.yourtable linked
on local.id = linked.id
where linked.lastname = 'smith'

is the engine smart enough pass the " linked.lastname = 'smith' " to the linked engine before doing the join?

or


select linked.*
from linked.yourdb.dbo.yourtable linked
where linked.lastname = 'smith'

does the engine pass the " linked.lastname = 'smith' " to the linked server for it to process?

any reference links would be helpful.

Blair,

Sometimes yes, sometimes no. You should be able to see the remote query by generating the estimated execution plan in SQL Server Management Studio, then hovering the mouse cursor over the remote query operator. The query processor certainly makes some attempt to remote the predicates, but for string equality, the processor can only do so if the remote server has a compatible collation. The query needs to evaluate = 'smith' according to the local collation, and the remote server may or may not be able to do so.

Steve Kass
Drew University
www.stevekass.com