John/Marshall, Thanks for your help. I think the problem I am having is
that DocSN is on the many side of my relationship. When I groupby that field
first then move back to groupby the DocNUM on the one side its throwing
things off. So what I have is:
tblDoc
DocID(pk)
DocNum
tblDocDetails
DocDetailsID(pk)
DocID(fk)
DocSN
DocsSN can be GW12, GW23, G111, G323, GT32, etc
What I'm trying to do is have 2 groupings: one by DocSN and the other by
DocNum.
This is sort of the result I want:
DocSN (GroupHeading) going to be either 1 or 2 because of my expression
=IIf(Left([OS_DocSN],2)<>"GW",1,2)
Now print all the docnum groups that resulted in 1
DocNum(GroupHeading) 56788
Nomen: DocSN
Screw GT12
Bolt G123
etc.
Keep going until expression = 2 then start a new page
DocNum(GroupHeading) 56788
Nomen: DocSN
Screw GW12
Bolt GW23
Like I said I think the problem I am having is the DocNum can have "G"series
details and "GW" series. Anyway, just wanted to show you what I was up
against. I'm going to keep plugging away and may simply go with 2
differentg reports. Prompt the user which one they want to print/preview
and go from there. Thanks for all your time and help.
--
Reggie
----------
John Spencer (MVP) said:
Pardon me, I think Marshall meant ---
If you want to break on the calculated value, then set that calculation as the
Field/Expression of the Group By. In other words, group by it and set the page
break property for its section.
I am going offline for a few days, so hopefully if this fails, Marshall will be
back with more help for you.
Marsh, Thanks for the reply. The problem now is that it starts a new page
for each different DocNum. I trying to get all the DocNums where my
expression evaluates to 1 to print one after the other until I hit a DocNum
that has an expression that evaluates to 2. DocNum is on the one side of my
relationship(tbleDoc) and DocSN is on the many side(tblDocDetails) if that
helps. Again, thanks for your time!
--
Reggie
----------
Marshall Barton said:
Reggie wrote:
Hi and TIA. I have a report that I use sorting and grouping. First group
is DocSN and second is DocNum. The DocSN is in the form of GW12, GW23,
G123, G234, GT23 etc. For this group I have set the following as the
Field/Expression. =IIf(Left([OS_DocSN],2)<>"GW",1,2). This works
fine
and
returns 1 for all SN's that are not GW* and 2 for the ones that are GW*.
Now I would like to print all the 1's filling up the pages and when I
hit
a
2 have it start on a new page, but can't seem to figure it out. Any
help/advice is appreciated and thanks for your time.
Add the group header for DocSN, make the header's Height 0
(or make it invisible) and set its Force New Page property
to Before Section.