Solved How to let repeated date information show only once in report? (1 Viewer)

yunhsuan

Member
Local time
Today, 21:51
Joined
Sep 10, 2021
Messages
54
Hello~
I want to make the table group by Date in the report. But I hope the information of Date shows next to the Item column, and the same date only show once(the result should look like right one below).
I just know how to let the result shows like left one, and both of Date and Item were put in detail section now. How can I make it like right one?
Thanks in advance!
1205.jpg
 

theDBguy

I’m here to help
Staff member
Local time
Today, 06:51
Joined
Oct 29, 2018
Messages
21,554
Check out the Hide Duplicates property.
 

CJ_London

Super Moderator
Staff member
Local time
Today, 14:51
Joined
Feb 19, 2013
Messages
16,685
use the report wizard and choose the block layout style - which will apply the hide duplicates property to your date column
 

oleronesoftwares

Passionate Learner
Local time
Today, 06:51
Joined
Sep 22, 2014
Messages
1,159
Use the report wizard, choose the fields you want, with date field first, then item next

Under group by, choose the date field, choose Normal under grouping intervals.
 

yunhsuan

Member
Local time
Today, 21:51
Joined
Sep 10, 2021
Messages
54
Check out the Hide Duplicates property.
I turned on the Hide Duplicates property. The repeated dates disappeared successfully, but their grids also disappeared. This make my report look weird like this:
1206.jpg

Can the grids show when the dates in its cell are hide?
 
Last edited:

Pat Hartman

Super Moderator
Staff member
Local time
Today, 09:51
Joined
Feb 19, 2002
Messages
43,522
I don't see any way to control this. I tried both the grid layout and the Border properties. Looks like Access makes the control invisible and so that removes the grid lines also.

If you want to retain the gridlines, you would have to turn off the hide duplicates feature and write your own code in the format event of the detail section to change the value of the field to "". You would define a variable, then in the format event, compare the current value to the variable value. If they are the same, then you can change the current value of the field to ""

Code:
If Me.SomeField = vSomeField Then
    Me.SomeField = ""
Else
    vSomeField = Me.SomeField
End If
 

theDBguy

I’m here to help
Staff member
Local time
Today, 06:51
Joined
Oct 29, 2018
Messages
21,554
I turned on the Hide Duplicates property. The repeated dates disappeared successfully, but their grids also disappeared. This make my report look weird like this:
View attachment 96584
Can the grids show when the dates in its cell are hide?
Hi. I didn't know about that. You could try what @Pat Hartman suggested. Another possibility is drawing the borders yourself using the Line control.

1638812806651.png
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 09:51
Joined
Feb 19, 2002
Messages
43,522
I didn't try drawing the lines myself, you might want to post the code you used.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 06:51
Joined
Oct 29, 2018
Messages
21,554
I didn't try drawing the lines myself, you might want to post the code you used.
Hi. Sorry for the confusion. I drew them manually (no code needed - I just used four lines). :)

1638813587203.png
 
Last edited:

Pat Hartman

Super Moderator
Staff member
Local time
Today, 09:51
Joined
Feb 19, 2002
Messages
43,522
OK, that makes sense. Since the lines are a separate control, they would not be impacted by the control they are surrounding having its visible property set to no. yunshun would only have to draw lines manually around the controls that are set to hide duplicates. I guess I never noticed this because I don't normally enclose fields in boxes.
 

Users who are viewing this thread

Top Bottom