If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Supress Duplicate detail elements until sequence number changes
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. |
#2
|
|||
|
|||
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" wrote: 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. |
#3
|
|||
|
|||
richardb wrote:
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 -- Marsh MVP [MS Access] |
#4
|
|||
|
|||
That is very cool and useful. Thank you very much.
"Marshall Barton" wrote: richardb wrote: 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 -- Marsh MVP [MS Access] |
#5
|
|||
|
|||
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. "Marshall Barton" wrote: richardb wrote: 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 -- Marsh MVP [MS Access] |
#6
|
|||
|
|||
richardb wrote:
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. -- Marsh MVP [MS Access] |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
SORTING BY PERCENTAGE | jeanne | Running & Setting Up Queries | 6 | January 19th, 2005 09:33 PM |
Limit number of detail records per page | larry.abell | Setting Up & Running Reports | 3 | December 7th, 2004 02:41 AM |
Length of 'detail' are in report | KLP | Setting Up & Running Reports | 1 | November 24th, 2004 03:51 AM |
Print info in page header if condition is satisfied in detail section | Ron | Setting Up & Running Reports | 2 | September 1st, 2004 10:54 PM |
Additional Detail Lines | Antony Elson | Using Forms | 3 | August 23rd, 2004 03:58 PM |