Can I Display a Report Preview in on Form?

M

Max Moor

Hi All,

There has to be a way to do this. Why does there have to be a way?
'Cause I need one!

Does anyone know a method for displaying a report preview on a form?

In trying to skin this particular cat, I've thought of a few routes
that might work...

I wished I could just use a command button in the header of the report
preview. I can put it there, but there is no click event!

Then I thought to simply place a subreport control on a form. HA!
Oh, foolish mortal! Access doesn't seem to like this idea much.

I also thought of maybe piping the report preview into an RTF control
on a form. How do I get the Access report format into RTF format to do it
though?

Does anyone see a method I can use to get this done?

Regards,
Max
 
R

Rob Parker

Max said:
Hi All,

There has to be a way to do this. Why does there have to be a way?
'Cause I need one!

Sorry - that's not a good enough reason ;-)
Does anyone know a method for displaying a report preview on a
form?

Not me. I think it's so illogical to even want to do this that not even
Microsoft will have provided a method to do so.
In trying to skin this particular cat, I've thought of a few routes
that might work...

I wished I could just use a command button in the header of the
report preview. I can put it there, but there is no click event!

That's right. Reports have no clickable controls. There are events for
report sections, but they're not clickable.
Then I thought to simply place a subreport control on a form. HA!
Oh, foolish mortal! Access doesn't seem to like this idea much.

I wonder why??? Perhaps because it's such an off-the-planet idea ;-)
I also thought of maybe piping the report preview into an RTF
control on a form. How do I get the Access report format into RTF
format to do it though?

Well, putting it into an RTF format will lose all objects that are not
textboxes - any lines, images, etc are gone. RTF (in Access) is a rather
flawed attempt to provide a method to dump a report to a Word document in a
WYSIWYG form. So, even if you could figure out how to do it, using an RTF
format wouldn't work. But using a Snapshot format (which preserves the real
WYSIWYG form of the report) would - if it were possible to save it, then
open it in (say) an unbound object control.
Does anyone see a method I can use to get this done?

Sorry. I can't even hazard a possible approach to this. Sadly, my "you can
do anything if you're blood-minded enough" philosophy fails me here ;-) And
I don't have sufficient confidence to try the approach I suggested in the
previous comment - I suspect that would simply be a WOFTAM. But feel free
to try that ;-)
Regards,
Max

And last, but not least, why would you want to do this? Why not just open
the report in preview mode, over the form?

Rob
 
K

Klatuu

You don't really need one. You just want one.
There is no reasonable way to do this.
 
M

Max Moor

Sorry - that's not a good enough reason ;-)


Not me. I think it's so illogical to even want to do this that not even
Microsoft will have provided a method to do so.


That's right. Reports have no clickable controls. There are events for
report sections, but they're not clickable.


I wonder why??? Perhaps because it's such an off-the-planet idea ;-)


Well, putting it into an RTF format will lose all objects that are not
textboxes - any lines, images, etc are gone. RTF (in Access) is a
rather flawed attempt to provide a method to dump a report to a Word
document in a WYSIWYG form. So, even if you could figure out how to do
it, using an RTF format wouldn't work. But using a Snapshot format
(which preserves the real WYSIWYG form of the report) would - if it were
possible to save it, then open it in (say) an unbound object control.


Sorry. I can't even hazard a possible approach to this. Sadly, my "you
can do anything if you're blood-minded enough" philosophy fails me here
;-) And I don't have sufficient confidence to try the approach I
suggested in the previous comment - I suspect that would simply be a
WOFTAM. But feel free to try that ;-)


And last, but not least, why would you want to do this? Why not just
open the report in preview mode, over the form?

Rob
Hi Rob,

It's really for the sake of window management. I have an application
with a "LeftNav" form that is always open and visible. It shows a list of
forms and reports that can be opened. With forms, I use the FormInfo
object from the Developer's Handbook to measure the client space and fit
the form into it. The hitch is that I do it with no title bar or system
controls. I have a close button of my own devising to handle that one
system function I want to allow.

With reports, I don't see a way to open a preview in the same fashion,
so it will look to the user like, and more importantly operate like the
other windows.

If worse comes to worse, I'll just open a preview like I would in any
other app. Even if it looks a little different from the forms, the LeftNav
can still manage it. It will just float over the client space, rather than
fit it exactly, and will have the standard control buttons.

Regards,
Max
 
M

Max Moor

I don't know of a good way either. However, I'll defend the desire to
do so . . especially when the report is the product of an interactive
form. It's nice for the user to have the preview shown in a frame on
the form, where they can also see the criteria fields they've entered,
etc. I've seen applications that do this in .net, and they're very
nice.

I also agree that RTF stinks. Use the Lebans PDF code to output to PDF.
Maybe (maybe) if you do that, then you can open it in some object frame
... but I'm skeptical you'll find a good way without having to jump
through painful hoops.

Hi tkelly,

Thanks for the response. It's really just for the sake of uniformity
of the user interface I want to do this. It's not a show stopper if I
can't.

It does surprise me a little that it seems such an impossible things
to do and that more other folks haven't wanted to do it, even if just for
the sake of making things pretty.

You never know until you ask the crew. Oh well.

Regards,
Max
 
R

Rob Parker

Hi Max,

I agree that a uniform user interface is worth striving for, and so can see
why you asked. Unfortunately, as I said previously, I don't know how to do
it. And after my initial reply, I also got to pondering what you would want
to show (or do) if the report is a multi-page report; that seems an even
bigger problem.

Good luck with you endeavours to this end, and sorry I can't assist more
positively.

Rob

..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top