Playing with Report View as a subform

I’ve been playing with adding a report as a subform. As far as I know, that means the report is displayed in report view. That means no format event, and there are several other events that don’t fire either.

The worst part is for complicated reports, if you are using a sup-report you can’t shrink it, if there are no related records. If the subreport is really simple 1-line kinda thing, you can manually shrink all the controls to be 1 pixel high, and set its can grow to true. This sorta hides the supreport, but its tedious.

However, the good thing about the supreport, is that it CAN grow, unlike a subform. AND it can have buttons. With a bit of coding as well, you can get some sweet results. Try to take a look at this demo I made:

It starts by showing a subform, then switches to showing a supreport, and then even expands and contracts groups LIVE. Note how the scrollbar stays in place, and doesn’t scroll to the top, as it refreshes.

Its not a complete project yet (You can probably tell ), but I figured I would share it, just for inspiration, and potential feedback.

Tagged with: ,
7 comments on “Playing with Report View as a subform
  1. Neil says:

    Whats the code behind the button?

  2. I have been looking for something exactly like this. Can you post (or send me) the sample code.

    Dick Benson

  3. Katerina says:

    Could you post the code behind forms/reports ?

    • TheSmileyCoder says:

      Hi Katerina
      I’ll try to see if I still have the sample file somewhere. I’ve switched PC since then so I might no longer have the copy.

Leave a Reply to Neil Cancel reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.