DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Access Report Problem

  1. #1
    Join Date
    Jun 2004
    Location
    Houston area
    Posts
    557

    Wink Access Report Problem

    OH MY! How do I explain this?

    I have two sub-reports in an Access report. If the top one has no data, I want the bottom one to print in its place. Here's what I have so far. I can get the bottom sub report to MOVE but it always moves to top=0. I tried assigning the value (0.6354) to a constant and using the constant and MANY other things but the **** thing just keeps going to the top of the page!

    Code:
    
      Private Sub GroupFooter4_Format(Cancel As Integer, FormatCount As Integer)
    Const conTopMargin = .6354
        
        If Me!PerItemSubReport.Report.HasData = True Then
            Me.GroupFooter4.Visible = True
            Reports!HourlyBillingReport!Text45.Caption = "Per Item Charges"
            If Me.MiscellaneousChargesSubReport.Report.HasData = True Then
                Me.Text61.Visible = True
                Me.Text62.Visible = True
            Else
                Me.Text61.Visible = False
                Me.Text62.Visible = False
            End If
        Else
            If Me.MiscellaneousChargesSubReport.Report.HasData = True Then
                Me.GroupFooter4.Visible = True
                Reports!HourlyBillingReport!Text45.Caption = "Miscellaneous Charges"
                'Me.PerItemSubReport.DataSource = Report.MiscChargesSubReport - This doesn't work!
                'Me.MiscellaneousChargesSubReport.Top = conTopMargin - This doesn't work!
                'Me.MiscellaneousChargesSubReport.Top = .6354 - This doesn't work!
                'Me.MiscellaneousChargesSubReport.Top = 0.6354 - This doesn't work!
                'Reports!HourlyBillingReport!MiscellaneousChargesSubReport.Top = 5.6354 - This doesn't work!
               '*******Move the Misc Charges SubReport Up***************
    
                Me.Text61.Visible = False
                Me.Text62.Visible = False
             Else
                Me.GroupFooter4.Visible = False
            End If
        End If
        
    End Sub
    



    Have any of you got any other ideas?

    L
    Last edited by Laurel; 04-25-2005 at 12:36 PM.
    A balanced diet is a cookie in each hand.

  2. #2
    Join Date
    Feb 2004
    Location
    Longueuil, Québec
    Posts
    577
    I have been programming in Access since version 1.1, and for me, the Top property of a subReport never seemed to work properly.

    I would rather send you a solution, but I hope this is a consolation.
    Jacques Bourgeois
    JBFI
    http://www3.sympatico.ca/jbfi/homeus.htm

  3. #3
    Join Date
    Jun 2004
    Location
    Houston area
    Posts
    557
    :-Þ Thanks anyway!

    If I could figure out what event to do this, it MIGHT work:

    Me.PerItemSubReport.DataSource = Report.MiscChargesSubReport

    If I change the datasource of the top subreport to that of the bottom subreport, then the bottom subreport will be in the right place.
    A balanced diet is a cookie in each hand.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center