Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hello, I have a three column rep

Status
Not open for further replies.

psamedy

Technical User
Apr 22, 2002
60
US
Hello,

I have a three column report that is set up as follows:

GrHead 1: State
Detail A: County
Detail B: Specialty
Detail C: Addr1
Detail D: Addr2
Derail E: Phone

Is there a formula that could suppress Detail B (specialty) only if it is equal to the specialty of the previous record.
Thanks any help is appreciated.
 
You can supress the data element "if duplicated" under the format field / common menu and then supress detail B "If blank" under the format section / common menu if that helps.

Otherwise in the supress formula editor (of the details section), use something like this:

{data.element} = previous({data.element})
 
Thank You "Butkus"
But I forgot to mention one important detail .I need Detail B: Specialty to print with every new county.
 
Write a new formula called test and place it in Detail B and supress it's output

In that formula:

If {county} = previous{county} and {specialy} = previous{specialty) then 1 else 0

Then in detail B supress formula editor
{@test} = 1

1 denotes a "hit" for the same "specialty" in the same "county" if the county changes then 0 is returned and not supressed

Let me know if this works.
 
No Luck,
When I try to add the formula:
If {CAP_PROVIDER_VIEW_G.COUNTY} = previous{CAP_PROVIDER_VIEW_G.COUNTY} and {CAP_PROVIDER_VIEW_G.SPECIALTY} = previous{CAP_PROVIDER_VIEW_G.SPECIALTY} then 1 else 0

I get an error message stating "the keyword 'then' is missing", any suggestions?
 
Sorry, add the following

If {CAP_PROVIDER_VIEW_G.COUNTY} = previous({CAP_PROVIDER_VIEW_G.COUNTY}) and {CAP_PROVIDER_VIEW_G.SPECIALTY} = previous({CAP_PROVIDER_VIEW_G.SPECIALTY}) then 1 else 0

I forgot the () around the two data elements for the previous function
 
Butkus a big thinks for you help! The formula worked. I just added,

{CAP_PROVIDER_VIEW_G.COUNTY} = previous({CAP_PROVIDER_VIEW_G.COUNTY}) and {CAP_PROVIDER_VIEW_G.SPECIALTY} = previous({CAP_PROVIDER_VIEW_G.SPECIALTY})

to the suppress formuala editor for detail B. Once again thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top