• not print blank pages when subreport

    • This topic has 7 replies, 2 voices, and was last updated 13 years ago.
    Author
    Topic
    #482882

    Friends, I have a report with subreports eight, but sometimes, some sub has no data. Are getting blank pages
    prints how do I fix?
    Thank you.

    Viewing 3 reply threads
    Author
    Replies
    • #1330199

      Are the sub report control’s Can Shrink property set to Yes? You will also need to be sure that each section that has a sub report is also set to Can Shrink = Yes.

      • #1330239

        Thanks for responding and helping. Resolved, as you told me, but to place it can shrink and can expand,
        for all sections of all subreports also placed time zero for all subreports.
        In the event when loading the subreport I repeat this code for each sub:

        Then if Me.Filho0.Report.HasData
        Me.Filho0.Visible = True
        else
        Me.Filho0.Visible = False
        end If

        In the event if you are not given for each sub I put:
        cancel = True

        As I open the report it is all empty, but when I print, it prints perfectly, if the sub is no data, shows
        and also the sub fully expand.

        Only when I open’m not seeing anything.

        Thank you.

    • #1330308

      Not sure why you need all that VBA code. I have never had to use any VBA code to do what you want.

      … also placed time zero for all subreports ….

      :confused: I do not understand what this means.

      n the event if you are not given for each sub I put:
      cancel = True

      Which event? I have never had to do that before in a sub report :confused:

      Only when I open’m not seeing anything.

      That sounds like an issue caused by your VBA code.

      Would it be possible to post a sample database with the report?

    • #1330463

      Ok I’m sending the bd. The report name is XXXAndirleiGeral3XXX, is the last report.
      I put in all sections of all the subreports I put yes in order to expand and also to reduce power.
      I pulled out all the VBA, but now is not hiding the subs empty, and also getting to blank in the subform.
      See, my biggest problem is the view when I open the report.

      Thank you.

      • #1330508

        It was easy to fix. I turn off the page header and footer on each sub report.

        NOTE: If you view the report in Report view this sub reports will probably always show. They will auto hide properly in Print Preview.

        I would also set the default vie to Print Preview. I would also set the Allow report View to No since the report will display the way you want Report View.

        I generally avoid Report view. If I do use it I create two different report,. One for using with Report View. Another used for Printing.

        I am tryng to attach the database I fixed. I am not able to upload the file. I will try again later

        • #1330671

          HiTechCoach, thank you for your help, Sorry for being slow to respond, I was without internet.

          I was able to partially resolve. I put a button on the form to open the report.

          Thus, it opens directly in Print Preview, subreports showing correctly and also printing correctly.

          Still, if possible, send me what you got, if you can not the forum, send the dropbox.

          Again, thank you.

    • #1330672

      HiTechCoach, thank you for your help, Sorry for being slow to respond, I was without internet.

      I was able to partially resolve. I put a button on the form to open the report.

      Thus, it opens directly in Print Preview, subreports showing correctly and also printing correctly.

      Still, if possible, send me what you got, if you can not the forum, send the dropbox.

      Again, thank you.

    Viewing 3 reply threads
    Reply To: not print blank pages when subreport

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: