none
A2007: subreport's subreport's position and dimensions RRS feed

  • Question

  • Hi,

    in A2007 I have a complex report (4 pages for each record) with several subreports. There are nested subreports in some of the subreports. Those nested subreports' property CanGrow is set to TRUE. I need to struck through empty space under such subreports, eg.:

    http://www.streamline.cz/download/access/Blog/SubreportStrikeThrough1.jpg

    http://www.streamline.cz/download/access/Blog/SubreportStrikeThrough2.jpg

    The images show page 4 of the report. All below "KATALOGOVY LIST strana 4"is a subreport.
    Parts under "Školní vzdělávací program v ročníku a ve školním roce:" and "Navštěvoval (a) školu (adresa, od):" are nested subreports.

    The weird thing is that I get incorrect Y dimension (WindowHeight) of a subreport, eg:

    Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    Dim x As Long

       x = Me![rptZakKatListZS4].Report![rptZakKatList2stupen-Skoly].Report.WindowHeight
       Debug.Print "Me![rptZakKatListZS4].Report![rptZakKatList2stupen-Skoly].Report.WindowHeight = " & x & _
                   " twips = " & Format(x / 567, "0.000") & " cm"

    End Sub

    The result is NEGATIVE (!) number:

    Me![rptZakKatListZS4].Report![rptZakKatList2stupen-Skoly].Report.WindowHeight = -30976 twips = -54,631 cm

    I must be doing something wrong. Please, point me to the right direction.
    Thank you very much in advance.

    P.S. I hope that WindowTop is correct. I haven't tried it yet due to incorrect WindowHeight value.


    P.S. My former account was Vladimir Cvajniga but I can't access it anymore, see http://social.msdn.microsoft.com/Forums/office/en-US/5b1284eb-a74f-4c55-9d4c-d6fb6eb25d48/fatal-how-can-i-login-to-my-account?forum=Offtopic#5b1284eb-a74f-4c55-9d4c-d6fb6eb25d48.



    Wednesday, November 18, 2015 5:49 PM

All replies

  • Hi Desperately,

    I made a test with your description, and I could reproduce your issue. I found that if value of height was less than 4.5’, the WindowHeight was positive number, if it larger than 5’, the WindowHeight was NEGATIVE (!) number.

    Since you have set CanGrow is True, I suggest you set the height of subreport less than 4.5’ to work around this issue.

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Thursday, November 19, 2015 6:56 AM
  • Hi, Edward,

    thank you very much for your time you spent in this issue. I've got more ideas after I read your post. I need some time to see if any of them works. Unfortunately, I've just realized that I need to set CanGrow to False and that Height of these nested subreports must be fixed. Btw, height of the "testing" subreport is 4.063cm which is ~1.6'. But I always get a negative value of WindowHeight.

    I'm going to play with the idea of "a strike-through line in a nested subreport's (group/report) footer". Not an easy task, maybe I'll have to use record count (Sum(1)) in report footer to calculate and set footer's height. Then I think I will be able to draw the line at the empty space.


    P.S. My former account was Vladimir Cvajniga but I can't access it anymore, see http://social.msdn.microsoft.com/Forums/office/en-US/5b1284eb-a74f-4c55-9d4c-d6fb6eb25d48/fatal-how-can-i-login-to-my-account?forum=Offtopic#5b1284eb-a74f-4c55-9d4c-d6fb6eb25d48.

    Thursday, November 19, 2015 8:36 AM
  • Hi Desperately,

    I am glad you have some new try. If you have any updates about your issue, please feel free to let us know.

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Friday, November 20, 2015 5:19 AM
  • Hi Desperately,

    ... If you have any updates about your issue, please feel free to let us know...

    Best Regards,

    Edward

    I surely will. At this time I had to switch to another project to code something different. Hope to get back coon.

    Vladimir Cvajniga



    Monday, November 23, 2015 8:25 AM
  • Unfortunately, I can't make subreport's NoData event fire. I'll play with the other ones.


    P.S. My former account was Vladimir Cvajniga but I can't access it anymore, see http://social.msdn.microsoft.com/Forums/office/en-US/5b1284eb-a74f-4c55-9d4c-d6fb6eb25d48/fatal-how-can-i-login-to-my-account?forum=Offtopic#5b1284eb-a74f-4c55-9d4c-d6fb6eb25d48.


    Friday, December 18, 2015 2:22 PM