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 2008 Forums
 Analysis Server and Reporting Services (2008)
 Blank row prior to data row based on bool value

Author  Topic 

AndrewHobbs1989
Starting Member

2 Posts

Posted - 2011-12-23 : 03:15:06
Hi there,

I am setting up a stored proc that returns +- 200 rows

I was wondering if there is simple to to include a blank row prior to a row if that row has a boolen value equal to true?

for example:

column1 column2 boolcolumn column3
NULL NULL NULL NULL
data data true data



thanks!

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-12-23 : 03:17:59
can i ask the need of this requirement? what are you going to do with these blank rows?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

AndrewHobbs1989
Starting Member

2 Posts

Posted - 2011-12-23 : 03:27:49
Hi there,

It is going into an SSRS report - one of the properties returned in the stored proc is a bool value "SpaceBeforeLine".

Based on the data pulled by the procedure - if this value is set to true then then there should be a blank row inserted above the row in question.

I wonder if it may be easier to configure this in SSRS, however if the SQL in the stored proc can be altered to simply return a blank row prior to all rows where this value is true then that would be great.

thanks for the help!
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-12-23 : 03:33:21
quote:
Originally posted by AndrewHobbs1989

Hi there,

It is going into an SSRS report - one of the properties returned in the stored proc is a bool value "SpaceBeforeLine".

Based on the data pulled by the procedure - if this value is set to true then then there should be a blank row inserted above the row in question.

I wonder if it may be easier to configure this in SSRS, however if the SQL in the stored proc can be altered to simply return a blank row prior to all rows where this value is true then that would be great.

thanks for the help!


Its easier and It should be done in SSRS
Its a presentation issue. just add column with blank values in report and set visibility properties to show it only for case where SpaceBeforeLine is true.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -