Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 get x number of "blank records"

Author  Topic 

Vivaldi
Constraint Violating Yak Guru

298 Posts

Posted - 2005-07-27 : 16:18:50
Hey all,

I am working on a stored proc that returns some report data to crystal reports. Since crystal is pretty inflexible, I need to return the report data, and x number (say 10) blank rows of data (with all the same field names)

so I have
Select blah from table
UNION ALL
Select '10 blank rows'


I know a table type, filled with a while loop, and joined would work, but I was thinking their could be some really cool efficient way.

any pointers?

________________________________________________

Working man's privilege, beer is.
Harsh, Life is.


jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2005-07-27 : 16:32:43
Can I ask why you need 10 blank rows ? Crystal, while not perfect and sometimes quite maddening, is certainly pretty flexible in my opinion if you take the time to deal with it's "quirks".

- Jeff
Go to Top of Page

rockmoose
SQL Natt Alfen

3279 Posts

Posted - 2005-07-27 : 16:38:13
SELECT TOP 10 0,0,0 FROM sysobjects
is one way.

I'm glad I don't do Crystal anymore. Left off at v7.
Jeff is probably right though.

rockmoose
Go to Top of Page

Vivaldi
Constraint Violating Yak Guru

298 Posts

Posted - 2005-07-27 : 16:43:42
Well,

I am not a crystal guy, but the crystal developer says you cannot add extra rows or do more than one query per report, so everything has to come back as one result set.

this report is printed out for people, and they need the ability to "pencil in" new items, or changes (hence the blank lines.)

thanks.

quote:
Originally posted by rockmoose

SELECT TOP 10 0,0,0 FROM sysobjects
is one way.

I'm glad I don't do Crystal anymore. Left off at v7.
Jeff is probably right though.

rockmoose



________________________________________________

Working man's privilege, beer is.
Harsh, Life is.


Go to Top of Page

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2005-07-27 : 17:30:22
Time to hire anew crystal developer! Look up `subreports` in the crystal on-line help. You can have many, many different recordsets and reports all linked into one quite easily.

- Jeff
Go to Top of Page

Vivaldi
Constraint Violating Yak Guru

298 Posts

Posted - 2005-07-27 : 17:40:55
quote:
Originally posted by jsmith8858

Time to hire anew crystal developer! Look up `subreports` in the crystal on-line help. You can have many, many different recordsets and reports all linked into one quite easily.

- Jeff



Huh, it sounded a bit fishy.... We are moving over to Sql Reporting eventually anyway. Crystal is aweful expensive.....

and we are an MS shop with a good amount of SQL knowledge about....

________________________________________________

Working man's privilege, beer is.
Harsh, Life is.


Go to Top of Page
   

- Advertisement -