• SubReport Causes Main Report to Print Twice (XP SP2)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » SubReport Causes Main Report to Print Twice (XP SP2)

    Author
    Topic
    #445810

    I have a report with several subreports. All of the subreports except one behave as they should: multiple entries in the subreport print and do not cause the whole report to print twice. However, I have one subreport that is based on a query that pulls data that is between 2 dates and when there is more than entry in this subreport for the parent, the whole parent and subreport sections print twice.

    I’ve attached one page which shows the duplication.

    Other subreports in this report are the Contacts name (Phil Skilman is in that section), Distributor Sales. If there are multiple entries there, I do not get duplication. Just the Contacted Info causes the duplication.

    Where have I messed up?

    Viewing 0 reply threads
    Author
    Replies
    • #1081963

      We’d have to see the database instead of a fragment of a report. Could you post a stripped down copy of your database? See post 401925 for instructions.

      • #1081972

        Hans, do you want me to leave some data in or what? Or do you want just the structure?

        • #1081976

          Leave just enough data to demonstrate the problem. Replace sensitive data with dummy values.

          • #1081996

            Hans, I’ve stripped the db down. However, it is too big according to the error report I just got. It is 394K (zipped). I don’t know that I can make it any smaller. What do I do now?

            The report that is causing my problem is called: DistList-CONTACTED

            Thank you for all your help!!!

            • #1081998

              Did you follow all the instructions in the post I referred to (zip the database, convert to Access 97 format)?

            • #1082005

              You can remove all database objects that are not relevant to the problem.
              I’ve never yet seen a database that couldn’t be stripped down far enough.

            • #1082023

              My apologies. I hadn’t seen the link on how to strip down the db.

              Here it is now.

              Thank you again.

            • #1082025

              Unfortunately, your zip file is empty when I download or open it.

            • #1082037

              You know, Hans, I am not normally so inept stupidme . Honest!

              Here it is again and it is large enough that there should be data in it.

            • #1082081

              The subreports have nothing to do with the problem, it’s the record source of the main report. If there are multiple contact notes for the same distname, the query DistList1A-NameContacted will return multiple records for that distname.

              One workaround is to group the report by distname, and to place the subreports in the group header instead of in the detail section – see DistList-CONTACTED V1.
              Another option is to modify the query so that it returns unique distnames – see DistList-CONTACTED V2, it uses DistList1A-NameContacted2 as record source.

              See attached version.

            • #1082199

              Hans, thank you for your quick response. I will look at your solutions later today. However, I was wondering how come the grouping I already have on the report works for the Contacts but not the CONTACTED notes? Just curious.

              You’re the best!

            • #1082205

              Your report DistList-CONTACTED is sorted but not grouped on DistName. Its record source DistList1A-NameContacted is also sorted but not grouped on DistName. So why would Access group on DistName?

            • #1082209

              Maybe I’ve mis-understood the attached screen which I think says that I am grouping on DistName. I clicked the little box in the upper left corner of the whole report and looked at the Grouping area. Am I nuts?????

            • #1082215

              Your screenshot says that the repors is sorted (Ascending) on DistName.
              Since both the Group Header and Group Footer properties are set to No, the report is *not* grouped on DistName. In order to group a report on a field, at least one of these two has to be set to Yes. That is what I did in one of the examples in the version I posted.

            • #1082221

              I thought that if the Group On value was set to Each Value that meant it was grouped. Didn’t realize that I had to use the Group Header or Footer too.

              Thanks for clearing that up.

            • #1082774

              Hans,

              THANK YOU!!!!

              I chose to do the header solution and you made it clear and easy enough for me to accomplish! I couldn’t quite understand the query solution.

              Now my report is perfect.

              I really appreciate the time and effort you took in solving my problem. It is nice to know that there are people so willing to help.

    Viewing 0 reply threads
    Reply To: SubReport Causes Main Report to Print Twice (XP SP2)

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

    Your information: