Sunday, March 25, 2012
A4/Landscape printing problem
I got a report with page Width 11.6 and Height 8.2 and Body Width 11.1 and
all margins are 0.25.
I want to print it in A4 landscape format. Unfortunately if I set for
default printer HP Desk Jet printer it prints as A4/Landscape correctly, but
if I set for default printer any HP LaserJet printer it tries to print in
Letter/Landscape format and of course it prints empty pages after every page.
I use direct print, SQL2005 Reports
Is there a way to set the printer page Letter or A4? Or to set up all
reports to print at A4 not Letter format?
ThanksHi Ivailo,
it seems that standard settings to printers are to be configured via Control
Panel/Printers and Faxes/<your printer>/Printing Preferences
And this to be repeated for each and any printer.
Saludos, Henrique
Friday, February 24, 2012
a question about Exec
When I run the following command on sql server:
exec ('print "OK"')
go
This message appears:
Server: Msg 128, Level 15, State 1, Line 1
The name 'OK' is not permitted in this context. Only constants,
expressions, or variables allowed here. Column names are not permitted.
Why? Thanks.findu_2005@.yahoo.com (findu_2005@.yahoo.com) writes:
Quote:
Originally Posted by
When I run the following command on sql server:
>
exec ('print "OK"')
go
>
This message appears:
>
Server: Msg 128, Level 15, State 1, Line 1
The name 'OK' is not permitted in this context. Only constants,
expressions, or variables allowed here. Column names are not permitted.
>
Why? Thanks.
Because when the setting QUOTED_IDENTIFIER is in effect, "" delmits
identifier. This permits you to use table names like Order Details, for
instance:
SELECT ... FROM "Order Details"
In the SQL Server world, we tend to use [] for this function, but "" is
what ANSI mandates.
QUOTED_IDENTIFIER is on by default in most contexts, but not when you
run from SQLCMD, OSQL or Enterprise Manager in SQL 2000. Or for that
matter all DB-Library applications.
When the setting is off, SQL Server reverts to the original behaviour
from 4.x days when you couls use both '' and "" to delimit strings.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Something like this will work
exec ('print ''OK''') . *Note: all are single quotes.
or you'll have to use SET QUOTED_IDENTIFIER OFF and then execute the
SQL.
Regards,
Thyagu.