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

Friday, March 30, 2012

newbie question describing tables

How can I print the structure of a table from Enterprise Manager?
Or is there another app that has a print option?"MacKenzieMouse" <no-spamkeyconc@.yahoo.com> wrote in message
news:JrmdnX6w396rZ2XcRVn-1w@.comcast.com...
> How can I print the structure of a table from Enterprise Manager?
> Or is there another app that has a print option?

You can create and print database diagrams in EM (right-click Diagrams, New
Diagram), or if you use a third-party data modelling tool (Erwin,
Embarcadero etc.) then it would be able to do the same thing. If the CREATE
TABLE script is good enough, then you can generate it in Query Analyzer
(right-click a table in the Object Browser), then print the resulting
script.

Simon|||To print the structure of a table from Query Analyzer just print the
ouput of EXEC sp_help 'table_name' or a query from the
information_schema.columns table.
--
David Portas
SQL Server MVP
--|||David Portas wrote:
> To print the structure of a table from Query Analyzer just print the
> ouput of EXEC sp_help 'table_name' or a query from the
> information_schema.columns table.
> --
> David Portas
> SQL Server MVP
> --

How do I print it ?
Is there any way to do that using the Query Analayzer ?|||Select the Text ouput option (CTRL+T), run the query, select the
Results tab then File/Print or CTRL+P.
--
David Portas
SQL Server MVP
--|||Works great! Thanks !|||MacKenzieMouse wrote:
> How can I print the structure of a table from Enterprise Manager?
> Or is there another app that has a print option?
Thanks to all that helped!sql

Friday, March 23, 2012

Newbie Question

How do I create a report in SQL?
I have a database created with a table that has names
I would like to print the table out by last name in ascending order.
Any ideas or help?
Thanks
Tom
----
I am using the free version of SPAMfighter for private users.
It has removed 61 spam emails to date.
Paying users do not have this message in their emails.
Try SPAMfighter for free now!If I'm understanding you correctly, you will want to open the Business
Intelligence Development environment, create a new reporting services
project and follow the report creation wizard and for the query enter
something like:
select * from NamesTable order by names
Hope this helps.
Regards,
Enrique Martinez
Sr. SQL Server Developer
Thomas Grassi wrote:
> How do I create a report in SQL?
> I have a database created with a table that has names
> I would like to print the table out by last name in ascending order.
> Any ideas or help?
> Thanks
> Tom
> ----
> I am using the free version of SPAMfighter for private users.
> It has removed 61 spam emails to date.
> Paying users do not have this message in their emails.
> Try SPAMfighter for free now!|||The way you have asked, I can make out your are very new... to SSRS..
Anyways the great way to start SSRS is to go to SQL 2005 online help
find "Reporting Services Tutorial" from the left pane and select the
"Creating a Basic Report" and go through all the 6 lessons, they are very
simple and you can start using RS for your purpose.
Amarnath, MCTS.
"Thomas Grassi" wrote:
> How do I create a report in SQL?
> I have a database created with a table that has names
> I would like to print the table out by last name in ascending order.
> Any ideas or help?
> Thanks
> Tom
> ----
> I am using the free version of SPAMfighter for private users.
> It has removed 61 spam emails to date.
> Paying users do not have this message in their emails.
> Try SPAMfighter for free now!
>
>

Wednesday, March 21, 2012

Newbie Print Layout problem

When I export a file to any medium (PDF/Excel) I try, the layout is not the
same as what the layout is in the Layout tab.
There's a whole lot of space between the columns, so they don't all fit on
the page (Portrait style), therefore, the PDFs and Excel sheets are way off
Any hints here that I can use to make the print layout look like what I
design in the Layout Tab of the Reporting Services 2005 Design Area?On Jan 8, 11:03 am, "Elmo Watson" <s...@.here.com> wrote:
> When I export a file to any medium (PDF/Excel) I try, the layout is not the
> same as what the layout is in the Layout tab.
> There's a whole lot of space between the columns, so they don't all fit on
> the page (Portrait style), therefore, the PDFs and Excel sheets are way off
> Any hints here that I can use to make the print layout look like what I
> design in the Layout Tab of the Reporting Services 2005 Design Area?
You should be able to start here.
Layout tab >> Report drop-down >> Report Properties... >> Layout tab.
If this does not compact the report enough, you could try putting
multiple report controls (i.e., table control(s), matrix control(s),
textbox(es), etc) into a rectangle. Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant

Monday, March 12, 2012

Newbie Here: headers print even though drill down not clicked

I have a report containing drill down detail. The headers for the drill down
detail prints even at the summary level. This is causing two pages to print
for every one due to the headings. How can I turn the headers off unless the
user has selected to view the drill down data.
Any help would be greatly appreciated. Thanks!Hello,
Try setting the visibility of that header row to toggled by the same field
as the detail row.
Cheers,
Kathy
"Wishing I was skiing mom" wrote:
> I have a report containing drill down detail. The headers for the drill down
> detail prints even at the summary level. This is causing two pages to print
> for every one due to the headings. How can I turn the headers off unless the
> user has selected to view the drill down data.
> Any help would be greatly appreciated. Thanks!|||Thanks for your suggestion. Unfortunately I receive an error message
indicating that the toggle item must share the same scope.
Thanks again,
Jackie
"Kathy" wrote:
> Hello,
> Try setting the visibility of that header row to toggled by the same field
> as the detail row.
> Cheers,
> Kathy
> "Wishing I was skiing mom" wrote:
> > I have a report containing drill down detail. The headers for the drill down
> > detail prints even at the summary level. This is causing two pages to print
> > for every one due to the headings. How can I turn the headers off unless the
> > user has selected to view the drill down data.
> >
> > Any help would be greatly appreciated. Thanks!

Friday, March 9, 2012

Newbie CURSOR question, insert values into a table?

How can I insert values into a table based on the fetch I do. The examples
I have been able to find all shows how to use "print" to show how Cursors
work.

I want to read through a table, and only insert values into another table if
some conditions on the row is true.

Can this be done, if so how?

Thanks in advance.

Henrik.You can do this, but in general you should avoid cursors unless there
is no other choice. It may be that your cursor can be written as a
single insert statement, in which case it will be a lot faster and
easier to code. See below for a rough example.

Simon

/* With a cursor */

declare @.var1 int, @.var2 int

declare cur cursor fast_forward for
select col1, col2
from dbo.table1

open cur

fetch cur into @.var1, @.var2

while @.@.fetch_status = 0
begin
if @.var1 > @.var2 -- check conditions
begin
insert into dbo.table2 (col1, col2)
select @.var1, @.var2
end

fetch cur into @.var1, @.var2
end

close cur
deallocate cur

/* With an insert */

insert into dbo.table2 (col1, col2)
select col1, col2
from dbo.table1
where col1 > col2

"Henrik Hjllund Hansen" <hh@.dlf.dk> wrote in message news:<be367e$2fng$1@.news.cybercity.dk>...
> How can I insert values into a table based on the fetch I do. The examples
> I have been able to find all shows how to use "print" to show how Cursors
> work.
> I want to read through a table, and only insert values into another table if
> some conditions on the row is true.
> Can this be done, if so how?
> Thanks in advance.
> Henrik.|||Hi,

Refer solution below:

Entity/Objects:
(Assume all fields in this example are varchar).

Table1 (Field1,Field2)
Table2 (Field1,Field2, Field3)

Script:
Declare @.F1 Varchar, @.F2 Varchar

--Get records
Declare RS cursor for Select Field1, Field2 from Table1 Where Field1=
A%'
Open RS --Open cursor

Fetch Next From RS into @.F1, @.F2
While @.@.Fetch_Status=0 --Check cursor if end of file
Begin
--Your insert in second table if condition matches.
If RTrim(@.F1) = ABC' And RTrim(@.F2) = Google'
Begin
--Post script to insert in Table2
Insert Into Table2

End

Fetch Next From RS into @.F1, @.F2
End

Close RS --Close cursor
Deallocate RS --relaese memory.

For additional information on updating selected columns in cursor and
complete syntax refer SQL Server Books Online sections.
a)DECLARE CURSOR
b)@.@.Fetch_Status

Hope this helps you.
Thanks Amit

"Henrik Hjllund Hansen" <hh@.dlf.dk> wrote in message news:<be367e$2fng$1@.news.cybercity.dk>...
> How can I insert values into a table based on the fetch I do. The examples
> I have been able to find all shows how to use "print" to show how Cursors
> work.
> I want to read through a table, and only insert values into another table if
> some conditions on the row is true.
> Can this be done, if so how?
> Thanks in advance.
> Henrik.|||Thanks a lot for your answers.

Henrik

"Henrik Hjllund Hansen" <hh@.dlf.dk> wrote in message
news:be367e$2fng$1@.news.cybercity.dk...
> How can I insert values into a table based on the fetch I do. The
examples
> I have been able to find all shows how to use "print" to show how Cursors
> work.
> I want to read through a table, and only insert values into another table
if
> some conditions on the row is true.
> Can this be done, if so how?
> Thanks in advance.
> Henrik.

Monday, February 20, 2012

Newbe Questions

I am familier with crystal and just starting SSRS.

How do you set the report to print in Landscape?

How do you like combine two fields into a label with some additional text added it to build your custom label?

Salameh,

If you are developing in Visual Studio/Business Intelligence Dev. Studio, you can set the layout of the report by changing the Page width/height to be 11 by 8.5 instead of 8.5 by 11. You can do this in the properties window, or you can right-click below the report and select properties, and change the dimensions on the Layout tab.

To combine two fields with additional text, you could do something like the following...

="Field A is " & Fields!FieldA.Value & ", and Field B is " & Fields!FieldB.Value & "."

Hope that helps