Solved CanShrink in reports detail. (1 Viewer)

bastanu

AWF VIP
Local time
Yesterday, 21:44
Joined
Apr 13, 2010
Messages
1,401
Something like this should work (Dcount on that query would tell you if there are records returned or not):
IIF(dCount("*","QSalesQuotationItemAcc","OrderID = " & OrderID) =0,>0,< DMin("POSITION","QSalesQuotationItemAcc","OrderID = " &OrderID))
Cheers,
 

Sodslaw

Registered User.
Local time
Yesterday, 21:44
Joined
Jun 7, 2017
Messages
81
Something like this should work (Dcount on that query would tell you if there are records returned or not):
IIF(dCount("*","QSalesQuotationItemAcc","OrderID = " & OrderID) =0,>0,< DMin("POSITION","QSalesQuotationItemAcc","OrderID = " &OrderID))
Cheers,
I think you've cracked it! ;)

Sub report 1 = SalesQuotationItem
Sub report 2 =QSalesQuotationItemAcc
Sub report 3 =SalesQuotationItem2

In report 1, Form filter ...
Code:
IIF(DCount("*","QSalesQuotationItemAcc","OrderID = " & OrderID)=0,POSITION>0,POSITION < DMin("POSITION","QSalesQuotationItemAcc","OrderID = " &OrderID))

report 3
Form filter...
Code:
POSITION > DMax("POSITION","QSalesQuotationItemAcc","OrderID = " &OrderID)
(Maybe ill update to mirror Rep1)

in VBA..
Code:
If Me![SalesQuotationItem].Report.HasData = False Then
    Me.SalesQuotationItem.Visible = False
    Me!PageBreak82.Visible = False
End If

If Me![SalesQuotationItemAcc].Report.HasData = False Then
    Me.SalesQuotationItemAcc.Visible = False
    Me!PageBreak160.Visible = False
End If

If Me![SalesQuotationItem2].Report.HasData = False And Me![SalesQuotationItemAcc].Report.HasData = False Or Me![SalesQuotationItem2].Report.HasData = False Then
    Me.SalesQuotationItem2.Visible = False
    Me!PageBreak163.Visible = False
End If

If CanShrink and CanGrow would have worked, then all of this crap could have been avoided
 
Last edited:

Users who are viewing this thread

Top Bottom