Monday, March 19, 2012

collapsing address lines (remove blank lines)

Well I've seen several related posts but nothing seems to exactly fit
what I need. I real new to RS so bare with me. What I have is a
stored procedure that returns several elements of an address per row.
For instance, Name1, Name2, Name3, Street1, Street2, CityStateZip.
What I need is to collapse the address to where there are no blanks.
For example:
Name1=Michael, Name2=Dale, Name3 is blank, Street1=ABC St., Street2=is
blank, and CityStateZip = LittleRockArkansas72201
I need the data to look like:
Michael
Dale
ABC St.
LittleRockArkansas72201
and not like:
Michael
Dale
ABC St.
LittleRockArkansas72201
Any help would be greatly appreciated.On Oct 24, 5:34 pm, mlafarl...@.yahoo.com wrote:
> Well I've seen several related posts but nothing seems to exactly fit
> what I need. I real new to RS so bare with me. What I have is a
> stored procedure that returns several elements of an address per row.
> For instance, Name1, Name2, Name3, Street1, Street2, CityStateZip.
> What I need is to collapse the address to where there are no blanks.
> For example:
> Name1=Michael, Name2=Dale, Name3 is blank, Street1=ABC St., Street2=is
> blank, and CityStateZip = LittleRockArkansas72201
> I need the data to look like:
> Michael
> Dale
> ABC St.
> LittleRockArkansas72201
> and not like:
> Michael
> Dale
> ABC St.
> LittleRockArkansas72201
> Any help would be greatly appreciated.
What you will want to do is filter out the empty records via: right-
click the table control >> select Properties >> select the Filters tab
>> below Expression select: Fields!address.value >> below Operator
select != >> below Value enter =Nothing.
Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant|||On Oct 24, 6:34 pm, mlafarl...@.yahoo.com wrote:
> Well I've seen several related posts but nothing seems to exactly fit
> what I need. I real new to RS so bare with me. What I have is a
> stored procedure that returns several elements of an address per row.
> For instance, Name1, Name2, Name3, Street1, Street2, CityStateZip.
> What I need is to collapse the address to where there are no blanks.
> For example:
> Name1=Michael, Name2=Dale, Name3 is blank, Street1=ABC St., Street2=is
> blank, and CityStateZip = LittleRockArkansas72201
> I need the data to look like:
> Michael
> Dale
> ABC St.
> LittleRockArkansas72201
> and not like:
> Michael
> Dale
> ABC St.
> LittleRockArkansas72201
> Any help would be greatly appreciated.
Set the Visibility > Hidden property for each line/row to somthing
like this:
=IIF(Name3 = Nothing, True, False) or =IIF(Street2 = Nothing, True,
False)
Make sure you set the property for the row and not individual cells
otherwise it will not close the white space left by the hidden row.
HTH
toolman|||On Oct 25, 12:50 pm, toolman <t...@.infocision.com> wrote:
> On Oct 24, 6:34 pm, mlafarl...@.yahoo.com wrote:
>
> > Well I've seen several related posts but nothing seems to exactly fit
> > what I need. I real new to RS so bare with me. What I have is a
> > stored procedure that returns several elements of anaddressper row.
> > For instance, Name1, Name2, Name3, Street1, Street2, CityStateZip.
> > What I need is to collapse theaddressto where there are no blanks.
> > For example:
> > Name1=Michael, Name2=Dale, Name3 is blank, Street1=ABC St., Street2=is
> > blank, and CityStateZip = LittleRockArkansas72201
> > I need the data to look like:
> > Michael
> > Dale
> > ABC St.
> > LittleRockArkansas72201
> > and not like:
> > Michael
> > Dale
> > ABC St.
> > LittleRockArkansas72201
> > Any help would be greatly appreciated.
> Set the Visibility > Hidden property for each line/row to somthing
> like this:
> =IIF(Name3 = Nothing, True, False) or =IIF(Street2 = Nothing, True,
> False)
> Make sure you set the property for the row and not individual cells
> otherwise it will not close the white space left by the hidden row.
> HTH
> toolman
When you're recommending these solutions, are you clear that each row
has the address information like:
12345, Bob, Smith, ABC st., , St.Louis MO 43234
45323, Mark, Jones, DEF st, Suite 1, LR AR 72432|||On Oct 26, 10:07 am, mlafarl...@.yahoo.com wrote:
> On Oct 25, 12:50 pm, toolman <t...@.infocision.com> wrote:
>
>
> > On Oct 24, 6:34 pm, mlafarl...@.yahoo.com wrote:
> > > Well I've seen several related posts but nothing seems to exactly fit
> > > what I need. I real new to RS so bare with me. What I have is a
> > > stored procedure that returns several elements of anaddressper row.
> > > For instance, Name1, Name2, Name3, Street1, Street2, CityStateZip.
> > > What I need is to collapse theaddressto where there are no blanks.
> > > For example:
> > > Name1=Michael, Name2=Dale, Name3 is blank, Street1=ABC St., Street2=is
> > > blank, and CityStateZip = LittleRockArkansas72201
> > > I need the data to look like:
> > > Michael
> > > Dale
> > > ABC St.
> > > LittleRockArkansas72201
> > > and not like:
> > > Michael
> > > Dale
> > > ABC St.
> > > LittleRockArkansas72201
> > > Any help would be greatly appreciated.
> > Set the Visibility > Hidden property for each line/row to somthing
> > like this:
> > =IIF(Name3 = Nothing, True, False) or =IIF(Street2 = Nothing, True,
> > False)
> > Make sure you set the property for the row and not individual cells
> > otherwise it will not close the white space left by the hidden row.
> > HTH
> > toolman
> When you're recommending these solutions, are you clear that each row
> has the address information like:
> 12345, Bob, Smith, ABC st., , St.Louis MO 43234
> 45323, Mark, Jones, DEF st, Suite 1, LR AR 72432- Hide quoted text -
> - Show quoted text -
When you're speaking of rows, do you mean rows in your report or rows
returned from your stored proc (your dataset). It looks like you're
meaning the latter.
To get the results you describe in your first post, my suggestion is
to use a table data region in the body of your report. Drag the Table
from the Toolbox into the report body. By default the table starts
with a header, a footer and one detail row each with three columns.
You may or may not want to keep the header and footer rows but you
will definitely want to add as many additional detail rows you need to
allow for all your fields. Then drag your fields from the Datasets
pane into the table.
It should follow this pattern:
--Column1--Column2--Column3
DetailRow1--(Name1 field)
DetailRow2--(Name2 field)
DetailRow3--(Name3 field)
DetailRow4--(House# field)--(Street1 field)
DetailRow5--(Street2 field)
DetailRow6--(CityStateZip field)
Then (to reiterate and elaborate on my earlier reply) right click the
row handle (gray box, left hand side of table, has three lines in it),
select Properties from the menu.
Scroll to and change the Visibility > Hidden property from False to an
Expression like this:
=IIF(Name1 = Nothing, True, False)
Make sure you set the property for the row and not individual cells
otherwise it will not close the white space left by the hidden row.
Repeat for each of the other detail rows.

No comments:

Post a Comment