How can i write a formula so that if the IDfield in the details section is the same as the next ID field in the details, it would only print the first one?
Create a suppression formula on the field (right click the field, select format field->Common->X 2 next to Suppress)with something like:
previous({table.id}) = {table.id}
This assumes that you want to only suppress the field as your post states, if you want to suppress the row, place the suppression on the details section(right click the section and select format section->X 2 next to Suppress).
I'm having a very similar problem. can someone point me to the right dirction. here's the situation...
in details, i have Field1,Field2,Field3,Field4,Field5,ID
what i need to accomplish is this. all fields show up on first line, then on the next line if ID = previous ID, only field 2 and 3 show, the rest i want blank. any suggestions?
Are there instances where this solution wouldn't work? I have multiple groups, would that cause a problem? My issue is just like palpet. I only need to suppress certain fields, not the whole row, but it doesn't seem to work on every record.
I used previous({table.id}) = {table.id} as synapsevampire suggested.
After entering the above in the x+2 next to suppress for the field:
4505 xxx
xxx
5045 xxx
xxx
5098 xxx
xxx
5137 xxx
xxx
xxx
5340 xxx
It supresses the ID fields for 4696 and 5163 even though they don't = the previous record? In an exmple with other data, the first record is suppressed even though there is no previous record to compare to. It seems totally random.
More info: I'm using CR8.5. There are 4 groups on the report. ID is the 3rd. The report is sorted on each group, in order.
You might get that kind of behavior if you have a detail section suppression based on another field in the same row with the "missing" ID field. In other words, there may be a suppressed record that includes the previous field.
Despite SV's suggestion that "Not onfirstrecord" is unnecessary, whenever I test it, I lose the first record when I don't include that clause, whether there are groups or not, and whether it is a section suppression or a field suppression, so I think you do need to use a formula like:
Not Onfirstrecord and
{table.ID) = previous({table.ID})
Okay, finally I've figured out why I always differ with people on this one, and I feel pretty foolish. I virtually always check "suppress" (or whatever) before writing an x+2 formula, but I guess that's unnecessary, and the check mark actually is creating a default that is then overridden by the formula? So if the default is suppression and there is no "Not onfirstrecord" the first record field is suppressed, since the formula is null. But if you don't check "suppress" the "Not onfirstrecord" isn't necessary.
lbass,
you're right on. I have some of the details suppressed based on the parameters. After reviewing the data, there are details suppressed within my above samele data, thus causing the problem.
Is there a work around you can think of so the previous({table.id}) = {table.id} only looks at the data actually showing, rather than all of it?
I think you would have to use either record selection or group selection formulas instead of the detail section suppression that you have been using (that you just discovered). Then to eliminate duplicating fields from display you can either use the previous function or just go to format field->common- and check "suppress if duplicated."
I didn't just discover that I was using detail suppression. I meant that in the specific sample data I was displaying, there were details suppressed. You actually helped me with the detail suppression in another thread. thread767-584172 If you take a look at that thread, you'll see that I can't display my data correctly without using the detail suppression. I can't use the max function in the record or group selection to get the desired results.
I also can't use the "suppress if duplicated" because I need to suppress multiple fields, but not the whole details section. And the suppression is only based on ID. I have a date field also, where the date is the same for multiple records....but I only want to suppress the date if the previous ID is the same, not if the date is duplicated. Since I have to do the suppression on individual fields instead of the whole details, I can't use "suppress if duplicated."
I think you could just go to format field->suppress->X+2 and enter something like (using excerpts from your other thread):
if not(
({proc.Version} <> Maximum ({proc.Version},{proc.ProjNum})
and {?@Estimate} = 1) or
({proc.Version} <> Maximum ({proc.Version},{proc.ProjNum})
and {?@Change} = 1)
)
then {table.ID} = previous({table.ID})
In other words, just build the conditions into your suppression formula under which the formula does not apply.
This is right on. Helped me immensely on a report with 3000+ items when "suppress if duplicated" was suppressing descriptions of separate key fields. I did the formula to suppress 4 columns based on criteria from one column (key column) Worked Excellent. Thanks.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.