Results 1 to 6 of 6
  1. #1
    2 Star Lounger
    Join Date
    Mar 2005
    Location
    Anderson, Indiana, USA
    Posts
    109
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Crosstab in a Subreport (2000 SP3)

    I have a cross tab report being used as a sub report. What I am tying to do is limit what is shown in the cross tab based on a field in the main report, which is the only field. I have run out of ideas. I would any appreciate any input.

    Thank you,

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Crosstab in a Subreport (2000 SP3)

    The standard solution to this is to use the Link Child Field and Link Master fileds in the properties of the subreport control.

    Yours are blank. Have you tried them?
    Regards
    John



  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Crosstab in a Subreport (2000 SP3)

    This isn't going to work. It's not possible to use a crosstab query with dynamic column headings as record source for a subreport, and the On Open code of the subreport is only executed once, when the main report is opened, not each time you move to a new record in the main report. I fear you'd have to populate the subreport entirely in code, but that would be a hell of a job.

  4. #4
    2 Star Lounger
    Join Date
    Mar 2005
    Location
    Anderson, Indiana, USA
    Posts
    109
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Crosstab in a Subreport (2000 SP3)

    Thanks for the input. I was afraid there was no simple solution. I will post a solution when I get it finished.

  5. #5
    2 Star Lounger
    Join Date
    Mar 2005
    Location
    Anderson, Indiana, USA
    Posts
    109
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Crosstab in a Subreport (2000 SP3)

    After the input, I received and some deep thought while at home last night, I came up with a different approach to what I was trying to achieve. I was looking for a way to print out several reports at one time using a cross tab report as a sub report. For my solution, I added a list box to the main form and a command button to cycle through the list box and auto print for each value in the list box. The cross tab report is no longer a sub report and is just the main report. The list box is populated with a list, based on the dates. Here is a working example as well.

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Crosstab in a Subreport (2000 SP3)

    Thanks for sharing. It's good that you got rid of the subreport, for I don't think it would be possible to do this with a subreport.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •