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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Repeat Section problem

Status
Not open for further replies.

Watermelon

Programmer
Apr 16, 2001
68
US
Hi,

I have a report with a detail section. In my detail
section, I'm displaying a list of books by serial numbers. The serial numbers have a prefix and suffix. For example, I'll have serial numbers like 1-100, 1-200, etc. Eventually the prefix of the serial numbers increments to 2-100, for example.

I have a groupheader before the detail section. I
want this to repeat when my detail section goes onto
a second page (I have labels there I want to display). If I set the RepeatSection Property to true, the groupheader does display on my second page.

So, this part is working. However, the problem
is that whenever the serial number
prefix increments (as I was mentioning above), the
group header is displayed. So, I sometimes
have the group header displayed 3 or 4 times
on the same page. I assume it's doing this becuase it must interpret the serial number prefix changes as a new section or. Anyways, I only want the groupheader to be
displayed at the top of every page (not everytime my
serial number prefix changes).

Anyways, has anyone ever run into anything like this before and have a solution/recommendation.

Thanks,
Watermelon





 
Why not use a Page Header instead of a Group Header? In case there is some reason for this, go into sorting and grouping and change the options so that all your records are included in one group.
 
It sounds like you want a page header not a group header. This should work, but let me know more details and if I am understanding your question.

Beth
 
Hi,

Thanks for both of your responses. I guess I could use a pageheader but I would only want the pageheader to be displayed if the detail section goes over one page. I know there is a formatcount property to check the number
of pages that would be printed. I thought I could
just set the repeat section property to true if
in my detail format section, "me.formatcount > 1",
however, it won't let me change this property under
program control (at least how I'm doing it).

I checked my Sorting/Grouping Options. I have my KeepTogether Property set to wholegroup. Tempclerk, is that what you meant, by making sure all records are included in one group.

Thanks,
I'm very stuck on this.



 
Actually, I thought you could set the group on Interval to where it wouldn't trigger, but I tried this on one of my reports and couldn't get it to work (can't be set to 0). Possibly you could add an expression to your record source that would be the same for every record and group on that?
 
Hi Tempclerk,

Thanks, that's a good suggestion. The serial numbers
are coming from a table that has a somewhat generic field ("Catalog"). I tried to group on this and this does
resolve that problem I was having. The Group header
is only appearing at the top of every page (it's not
repeating multiple times). However, it's not sorting
my serial numbers. Is there anyway I can sort under program control?

Thanks,
Watermelon




 
Thanks,

I actually just got it to work. I grouped it on the
more generic field (Catalog). Then, I added the original
GroupHeader that I had (Serial Number). And, this worked. So, I'm my report, I have CatalogHeader, then
Serial Number Header underneath, and then my detail section on the bottom and this is working.

Thanks
Watermelon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top