Hi -
I have looked at all posts and tried both Allen Browne's Report
Sorting at run Time
( Select Case Forms!frmChooseSort!grpSort
Case 1 'Name
Me.GroupLevel(0).ControlSource = "LastName"
Me.GroupLevel(1).ControlSource = "FirstName") .....
And another post that was OrderByOn = True and setting the sort Order.
The second works, but since I can't use Sorting and Grouping, I can't
get totals that I need.
The first works in one App, but does not work now. Any idea why?
When I run for any option, I get the OutboundDate as the first Sort/
Group, Followed by Trailer #.
So, when for Case 5 I want Whse, Location, then Date, I'm seeing:
Whse 3
Date
Trailer #
Dept (Details, grouped by location, but totaled by
Trailer)
Perhaps I should be writing a separate report with the desired sort
and totals? I'm not sure - I know I could use just the one query, but
I'm trying to be efficient, if possible. I have the feeling it's
because I have header, totals in some footers and blanks in others.
But I'd love confirmation or correction on this.
Thanks -
sara
Code:
Select Case Forms.frmPrintReports.fraOBReports
Case 1
' Default Report Sort: Whse, Date, Trailer#
Me.GroupLevel(0).ControlSource = "WhseKey"
Me.GroupLevel(1).ControlSource = "OutboundDate"
Me.GroupLevel(2).ControlSource = "TrailerNum"
Me.GroupLevel(3).ControlSource = "CreditSalesTo"
Me.GroupLevel(4).ControlSource = "LocationKey"
Me.GroupLevel(5).ControlSource = "GoodsTypeKey"
GoTo Exit_Report_Open
Case 2
' Default Sort: Whse, Date, Trailer#
Me.GroupLevel(0).ControlSource = "WhseKey"
Me.GroupLevel(1).ControlSource = "OutboundDate"
Me.GroupLevel(2).ControlSource = "TrailerNum"
Me.GroupLevel(3).ControlSource = "CreditSalesTo"
Me.GroupLevel(4).ControlSource = "LocationKey"
Me.GroupLevel(5).ControlSource = "GoodsTypeKey"
GoTo Exit_Report_Open
Case 3
' Dept Sort: Whse, Date, Dept
Me.GroupLevel(0).ControlSource = "WhseKey"
Me.GroupLevel(2).ControlSource = "CreditSalesTo"
Me.GroupLevel(1).ControlSource = "OutboundDate"
Me.GroupLevel(3).ControlSource = "TrailerNum"
Me.GroupLevel(4).ControlSource = "LocationKey"
Me.GroupLevel(5).ControlSource = "GoodsTypeKey"
GoTo Exit_Report_Open
Case 4
' Goods Type Sort: Whse, GoodsType, Date
Me.GroupLevel(0).ControlSource = "WhseKey"
Me.GroupLevel(1).ControlSource = "GoodsType"
Me.GroupLevel(2).ControlSource = "OutboundDate"
Me.GroupLevel(3).ControlSource = "TrailerNum"
Me.GroupLevel(4).ControlSource = "CreditSalesTo"
Me.GroupLevel(5).ControlSource = "LocationKey"
GoTo Exit_Report_Open
Case 5
' Location Sort: Whse, Location, Date
Me.GroupLevel(0).ControlSource = "WhseKey"
Me.GroupLevel(1).ControlSource = "LocationKey"
Me.GroupLevel(2).ControlSource = "OutboundDate"
Me.GroupLevel(3).ControlSource = "TrailerNum"
Me.GroupLevel(4).ControlSource = "CreditSalesTo"
Me.GroupLevel(5).ControlSource = "GoodsTypeKey"
'
GoTo Exit_Report_Open
End Select
(Error handling here) 8 2083
Have you tried setting a break point and stepping though the code.
1) Check for any errors like unknown field names ect.
2) Is Forms.frmPrintReports.fraOBReports returning one of your cases?
Also GroupLevel() numbers change as you add and remove groups.
"sara" <sa*******@yahoo.comwrote in message
news:11**********************@h2g2000hsg.googlegro ups.com...
Hi -
I have looked at all posts and tried both Allen Browne's Report
Sorting at run Time
( Select Case Forms!frmChooseSort!grpSort
Case 1 'Name
Me.GroupLevel(0).ControlSource = "LastName"
Me.GroupLevel(1).ControlSource = "FirstName") .....
And another post that was OrderByOn = True and setting the sort Order.
The second works, but since I can't use Sorting and Grouping, I can't
get totals that I need.
The first works in one App, but does not work now. Any idea why?
When I run for any option, I get the OutboundDate as the first Sort/
Group, Followed by Trailer #.
So, when for Case 5 I want Whse, Location, then Date, I'm seeing:
Whse 3
Date
Trailer #
Dept (Details, grouped by location, but totaled by
Trailer)
Perhaps I should be writing a separate report with the desired sort
and totals? I'm not sure - I know I could use just the one query, but
I'm trying to be efficient, if possible. I have the feeling it's
because I have header, totals in some footers and blanks in others.
But I'd love confirmation or correction on this.
Thanks -
sara
Code:
Select Case Forms.frmPrintReports.fraOBReports
Case 1
' Default Report Sort: Whse, Date, Trailer#
Me.GroupLevel(0).ControlSource = "WhseKey"
Me.GroupLevel(1).ControlSource = "OutboundDate"
Me.GroupLevel(2).ControlSource = "TrailerNum"
Me.GroupLevel(3).ControlSource = "CreditSalesTo"
Me.GroupLevel(4).ControlSource = "LocationKey"
Me.GroupLevel(5).ControlSource = "GoodsTypeKey"
GoTo Exit_Report_Open
Case 2
' Default Sort: Whse, Date, Trailer#
Me.GroupLevel(0).ControlSource = "WhseKey"
Me.GroupLevel(1).ControlSource = "OutboundDate"
Me.GroupLevel(2).ControlSource = "TrailerNum"
Me.GroupLevel(3).ControlSource = "CreditSalesTo"
Me.GroupLevel(4).ControlSource = "LocationKey"
Me.GroupLevel(5).ControlSource = "GoodsTypeKey"
GoTo Exit_Report_Open
Case 3
' Dept Sort: Whse, Date, Dept
Me.GroupLevel(0).ControlSource = "WhseKey"
Me.GroupLevel(2).ControlSource = "CreditSalesTo"
Me.GroupLevel(1).ControlSource = "OutboundDate"
Me.GroupLevel(3).ControlSource = "TrailerNum"
Me.GroupLevel(4).ControlSource = "LocationKey"
Me.GroupLevel(5).ControlSource = "GoodsTypeKey"
GoTo Exit_Report_Open
Case 4
' Goods Type Sort: Whse, GoodsType, Date
Me.GroupLevel(0).ControlSource = "WhseKey"
Me.GroupLevel(1).ControlSource = "GoodsType"
Me.GroupLevel(2).ControlSource = "OutboundDate"
Me.GroupLevel(3).ControlSource = "TrailerNum"
Me.GroupLevel(4).ControlSource = "CreditSalesTo"
Me.GroupLevel(5).ControlSource = "LocationKey"
GoTo Exit_Report_Open
Case 5
' Location Sort: Whse, Location, Date
Me.GroupLevel(0).ControlSource = "WhseKey"
Me.GroupLevel(1).ControlSource = "LocationKey"
Me.GroupLevel(2).ControlSource = "OutboundDate"
Me.GroupLevel(3).ControlSource = "TrailerNum"
Me.GroupLevel(4).ControlSource = "CreditSalesTo"
Me.GroupLevel(5).ControlSource = "GoodsTypeKey"
'
GoTo Exit_Report_Open
End Select
(Error handling here)
On May 15, 11:33 am, "paii, Ron" <p...@packairinc.comwrote:
Have you tried setting a break point and stepping though the code.
1) Check for any errors like unknown field names ect.
2) Is Forms.frmPrintReports.fraOBReports returning one of your cases?
Also GroupLevel() numbers change as you add and remove groups.
"sara" <saraqp...@yahoo.comwrote in message
news:11**********************@h2g2000hsg.googlegro ups.com...
Hi -
I have looked at all posts and tried both Allen Browne's Report
Sorting at run Time
( Select Case Forms!frmChooseSort!grpSort
Case 1 'Name
Me.GroupLevel(0).ControlSource = "LastName"
Me.GroupLevel(1).ControlSource = "FirstName") .....
And another post that was OrderByOn = True and setting the sort Order.
The second works, but since I can't use Sorting and Grouping, I can't
get totals that I need.
The first works in one App, but does not work now. Any idea why?
When I run for any option, I get the OutboundDate as the first Sort/
Group, Followed by Trailer #.
So, when for Case 5 I want Whse, Location, then Date, I'm seeing:
Whse 3
Date
Trailer #
Dept (Details, grouped by location, but totaled by
Trailer)
Perhaps I should be writing a separate report with the desired sort
and totals? I'm not sure - I know I could use just the one query, but
I'm trying to be efficient, if possible. I have the feeling it's
because I have header, totals in some footers and blanks in others.
But I'd love confirmation or correction on this.
Thanks -
sara
Code:
Select Case Forms.frmPrintReports.fraOBReports
Case 1
' Default Report Sort: Whse, Date, Trailer#
Me.GroupLevel(0).ControlSource = "WhseKey"
Me.GroupLevel(1).ControlSource = "OutboundDate"
Me.GroupLevel(2).ControlSource = "TrailerNum"
Me.GroupLevel(3).ControlSource = "CreditSalesTo"
Me.GroupLevel(4).ControlSource = "LocationKey"
Me.GroupLevel(5).ControlSource = "GoodsTypeKey"
GoTo Exit_Report_Open
Case 2
' Default Sort: Whse, Date, Trailer#
Me.GroupLevel(0).ControlSource = "WhseKey"
Me.GroupLevel(1).ControlSource = "OutboundDate"
Me.GroupLevel(2).ControlSource = "TrailerNum"
Me.GroupLevel(3).ControlSource = "CreditSalesTo"
Me.GroupLevel(4).ControlSource = "LocationKey"
Me.GroupLevel(5).ControlSource = "GoodsTypeKey"
GoTo Exit_Report_Open
Case 3
' Dept Sort: Whse, Date, Dept
Me.GroupLevel(0).ControlSource = "WhseKey"
Me.GroupLevel(2).ControlSource = "CreditSalesTo"
Me.GroupLevel(1).ControlSource = "OutboundDate"
Me.GroupLevel(3).ControlSource = "TrailerNum"
Me.GroupLevel(4).ControlSource = "LocationKey"
Me.GroupLevel(5).ControlSource = "GoodsTypeKey"
GoTo Exit_Report_Open
Case 4
' Goods Type Sort: Whse, GoodsType, Date
Me.GroupLevel(0).ControlSource = "WhseKey"
Me.GroupLevel(1).ControlSource = "GoodsType"
Me.GroupLevel(2).ControlSource = "OutboundDate"
Me.GroupLevel(3).ControlSource = "TrailerNum"
Me.GroupLevel(4).ControlSource = "CreditSalesTo"
Me.GroupLevel(5).ControlSource = "LocationKey"
GoTo Exit_Report_Open
Case 5
' Location Sort: Whse, Location, Date
Me.GroupLevel(0).ControlSource = "WhseKey"
Me.GroupLevel(1).ControlSource = "LocationKey"
Me.GroupLevel(2).ControlSource = "OutboundDate"
Me.GroupLevel(3).ControlSource = "TrailerNum"
Me.GroupLevel(4).ControlSource = "CreditSalesTo"
Me.GroupLevel(5).ControlSource = "GoodsTypeKey"
'
GoTo Exit_Report_Open
End Select
(Error handling here)- Hide quoted text -
- Show quoted text -
There are no errors; code all executes and report is displayed.
I know the headers change as you add and remove, but I'm not sure how
that impacts what I'm doing?? I put these from 0 ot 5 in the order
that I want the data displayed.
I'm thinking that I have to create a separate report for each "view"
that the users see. I am trying to "reuse" everywhere I can, but
maybe I can't here?
Thanks -
sara
"sara" <sa*******@yahoo.comwrote in message
news:11**********************@o5g2000hsb.googlegro ups.com...
On May 15, 11:33 am, "paii, Ron" <p...@packairinc.comwrote:
Have you tried setting a break point and stepping though the code.
1) Check for any errors like unknown field names ect.
2) Is Forms.frmPrintReports.fraOBReports returning one of your cases?
Also GroupLevel() numbers change as you add and remove groups.
"sara" <saraqp...@yahoo.comwrote in message
news:11**********************@h2g2000hsg.googlegro ups.com...
Hi -
I have looked at all posts and tried both Allen Browne's Report
Sorting at run Time
( Select Case Forms!frmChooseSort!grpSort
Case 1 'Name
Me.GroupLevel(0).ControlSource = "LastName"
Me.GroupLevel(1).ControlSource = "FirstName") .....
And another post that was OrderByOn = True and setting the sort Order.
The second works, but since I can't use Sorting and Grouping, I can't
get totals that I need.
The first works in one App, but does not work now. Any idea why?
When I run for any option, I get the OutboundDate as the first Sort/
Group, Followed by Trailer #.
So, when for Case 5 I want Whse, Location, then Date, I'm seeing:
Whse 3
Date
Trailer #
Dept (Details, grouped by location, but totaled by
Trailer)
Perhaps I should be writing a separate report with the desired sort
and totals? I'm not sure - I know I could use just the one query, but
I'm trying to be efficient, if possible. I have the feeling it's
because I have header, totals in some footers and blanks in others.
But I'd love confirmation or correction on this.
Thanks -
sara
Code:
Select Case Forms.frmPrintReports.fraOBReports
Case 1
' Default Report Sort: Whse, Date, Trailer#
Me.GroupLevel(0).ControlSource = "WhseKey"
Me.GroupLevel(1).ControlSource = "OutboundDate"
Me.GroupLevel(2).ControlSource = "TrailerNum"
Me.GroupLevel(3).ControlSource = "CreditSalesTo"
Me.GroupLevel(4).ControlSource = "LocationKey"
Me.GroupLevel(5).ControlSource = "GoodsTypeKey"
GoTo Exit_Report_Open
Case 2
' Default Sort: Whse, Date, Trailer#
Me.GroupLevel(0).ControlSource = "WhseKey"
Me.GroupLevel(1).ControlSource = "OutboundDate"
Me.GroupLevel(2).ControlSource = "TrailerNum"
Me.GroupLevel(3).ControlSource = "CreditSalesTo"
Me.GroupLevel(4).ControlSource = "LocationKey"
Me.GroupLevel(5).ControlSource = "GoodsTypeKey"
GoTo Exit_Report_Open
Case 3
' Dept Sort: Whse, Date, Dept
Me.GroupLevel(0).ControlSource = "WhseKey"
Me.GroupLevel(2).ControlSource = "CreditSalesTo"
Me.GroupLevel(1).ControlSource = "OutboundDate"
Me.GroupLevel(3).ControlSource = "TrailerNum"
Me.GroupLevel(4).ControlSource = "LocationKey"
Me.GroupLevel(5).ControlSource = "GoodsTypeKey"
GoTo Exit_Report_Open
Case 4
' Goods Type Sort: Whse, GoodsType, Date
Me.GroupLevel(0).ControlSource = "WhseKey"
Me.GroupLevel(1).ControlSource = "GoodsType"
Me.GroupLevel(2).ControlSource = "OutboundDate"
Me.GroupLevel(3).ControlSource = "TrailerNum"
Me.GroupLevel(4).ControlSource = "CreditSalesTo"
Me.GroupLevel(5).ControlSource = "LocationKey"
GoTo Exit_Report_Open
Case 5
' Location Sort: Whse, Location, Date
Me.GroupLevel(0).ControlSource = "WhseKey"
Me.GroupLevel(1).ControlSource = "LocationKey"
Me.GroupLevel(2).ControlSource = "OutboundDate"
Me.GroupLevel(3).ControlSource = "TrailerNum"
Me.GroupLevel(4).ControlSource = "CreditSalesTo"
Me.GroupLevel(5).ControlSource = "GoodsTypeKey"
'
GoTo Exit_Report_Open
End Select
(Error handling here)- Hide quoted text -
- Show quoted text -
There are no errors; code all executes and report is displayed.
I know the headers change as you add and remove, but I'm not sure how
that impacts what I'm doing?? I put these from 0 ot 5 in the order
that I want the data displayed.
I'm thinking that I have to create a separate report for each "view"
that the users see. I am trying to "reuse" everywhere I can, but
maybe I can't here?
Thanks -
sara
The code may execute by you still have an error, Step though the code, I
would bet that frmPrintReports.fraOBReports in your Case statement is Null
or undefined. As for using a seperate report for each view, you logic looks
OK for changing sort order. Get the code working and one report should
handle you needs.
On May 18, 8:58 am, "paii, Ron" <p...@packairinc.comwrote:
"sara" <saraqp...@yahoo.comwrote in message
news:11**********************@o5g2000hsb.googlegro ups.com...
On May 15, 11:33 am, "paii, Ron" <p...@packairinc.comwrote:
Have you tried setting a break point and stepping though the code.
1) Check for any errors like unknown field names ect.
2) Is Forms.frmPrintReports.fraOBReports returning one of your cases?
Also GroupLevel() numbers change as you add and remove groups.
"sara" <saraqp...@yahoo.comwrote in message
>news:11**********************@h2g2000hsg.googlegr oups.com...
Hi -
I have looked at all posts and tried both Allen Browne's Report
Sorting at run Time
( Select Case Forms!frmChooseSort!grpSort
Case 1 'Name
Me.GroupLevel(0).ControlSource = "LastName"
Me.GroupLevel(1).ControlSource = "FirstName") .....
And another post that was OrderByOn = True and setting the sort Order.
The second works, but since I can't use Sorting and Grouping, I can't
get totals that I need.
The first works in one App, but does not work now. Any idea why?
When I run for any option, I get the OutboundDate as the first Sort/
Group, Followed by Trailer #.
So, when for Case 5 I want Whse, Location, then Date, I'm seeing:
Whse 3
Date
Trailer #
Dept (Details, grouped by location, but totaled by
Trailer)
Perhaps I should be writing a separate report with the desired sort
and totals? I'm not sure - I know I could use just the one query, but
I'm trying to be efficient, if possible. I have the feeling it's
because I have header, totals in some footers and blanks in others.
But I'd love confirmation or correction on this.
Thanks -
sara
Code:
Select Case Forms.frmPrintReports.fraOBReports
Case 1
' Default Report Sort: Whse, Date, Trailer#
Me.GroupLevel(0).ControlSource = "WhseKey"
Me.GroupLevel(1).ControlSource = "OutboundDate"
Me.GroupLevel(2).ControlSource = "TrailerNum"
Me.GroupLevel(3).ControlSource = "CreditSalesTo"
Me.GroupLevel(4).ControlSource = "LocationKey"
Me.GroupLevel(5).ControlSource = "GoodsTypeKey"
GoTo Exit_Report_Open
Case 2
' Default Sort: Whse, Date, Trailer#
Me.GroupLevel(0).ControlSource = "WhseKey"
Me.GroupLevel(1).ControlSource = "OutboundDate"
Me.GroupLevel(2).ControlSource = "TrailerNum"
Me.GroupLevel(3).ControlSource = "CreditSalesTo"
Me.GroupLevel(4).ControlSource = "LocationKey"
Me.GroupLevel(5).ControlSource = "GoodsTypeKey"
GoTo Exit_Report_Open
Case 3
' Dept Sort: Whse, Date, Dept
Me.GroupLevel(0).ControlSource = "WhseKey"
Me.GroupLevel(2).ControlSource = "CreditSalesTo"
Me.GroupLevel(1).ControlSource = "OutboundDate"
Me.GroupLevel(3).ControlSource = "TrailerNum"
Me.GroupLevel(4).ControlSource = "LocationKey"
Me.GroupLevel(5).ControlSource = "GoodsTypeKey"
GoTo Exit_Report_Open
Case 4
' Goods Type Sort: Whse, GoodsType, Date
Me.GroupLevel(0).ControlSource = "WhseKey"
Me.GroupLevel(1).ControlSource = "GoodsType"
Me.GroupLevel(2).ControlSource = "OutboundDate"
Me.GroupLevel(3).ControlSource = "TrailerNum"
Me.GroupLevel(4).ControlSource = "CreditSalesTo"
Me.GroupLevel(5).ControlSource = "LocationKey"
GoTo Exit_Report_Open
Case 5
' Location Sort: Whse, Location, Date
Me.GroupLevel(0).ControlSource = "WhseKey"
Me.GroupLevel(1).ControlSource = "LocationKey"
Me.GroupLevel(2).ControlSource = "OutboundDate"
Me.GroupLevel(3).ControlSource = "TrailerNum"
Me.GroupLevel(4).ControlSource = "CreditSalesTo"
Me.GroupLevel(5).ControlSource = "GoodsTypeKey"
'
GoTo Exit_Report_Open
End Select
(Error handling here)- Hide quoted text -
- Show quoted text -
There are no errors; code all executes and report is displayed.
I know the headers change as you add and remove, but I'm not sure how
that impacts what I'm doing?? I put these from 0 ot 5 in the order
that I want the data displayed.
I'm thinking that I have to create a separate report for each "view"
that the users see. I am trying to "reuse" everywhere I can, but
maybe I can't here?
Thanks -
sara
The code may execute by you still have an error, Step though the code, I
would bet that frmPrintReports.fraOBReports in your Case statement is Null
or undefined. As for using a seperate report for each view, you logic looks
OK for changing sort order. Get the code working and one report should
handle you needs.- Hide quoted text -
- Show quoted text -
I have checked as you suggested, and all is well.
I put "Break on all errors" - no errors
I stepped through the code - no errors; it follows as I would expect.
I checked the value of fraOBReports in the selectcase statements, and
it was "5" both times.
Any other ideas?
thanks -
sara
"sara" <sa*******@yahoo.comwrote in message
news:11*********************@y80g2000hsf.googlegro ups.com...
On May 18, 8:58 am, "paii, Ron" <p...@packairinc.comwrote:
"sara" <saraqp...@yahoo.comwrote in message
news:11**********************@o5g2000hsb.googlegro ups.com...
On May 15, 11:33 am, "paii, Ron" <p...@packairinc.comwrote:
Have you tried setting a break point and stepping though the code.
1) Check for any errors like unknown field names ect.
2) Is Forms.frmPrintReports.fraOBReports returning one of your
cases?
Also GroupLevel() numbers change as you add and remove groups.
"sara" <saraqp...@yahoo.comwrote in message
news:11**********************@h2g2000hsg.googlegro ups.com...
Hi -
I have looked at all posts and tried both Allen Browne's Report
Sorting at run Time
( Select Case Forms!frmChooseSort!grpSort
Case 1 'Name
Me.GroupLevel(0).ControlSource = "LastName"
Me.GroupLevel(1).ControlSource = "FirstName") .....
And another post that was OrderByOn = True and setting the sort
Order.
The second works, but since I can't use Sorting and Grouping, I
can't
get totals that I need.
The first works in one App, but does not work now. Any idea why?
When I run for any option, I get the OutboundDate as the first
Sort/
Group, Followed by Trailer #.
So, when for Case 5 I want Whse, Location, then Date, I'm seeing:
Whse 3
Date
Trailer #
Dept (Details, grouped by location, but totaled by
Trailer)
Perhaps I should be writing a separate report with the desired
sort
and totals? I'm not sure - I know I could use just the one query,
but
I'm trying to be efficient, if possible. I have the feeling it's
because I have header, totals in some footers and blanks in
others.
But I'd love confirmation or correction on this.
Thanks -
sara
Code:
Select Case Forms.frmPrintReports.fraOBReports
Case 1
' Default Report Sort: Whse, Date, Trailer#
Me.GroupLevel(0).ControlSource = "WhseKey"
Me.GroupLevel(1).ControlSource = "OutboundDate"
Me.GroupLevel(2).ControlSource = "TrailerNum"
Me.GroupLevel(3).ControlSource = "CreditSalesTo"
Me.GroupLevel(4).ControlSource = "LocationKey"
Me.GroupLevel(5).ControlSource = "GoodsTypeKey"
GoTo Exit_Report_Open
Case 2
' Default Sort: Whse, Date, Trailer#
Me.GroupLevel(0).ControlSource = "WhseKey"
Me.GroupLevel(1).ControlSource = "OutboundDate"
Me.GroupLevel(2).ControlSource = "TrailerNum"
Me.GroupLevel(3).ControlSource = "CreditSalesTo"
Me.GroupLevel(4).ControlSource = "LocationKey"
Me.GroupLevel(5).ControlSource = "GoodsTypeKey"
GoTo Exit_Report_Open
Case 3
' Dept Sort: Whse, Date, Dept
Me.GroupLevel(0).ControlSource = "WhseKey"
Me.GroupLevel(2).ControlSource = "CreditSalesTo"
Me.GroupLevel(1).ControlSource = "OutboundDate"
Me.GroupLevel(3).ControlSource = "TrailerNum"
Me.GroupLevel(4).ControlSource = "LocationKey"
Me.GroupLevel(5).ControlSource = "GoodsTypeKey"
GoTo Exit_Report_Open
Case 4
' Goods Type Sort: Whse, GoodsType, Date
Me.GroupLevel(0).ControlSource = "WhseKey"
Me.GroupLevel(1).ControlSource = "GoodsType"
Me.GroupLevel(2).ControlSource = "OutboundDate"
Me.GroupLevel(3).ControlSource = "TrailerNum"
Me.GroupLevel(4).ControlSource = "CreditSalesTo"
Me.GroupLevel(5).ControlSource = "LocationKey"
GoTo Exit_Report_Open
Case 5
' Location Sort: Whse, Location, Date
Me.GroupLevel(0).ControlSource = "WhseKey"
Me.GroupLevel(1).ControlSource = "LocationKey"
Me.GroupLevel(2).ControlSource = "OutboundDate"
Me.GroupLevel(3).ControlSource = "TrailerNum"
Me.GroupLevel(4).ControlSource = "CreditSalesTo"
Me.GroupLevel(5).ControlSource = "GoodsTypeKey"
'
GoTo Exit_Report_Open
End Select
(Error handling here)- Hide quoted text -
- Show quoted text -
There are no errors; code all executes and report is displayed.
I know the headers change as you add and remove, but I'm not sure how
that impacts what I'm doing?? I put these from 0 ot 5 in the order
that I want the data displayed.
I'm thinking that I have to create a separate report for each "view"
that the users see. I am trying to "reuse" everywhere I can, but
maybe I can't here?
Thanks -
sara
The code may execute by you still have an error, Step though the code, I
would bet that frmPrintReports.fraOBReports in your Case statement is
Null
or undefined. As for using a seperate report for each view, you logic
looks
OK for changing sort order. Get the code working and one report should
handle you needs.- Hide quoted text -
- Show quoted text -
I have checked as you suggested, and all is well.
I put "Break on all errors" - no errors
I stepped through the code - no errors; it follows as I would expect.
I checked the value of fraOBReports in the selectcase statements, and
it was "5" both times.
Any other ideas?
thanks -
sara
Is the code in the Report Open event?
On May 18, 12:30 pm, "paii, Ron" <p...@packairinc.comwrote:
"sara" <saraqp...@yahoo.comwrote in message
news:11*********************@y80g2000hsf.googlegro ups.com...
On May 18, 8:58 am, "paii, Ron" <p...@packairinc.comwrote:
"sara" <saraqp...@yahoo.comwrote in message
>news:11**********************@o5g2000hsb.googlegr oups.com...
On May 15, 11:33 am, "paii, Ron" <p...@packairinc.comwrote:
Have you tried setting a break point and stepping though the code.
1) Check for any errors like unknown field names ect.
2) Is Forms.frmPrintReports.fraOBReports returning one of your
cases?
Also GroupLevel() numbers change as you add and remove groups.
"sara" <saraqp...@yahoo.comwrote in message
>news:11**********************@h2g2000hsg.googlegr oups.com...
Hi -
I have looked at all posts and tried both Allen Browne's Report
Sorting at run Time
( Select Case Forms!frmChooseSort!grpSort
Case 1 'Name
Me.GroupLevel(0).ControlSource = "LastName"
Me.GroupLevel(1).ControlSource = "FirstName") .....
And another post that was OrderByOn = True and setting the sort
Order.
The second works, but since I can't use Sorting and Grouping, I
can't
get totals that I need.
The first works in one App, but does not work now. Any idea why?
When I run for any option, I get the OutboundDate as the first
Sort/
Group, Followed by Trailer #.
So, when for Case 5 I want Whse, Location, then Date, I'm seeing:
Whse 3
Date
Trailer #
Dept (Details, grouped by location, but totaled by
Trailer)
Perhaps I should be writing a separate report with the desired
sort
and totals? I'm not sure - I know I could use just the one query,
but
I'm trying to be efficient, if possible. I have the feeling it's
because I have header, totals in some footers and blanks in
others.
But I'd love confirmation or correction on this.
Thanks -
sara
Code:
Select Case Forms.frmPrintReports.fraOBReports
Case 1
' Default Report Sort: Whse, Date, Trailer#
Me.GroupLevel(0).ControlSource = "WhseKey"
Me.GroupLevel(1).ControlSource = "OutboundDate"
Me.GroupLevel(2).ControlSource = "TrailerNum"
Me.GroupLevel(3).ControlSource = "CreditSalesTo"
Me.GroupLevel(4).ControlSource = "LocationKey"
Me.GroupLevel(5).ControlSource = "GoodsTypeKey"
GoTo Exit_Report_Open
Case 2
' Default Sort: Whse, Date, Trailer#
Me.GroupLevel(0).ControlSource = "WhseKey"
Me.GroupLevel(1).ControlSource = "OutboundDate"
Me.GroupLevel(2).ControlSource = "TrailerNum"
Me.GroupLevel(3).ControlSource = "CreditSalesTo"
Me.GroupLevel(4).ControlSource = "LocationKey"
Me.GroupLevel(5).ControlSource = "GoodsTypeKey"
GoTo Exit_Report_Open
Case 3
' Dept Sort: Whse, Date, Dept
Me.GroupLevel(0).ControlSource = "WhseKey"
Me.GroupLevel(2).ControlSource = "CreditSalesTo"
Me.GroupLevel(1).ControlSource = "OutboundDate"
Me.GroupLevel(3).ControlSource = "TrailerNum"
Me.GroupLevel(4).ControlSource = "LocationKey"
Me.GroupLevel(5).ControlSource = "GoodsTypeKey"
GoTo Exit_Report_Open
Case 4
' Goods Type Sort: Whse, GoodsType, Date
Me.GroupLevel(0).ControlSource = "WhseKey"
Me.GroupLevel(1).ControlSource = "GoodsType"
Me.GroupLevel(2).ControlSource = "OutboundDate"
Me.GroupLevel(3).ControlSource = "TrailerNum"
Me.GroupLevel(4).ControlSource = "CreditSalesTo"
Me.GroupLevel(5).ControlSource = "LocationKey"
GoTo Exit_Report_Open
Case 5
' Location Sort: Whse, Location, Date
Me.GroupLevel(0).ControlSource = "WhseKey"
Me.GroupLevel(1).ControlSource = "LocationKey"
Me.GroupLevel(2).ControlSource = "OutboundDate"
Me.GroupLevel(3).ControlSource = "TrailerNum"
Me.GroupLevel(4).ControlSource = "CreditSalesTo"
Me.GroupLevel(5).ControlSource = "GoodsTypeKey"
'
GoTo Exit_Report_Open
End Select
(Error handling here)- Hide quoted text -
- Show quoted text -
There are no errors; code all executes and report is displayed.
I know the headers change as you add and remove, but I'm not sure how
that impacts what I'm doing?? I put these from 0 ot 5 in the order
that I want the data displayed.
I'm thinking that I have to create a separate report for each "view"
that the users see. I am trying to "reuse" everywhere I can, but
maybe I can't here?
Thanks -
sara
The code may execute by you still have an error, Step though the code, I
would bet that frmPrintReports.fraOBReports in your Case statement is
Null
or undefined. As for using a seperate report for each view, you logic
looks
OK for changing sort order. Get the code working and one report should
handle you needs.- Hide quoted text -
- Show quoted text -
I have checked as you suggested, and all is well.
I put "Break on all errors" - no errors
I stepped through the code - no errors; it follows as I would expect.
I checked the value of fraOBReports in the selectcase statements, and
it was "5" both times.
Any other ideas?
thanks -
sara
Is the code in the Report Open event?- Hide quoted text -
- Show quoted text -
Yes.
Should it be?
Sara
"sara" <sa*******@yahoo.comwrote in message
news:11**********************@y80g2000hsf.googlegr oups.com...
On May 18, 12:30 pm, "paii, Ron" <p...@packairinc.comwrote:
"sara" <saraqp...@yahoo.comwrote in message
news:11*********************@y80g2000hsf.googlegro ups.com...
On May 18, 8:58 am, "paii, Ron" <p...@packairinc.comwrote:
"sara" <saraqp...@yahoo.comwrote in message
news:11**********************@o5g2000hsb.googlegro ups.com...
On May 15, 11:33 am, "paii, Ron" <p...@packairinc.comwrote:
Have you tried setting a break point and stepping though the
code.
1) Check for any errors like unknown field names ect.
2) Is Forms.frmPrintReports.fraOBReports returning one of your
cases?
Also GroupLevel() numbers change as you add and remove groups.
"sara" <saraqp...@yahoo.comwrote in message
news:11**********************@h2g2000hsg.googlegro ups.com...
Hi -
I have looked at all posts and tried both Allen Browne's
Report
Sorting at run Time
( Select Case Forms!frmChooseSort!grpSort
Case 1 'Name
Me.GroupLevel(0).ControlSource = "LastName"
Me.GroupLevel(1).ControlSource = "FirstName") .....
And another post that was OrderByOn = True and setting the
sort
Order.
The second works, but since I can't use Sorting and Grouping,
I
can't
get totals that I need.
The first works in one App, but does not work now. Any idea
why?
When I run for any option, I get the OutboundDate as the first
Sort/
Group, Followed by Trailer #.
So, when for Case 5 I want Whse, Location, then Date, I'm
seeing:
Whse 3
Date
Trailer #
Dept (Details, grouped by location, but totaled
by
Trailer)
Perhaps I should be writing a separate report with the desired
sort
and totals? I'm not sure - I know I could use just the one
query,
but
I'm trying to be efficient, if possible. I have the feeling
it's
because I have header, totals in some footers and blanks in
others.
But I'd love confirmation or correction on this.
Thanks -
sara
Code:
Select Case Forms.frmPrintReports.fraOBReports
Case 1
' Default Report Sort: Whse, Date, Trailer#
Me.GroupLevel(0).ControlSource = "WhseKey"
Me.GroupLevel(1).ControlSource = "OutboundDate"
Me.GroupLevel(2).ControlSource = "TrailerNum"
Me.GroupLevel(3).ControlSource = "CreditSalesTo"
Me.GroupLevel(4).ControlSource = "LocationKey"
Me.GroupLevel(5).ControlSource = "GoodsTypeKey"
GoTo Exit_Report_Open
Case 2
' Default Sort: Whse, Date, Trailer#
Me.GroupLevel(0).ControlSource = "WhseKey"
Me.GroupLevel(1).ControlSource = "OutboundDate"
Me.GroupLevel(2).ControlSource = "TrailerNum"
Me.GroupLevel(3).ControlSource = "CreditSalesTo"
Me.GroupLevel(4).ControlSource = "LocationKey"
Me.GroupLevel(5).ControlSource = "GoodsTypeKey"
GoTo Exit_Report_Open
Case 3
' Dept Sort: Whse, Date, Dept
Me.GroupLevel(0).ControlSource = "WhseKey"
Me.GroupLevel(2).ControlSource = "CreditSalesTo"
Me.GroupLevel(1).ControlSource = "OutboundDate"
Me.GroupLevel(3).ControlSource = "TrailerNum"
Me.GroupLevel(4).ControlSource = "LocationKey"
Me.GroupLevel(5).ControlSource = "GoodsTypeKey"
GoTo Exit_Report_Open
Case 4
' Goods Type Sort: Whse, GoodsType, Date
Me.GroupLevel(0).ControlSource = "WhseKey"
Me.GroupLevel(1).ControlSource = "GoodsType"
Me.GroupLevel(2).ControlSource = "OutboundDate"
Me.GroupLevel(3).ControlSource = "TrailerNum"
Me.GroupLevel(4).ControlSource = "CreditSalesTo"
Me.GroupLevel(5).ControlSource = "LocationKey"
GoTo Exit_Report_Open
Case 5
' Location Sort: Whse, Location, Date
Me.GroupLevel(0).ControlSource = "WhseKey"
Me.GroupLevel(1).ControlSource = "LocationKey"
Me.GroupLevel(2).ControlSource = "OutboundDate"
Me.GroupLevel(3).ControlSource = "TrailerNum"
Me.GroupLevel(4).ControlSource = "CreditSalesTo"
Me.GroupLevel(5).ControlSource = "GoodsTypeKey"
'
GoTo Exit_Report_Open
End Select
(Error handling here)- Hide quoted text -
- Show quoted text -
There are no errors; code all executes and report is displayed.
I know the headers change as you add and remove, but I'm not sure
how
that impacts what I'm doing?? I put these from 0 ot 5 in the order
that I want the data displayed.
I'm thinking that I have to create a separate report for each
"view"
that the users see. I am trying to "reuse" everywhere I can, but
maybe I can't here?
Thanks -
sara
The code may execute by you still have an error, Step though the
code, I
would bet that frmPrintReports.fraOBReports in your Case statement
is
Null
or undefined. As for using a seperate report for each view, you
logic
looks
OK for changing sort order. Get the code working and one report
should
handle you needs.- Hide quoted text -
- Show quoted text -
I have checked as you suggested, and all is well.
I put "Break on all errors" - no errors
I stepped through the code - no errors; it follows as I would expect.
I checked the value of fraOBReports in the selectcase statements, and
it was "5" both times.
Any other ideas?
thanks -
sara
Is the code in the Report Open event?- Hide quoted text -
- Show quoted text -
Yes.
Should it be?
Sara
Yes, at least that is where it is in my reports.
Your code looks reasonable, since the case statement is working an the right
Case executes, There must be a problem with the data or groups. Try
disabling the code then set the sorting manually to see if it works.
On May 21, 8:09 am, "paii, Ron" <p...@packairinc.comwrote:
"sara" <saraqp...@yahoo.comwrote in message
news:11**********************@y80g2000hsf.googlegr oups.com...
On May 18, 12:30 pm, "paii, Ron" <p...@packairinc.comwrote:
"sara" <saraqp...@yahoo.comwrote in message
>news:11*********************@y80g2000hsf.googlegr oups.com...
On May 18, 8:58 am, "paii, Ron" <p...@packairinc.comwrote:
"sara" <saraqp...@yahoo.comwrote in message
>news:11**********************@o5g2000hsb.googlegr oups.com...
On May 15, 11:33 am, "paii, Ron" <p...@packairinc.comwrote:
Have you tried setting a break point and stepping though the
code.
1) Check for any errors like unknown field names ect.
2) Is Forms.frmPrintReports.fraOBReports returning one of your
cases?
Also GroupLevel() numbers change as you add and remove groups.
"sara" <saraqp...@yahoo.comwrote in message
>news:11**********************@h2g2000hsg.googlegr oups.com...
Hi -
I have looked at all posts and tried both Allen Browne's
Report
Sorting at run Time
( Select Case Forms!frmChooseSort!grpSort
Case 1 'Name
Me.GroupLevel(0).ControlSource = "LastName"
Me.GroupLevel(1).ControlSource = "FirstName") .....
And another post that was OrderByOn = True and setting the
sort
Order.
The second works, but since I can't use Sorting and Grouping,
I
can't
get totals that I need.
The first works in one App, but does not work now. Any idea
why?
When I run for any option, I get the OutboundDate as the first
Sort/
Group, Followed by Trailer #.
So, when for Case 5 I want Whse, Location, then Date, I'm
seeing:
Whse 3
Date
Trailer #
Dept (Details, grouped by location, but totaled
by
Trailer)
Perhaps I should be writing a separate report with the desired
sort
and totals? I'm not sure - I know I could use just the one
query,
but
I'm trying to be efficient, if possible. I have the feeling
it's
because I have header, totals in some footers and blanks in
others.
But I'd love confirmation or correction on this.
Thanks -
sara
Code:
Select Case Forms.frmPrintReports.fraOBReports
Case 1
' Default Report Sort: Whse, Date, Trailer#
Me.GroupLevel(0).ControlSource = "WhseKey"
Me.GroupLevel(1).ControlSource = "OutboundDate"
Me.GroupLevel(2).ControlSource = "TrailerNum"
Me.GroupLevel(3).ControlSource = "CreditSalesTo"
Me.GroupLevel(4).ControlSource = "LocationKey"
Me.GroupLevel(5).ControlSource = "GoodsTypeKey"
GoTo Exit_Report_Open
Case 2
' Default Sort: Whse, Date, Trailer#
Me.GroupLevel(0).ControlSource = "WhseKey"
Me.GroupLevel(1).ControlSource = "OutboundDate"
Me.GroupLevel(2).ControlSource = "TrailerNum"
Me.GroupLevel(3).ControlSource = "CreditSalesTo"
Me.GroupLevel(4).ControlSource = "LocationKey"
Me.GroupLevel(5).ControlSource = "GoodsTypeKey"
GoTo Exit_Report_Open
Case 3
' Dept Sort: Whse, Date, Dept
Me.GroupLevel(0).ControlSource = "WhseKey"
Me.GroupLevel(2).ControlSource = "CreditSalesTo"
Me.GroupLevel(1).ControlSource = "OutboundDate"
Me.GroupLevel(3).ControlSource = "TrailerNum"
Me.GroupLevel(4).ControlSource = "LocationKey"
Me.GroupLevel(5).ControlSource = "GoodsTypeKey"
GoTo Exit_Report_Open
Case 4
' Goods Type Sort: Whse, GoodsType, Date
Me.GroupLevel(0).ControlSource = "WhseKey"
Me.GroupLevel(1).ControlSource = "GoodsType"
Me.GroupLevel(2).ControlSource = "OutboundDate"
Me.GroupLevel(3).ControlSource = "TrailerNum"
Me.GroupLevel(4).ControlSource = "CreditSalesTo"
Me.GroupLevel(5).ControlSource = "LocationKey"
GoTo Exit_Report_Open
Case 5
' Location Sort: Whse, Location, Date
Me.GroupLevel(0).ControlSource = "WhseKey"
Me.GroupLevel(1).ControlSource = "LocationKey"
Me.GroupLevel(2).ControlSource = "OutboundDate"
Me.GroupLevel(3).ControlSource = "TrailerNum"
Me.GroupLevel(4).ControlSource = "CreditSalesTo"
Me.GroupLevel(5).ControlSource = "GoodsTypeKey"
'
GoTo Exit_Report_Open
End Select
(Error handling here)- Hide quoted text -
- Show quoted text -
There are no errors; code all executes and report is displayed.
I know the headers change as you add and remove, but I'm not sure
how
that impacts what I'm doing?? I put these from 0 ot 5 in the order
that I want the data displayed.
I'm thinking that I have to create a separate report for each
"view"
that the users see. I am trying to "reuse" everywhere I can, but
maybe I can't here?
Thanks -
sara
The code may execute by you still have an error, Step though the
code, I
would bet that frmPrintReports.fraOBReports in your Case statement
is
Null
or undefined. As for using a seperate report for each view, you
logic
looks
OK for changing sort order. Get the code working and one report
should
handle you needs.- Hide quoted text -
- Show quoted text -
I have checked as you suggested, and all is well.
I put "Break on all errors" - no errors
I stepped through the code - no errors; it follows as I would expect.
I checked the value of fraOBReports in the selectcase statements, and
it was "5" both times.
Any other ideas?
thanks -
sara
Is the code in the Report Open event?- Hide quoted text -
- Show quoted text -
Yes.
Should it be?
Sara
Yes, at least that is where it is in my reports.
Your code looks reasonable, since the case statement is working an the right
Case executes, There must be a problem with the data or groups. Try
disabling the code then set the sorting manually to see if it works.- Hide quoted text -
- Show quoted text -
I'll try this - I'm out for a few weeks, but may get to it while out.
Otherwise, I'll post when I've tried it.
Thanks This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Richard Holliingsworth |
last post by:
Hello:
Thanks for reading this.
I would like to build a report (Access 2002) that uses SQL queries to
count records in specific groups.
I've tried several methods and so far no luck.
...
|
by: Grim Reaper |
last post by:
I know this is probably an easy question, but I could not find/figure it
out.
Basically, I am printing mailing labels with a "Sorting/Grouping" section
that groups the label types together....
|
by: ahaque38 |
last post by:
Hello.
Using A2K SP3, I am having the following problem with a report using
"Sorting and Grouping".
I have recently added a grouping in the reports for
"Category2<>'CONTRACTS'".
I have...
|
by: James P. |
last post by:
Hello,
I have a report with the Priority field is used as sort order and
grouping. The problem is the data in this Priority field if sorted in
ascending order is: High, Low, and Medium. How...
|
by: Mike MacSween |
last post by:
tblCourses one to many to tblEvents.
A course may have an intro workshop (a type of event), a mid course
workshop, a final exam. Or any combination. Or something different in the
future.
At...
|
by: manning_news |
last post by:
I've got a report that's not sorting correctly. I build a SQL
statement and assign it to the recordsource in the Open event, sorting
the data the way the user chooses. The user can choose up to 3...
|
by: Jana |
last post by:
Hi!
I have an Access 97 report based on tables linked to an SQL back end.
The report has 5 subreports in it (unfortunately unavoidable due to the
nature of the report) and performance is quite...
|
by: Darknight850 |
last post by:
Hello All,
I have a question about sorting in a report. Right now I have multiple reports sorting off of my companies table that has two fields; CompaniesID, and Company Name. Well the problem I...
|
by: anubis2k7 |
last post by:
Hi,
I am having a problem with dynamically sorting/grouping data in my report at runtime. My problem is that when the report is run using sorting/grouping I am missing data.
Specifically, my...
|
by: Kemmylinns12 |
last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
|
by: Naresh1 |
last post by:
What is WebLogic Admin Training?
WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
|
by: antdb |
last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine
In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
|
by: Matthew3360 |
last post by:
Hi,
I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
|
by: Oralloy |
last post by:
Hello Folks,
I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA.
My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
|
by: BLUEPANDA |
last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
|
by: Rahul1995seven |
last post by:
Introduction:
In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
|
by: Johno34 |
last post by:
I have this click event on my form. It speaks to a Datasheet Subform
Private Sub Command260_Click()
Dim r As DAO.Recordset
Set r = Form_frmABCD.Form.RecordsetClone
r.MoveFirst
Do
If...
|
by: ezappsrUS |
last post by:
Hi,
I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...
| |