Supress Duplicate detail elements until sequence number changes

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In my detail, each line (a medical charge) has a unique sequence number.
Because of other information that I have "joined" to the charge, each charge
can appear more than once. However, I dont' want most of the elements to
repeat if it is the same charge. In otherwords, if the seq. number has not
changed, don't repeat certain elements. I can't use the "hide duplicates"
feature, because the next seq number might have the same value of an element
(like the same service code). Is there a way that i can do this. Example:

date service code payment code
---- -------------- ----------------
01/01 99989 p-pat
p-ins
01/02 99989 p-pat
etc.

The services of 01/01 and 01/02 would have different sequence numbers.

Thank you.
 
I resolved this with some code in the detail on-print Sub. I stored the
sequence number in a global variable. Then if my current seq number = the
last seq number I made the elements I wanted to supress not visible.
e.g. Me!txtMyElement.Visible = Not CurrentSeq = Last Seq
 
richardb said:
In my detail, each line (a medical charge) has a unique sequence number.
Because of other information that I have "joined" to the charge, each charge
can appear more than once. However, I dont' want most of the elements to
repeat if it is the same charge. In otherwords, if the seq. number has not
changed, don't repeat certain elements. I can't use the "hide duplicates"
feature, because the next seq number might have the same value of an element
(like the same service code). Is there a way that i can do this. Example:

date service code payment code
---- -------------- ----------------
01/01 99989 p-pat
p-ins
01/02 99989 p-pat
etc.

The services of 01/01 and 01/02 would have different sequence numbers.


You should group (View - Sorting and Grouping menu) on the
sequence number eith all but one(?) field in the group
header section. Place the payment code in the detail
section. To get the first detail on the same line as the
group header, add this line to the group header section's
Format event:
Me.MoveLayout = False
 
Dear Marshall,

Thanks again. Now I have a follow-up question: Is it possible, in the detail
section of a report to "tell" the report: If mycondition = true, then don't
use this line in the report. Don't print it or leave a space, don't use it in
totals, just go on to the next item? Thanks.
 
richardb said:
Thanks again. Now I have a follow-up question: Is it possible, in the detail
section of a report to "tell" the report: If mycondition = true, then don't
use this line in the report. Don't print it or leave a space, don't use it in
totals, just go on to the next item? Thanks.


That kind of thing should be done in the report's record
source query where you can use the condition as a criteria.
This will exclude the records from the data set that the
report sees.
 
Back
Top