NetTalk Central

Author Topic: Suppress Blank Rows in a Browse  (Read 2937 times)

JohnNZ

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Email
Suppress Blank Rows in a Browse
« on: August 17, 2008, 12:31:10 AM »
The new feature in 4.31 allowing browse data to span multiple columns opens up new ways of presenting data in browses.   

Something that would be very useful would be being able to fully suppress displaying a whole row in a browse if all cells on it are blank or empty.  Currently if the row is blank it stays as a blank row (note Crystal Reprots has a feature similar to this like this and it is very handy).

Is there a simple way to do this with the NetTalk browses?

Cheers

John

Mike Grigsby

  • Sr. Member
  • ****
  • Posts: 380
    • Yahoo Instant Messenger - onthedotsoftware
    • View Profile
    • MyHomeAssets! Software (among others)
Re: Suppress Blank Rows in a Browse
« Reply #1 on: August 17, 2008, 06:46:30 AM »
Hi John, maybe I'm not following you, but why wouldn't you use a browse filter to do this? If a field (or fields) is null or empty, then don't show it. If it's a lot of cells, you can hand-form the filter in an embed.
Mike Grigsby
Credify Systems
Central Oregon, USA

JohnNZ

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Email
Re: Suppress Blank Rows in a Browse
« Reply #2 on: August 18, 2008, 09:01:37 PM »
Hi Mike

Thanks for the response - my description was a little confusing talking about rows and browses.

I have a multi-row NetTalk browse with where one database row produces several rows in the HTML table and each row is one cell (ie one field wide). 

A good example would be a postal address database table that has 4 fields with Name, Street Address, Suburb and City for each record.  Now I want to create a multi-row NetTalk Browse that has one field per row in the NetTalk Browse. 

And if say the suburb filed is blank for a particular street address , rather than showing an empty row on the NetTalk Browse I want to suppress the row altogether.

Below is an example of what I mean where Hicksville (population 17) has no suburbs in its street addresses:

John Smith
5 Victoria Street
Lake Side
Washington

Jane Doe
21 Main Street
                           
<---------------- how do I suppress this blank row?
Hicksville

Fred Dagg
52 Memorial Avenue
Hillside
Pleasantville



Hope this makes more sense.

Cheers

John

Mike Grigsby

  • Sr. Member
  • ****
  • Posts: 380
    • Yahoo Instant Messenger - onthedotsoftware
    • View Profile
    • MyHomeAssets! Software (among others)
Re: Suppress Blank Rows in a Browse
« Reply #3 on: August 18, 2008, 10:09:17 PM »
Oh, now I've got you. This is from a growing cheat sheet I've been making for myself:

Browse - Formatting Cells
Embed: Inside Browse Loop | 2 Set Queue Record
L:IDS='SysID: ' & FORMAT(REQ:ID,@n_10) & '<br />  Ref ID: ' & CLIP(REQ:JobCode) & '<br /> '

In your case you need to do something like this:

L:ContactString=''
IF FIL:Name THEN L:ContactString=CLIP(FIL:Name) & '<br />'.
IF FIL:Address1 THEN L:ContactString=CLIP(L:ContactString) & CLIP(FIL:Address1) & '<br />'.
IF FIL:Address2 THEN L:ContactString=CLIP(L:ContactString) & CLIP(FIL:Address2) & '<br />'.
IF FIL:City THEN L:ContactString=CLIP(L:ContactString) & CLIP(FIL:City) & ','.
IF FIL:State THEN L:ContactString=CLIP(L:ContactString) & CLIP(FIL:State) & '  ' & FIL:Zip.


Then, instead of putting the actual fields in a column, you put in L:ContactString. L:ContactString also has to be long enough to hold all the information, and the downside to this is your headers won't sort the information correctly like it would if you used a field in each column.



Mike Grigsby
Credify Systems
Central Oregon, USA

JohnNZ

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Email
Re: Suppress Blank Rows in a Browse
« Reply #4 on: August 19, 2008, 01:18:43 PM »
Thanks again for your input Mike. 

Your suggested solution will work fine for what I need to do at present. 

However I will continue to also figure a way to achive this with less deviation from the base template features.  I suspect there may also be a way to do his with a CSS style to suppress the blank row.

Cheers

John