Showing posts with label print. Show all posts
Showing posts with label print. Show all posts

Tuesday, March 27, 2012

Extra page in print preview and .pdf

I have tried and tried to get my reports to quit printing an extra blank page but have been unsuccessful in my efforts.

I've set the margins in my report properties to (all in inches):

.75 - top

.5 - left, right, bottom

My page is landscape so the width is 11 and the height is 8.5

I've made sure my table is not wider than 9.5 - I've even made it as small as 8" wide to see if that was the problem . (I've done this for the header/footer as well.)

My report prints all on one page but I still get a 2nd page with header/footer information and a blank body.

I read a post that said to try making the right margin 0 - that didn't work either.

Additional information: I just saw a post suggesting borders around everything to see what might be bleeding onto a 2nd page.

One page 1, the full borders are there, so nothing should be bleeding onto page 2. However, when I go to page 2, there are no borders around the header, but the left edge shows on the right side of the page. Also, the footer is missing it's left edge, but the right shows. I've tried making both the header and footer smaller, as well as moving them further right - still get the exact issue.

I'm using the reporting services for Visual Studio .NET 2003.

Any help would be greatly appreciated! Thanks!

Well, turns out it was the layout. Although my report elements were the right size, the layout was too big, forcing the margins over.|||

It is COOL that your posted your results!

|||

Hello - just a general comment!

I have eliminated the capability to export to PDF within RS in that PDF NEVER renders any ledgeable characters in my part of the world which includes:

Thailand, Cambodia, Laos, Mayamar (Burma), Vietnam, Pakistan and Tibet and this also includes any dialect in Mandarin!

We just stick to a TIF and everything is always perfect -

|||

When you say your layout was too big, what did you set it too?

Just curious, since I was having an issue similar to yours although I might not have worded it as clearlyWink [;)]

http://forums.asp.net/1139722/ShowPost.aspx

Thanks

sql

Monday, March 19, 2012

Extended Stored Proc write to ERRORLOG?

Is there a way to do something like raiserror using the extended stored
procedure API?
srv_sendmsg gets me the equivalent of PRINT but it doesn't get logged
in the SQL Server Logs.
Any suggestions?
Thank you.How about xp_logevent?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<nimai.malle@.gmail.com> wrote in message
news:1146514341.086831.176790@.j73g2000cwa.googlegroups.com...
> Is there a way to do something like raiserror using the extended stored
> procedure API?
> srv_sendmsg gets me the equivalent of PRINT but it doesn't get logged
> in the SQL Server Logs.
> Any suggestions?
> Thank you.
>|||I'm looking for something that I can call from inside my own extended
stored procedure, from C++.
Thanks.

Extended Stored Proc write to ERRORLOG?

Is there a way to do something like raiserror using the extended stored
procedure API?
srv_sendmsg gets me the equivalent of PRINT but it doesn't get logged
in the SQL Server Logs.
Any suggestions?
Thank you.How about xp_logevent?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<nimai.malle@.gmail.com> wrote in message
news:1146514341.086831.176790@.j73g2000cwa.googlegroups.com...
> Is there a way to do something like raiserror using the extended stored
> procedure API?
> srv_sendmsg gets me the equivalent of PRINT but it doesn't get logged
> in the SQL Server Logs.
> Any suggestions?
> Thank you.
>|||I'm looking for something that I can call from inside my own extended
stored procedure, from C++.
Thanks.

Friday, February 17, 2012

Exporting the Table Structure...

Hye guys,
I want 2 export the field names and their properties of my tables to a file by which I would be able 2 print it , Study it and share it with my other friends... for discussions...

Which tool can be used 2 export the table stture in a printable format?

Kabin

Why don't you create a Diagram?

|||

Hi Kabin,

You have a few options depending on what you're looking for. You don't mention which version of SQL Server you have, so I'll try to provide instructions for 2000 and 2005 versions.

1. Create a script of the table's definition.

From Management Studio in Object Explorer, right-click the table and point to Script Table as and then select Create to and choose to save it to a file.

or for SQL Server 2000

From Query Analyzer, right-click the table and select Script Object to File as and then select Create.

2. Use sp_help.

From either Management Studio or Query Analyzer run the following statement.

EXEC sp_help ('your_table_name')

3. Create a database diagram.

See Books Online topics for creating database diagrams. (although your print options are somewhat limited with this).

Regards,

Gail

|||

Hi guys,
well I first tried creating diagram and then printing it. It was really litte bit some tedious work as I can only print from it. I can export it to excel or even notepad for formatting also. Diagram gave me really limited feature which is not sufficient.

Secondly I tried with SP_help. It also didn't worked.

THirdlr I tried with creating script for the object or table that worked fine but not also fully as i wanted. I just wanted the column name in left side and its properties in formatted way in right side in 2 column format but well Script also provided me some help.

Thanks Guys.

|||

Actually, sp_help should produce the information you want. Saying "It didn't work" doesn't give us much to go on to help you. Did you get an error message? If so, what was it?

You might want to query the table metadata by using the system tables (in SS 2000) or the catalog views (in SS2005). For example, in SQL Server 2005, you can write a query like the following example to return the table and column names and their properties.

SELECT o.name AS TableName,
c.name AS ColumnName,
t.name AS DataType,
c.Max_Length,
c.Precision,
c.Scale
FROM sys.objects AS o
INNER JOIN sys.columns AS c ON o.object_id = c.object_id
INNER JOIN sys.types AS t ON c.user_type_id = t.user_type_id
WHERE type = 'U'

And here's an equivalent query in SQL Server 2000.

SELECT o.name AS TableName,
c.name AS ColumnName,
t.name AS DataType,
c.length,
c.xprec,
c.xscale
FROM sysobjects AS o
INNER JOIN syscolumns AS c ON o.id = c.id
INNER JOIN systypes AS t ON c.usertype = t.usertype
WHERE o.type = 'U'

I only selected a few column properties. To see all the columns available in the system tables/views, see Books Online.

Regards,

Gail

|||

hi..Guys..

Thanks a lot ur suggestions helped me alot man...

|||

You can get the structure from the query analyser by the command --> sp_help tablename

Exporting the Table Structure...

Hye guys,
I want 2 export the field names and their properties of my tables to a file by which I would be able 2 print it , Study it and share it with my other friends... for discussions...

Which tool can be used 2 export the table stture in a printable format?

Kabin

Why don't you create a Diagram?

|||

Hi Kabin,

You have a few options depending on what you're looking for. You don't mention which version of SQL Server you have, so I'll try to provide instructions for 2000 and 2005 versions.

1. Create a script of the table's definition.

From Management Studio in Object Explorer, right-click the table and point to Script Table as and then select Create to and choose to save it to a file.

or for SQL Server 2000

From Query Analyzer, right-click the table and select Script Object to File as and then select Create.

2. Use sp_help.

From either Management Studio or Query Analyzer run the following statement.

EXEC sp_help ('your_table_name')

3. Create a database diagram.

See Books Online topics for creating database diagrams. (although your print options are somewhat limited with this).

Regards,

Gail

|||

Hi guys,
well I first tried creating diagram and then printing it. It was really litte bit some tedious work as I can only print from it. I can export it to excel or even notepad for formatting also. Diagram gave me really limited feature which is not sufficient.

Secondly I tried with SP_help. It also didn't worked.

THirdlr I tried with creating script for the object or table that worked fine but not also fully as i wanted. I just wanted the column name in left side and its properties in formatted way in right side in 2 column format but well Script also provided me some help.

Thanks Guys.

|||

Actually, sp_help should produce the information you want. Saying "It didn't work" doesn't give us much to go on to help you. Did you get an error message? If so, what was it?

You might want to query the table metadata by using the system tables (in SS 2000) or the catalog views (in SS2005). For example, in SQL Server 2005, you can write a query like the following example to return the table and column names and their properties.

SELECT o.name AS TableName,
c.name AS ColumnName,
t.name AS DataType,
c.Max_Length,
c.Precision,
c.Scale
FROM sys.objects AS o
INNER JOIN sys.columns AS c ON o.object_id = c.object_id
INNER JOIN sys.types AS t ON c.user_type_id = t.user_type_id
WHERE type = 'U'

And here's an equivalent query in SQL Server 2000.

SELECT o.name AS TableName,
c.name AS ColumnName,
t.name AS DataType,
c.length,
c.xprec,
c.xscale
FROM sysobjects AS o
INNER JOIN syscolumns AS c ON o.id = c.id
INNER JOIN systypes AS t ON c.usertype = t.usertype
WHERE o.type = 'U'

I only selected a few column properties. To see all the columns available in the system tables/views, see Books Online.

Regards,

Gail

|||

hi..Guys..

Thanks a lot ur suggestions helped me alot man...

|||

You can get the structure from the query analyser by the command --> sp_help tablename