PC Review


Reply
Thread Tools Rate Thread

Changing a newly created report from design view to preview

 
 
Jim
Guest
Posts: n/a
 
      5th May 2006
Greetings!

I am generating a report which I use to plot a graph-on-the-fly using
rectangle controls (small squares) as data points on top of a
pre-scanned image. So, I create the new report in design view, add the
rectangle controls to show my datapoints, and then I want the user to
see to graph in preview mode.

To do so, I seem to have to first save it (with the automatically
generated name that access gives it such as Report_n- report name seems
to be read-only) and then re-open it in preview mode. therefore, each
time this is run, my database grows by one report.

Is there a way to change the view mode of my temporary report without
saving it? The only other option would be to open the report, make sure
there are no rectangle controls already on it (delete those controls)
and make my graph. but, again, you can't do that except in design mode.
thoughts? (other than why not use a graph control... I want the image
in the background)

Thanks!

 
Reply With Quote
 
 
 
 
Jim
Guest
Posts: n/a
 
      5th May 2006
Making progress- so I made a macro that executes the menu command
PrintView (runcommand printview) and I call the macro in my code, which
then shows the report in preview mode. Unfortunately when you close
this view, you are still left with the unsaved design view of the new
report. will keep working on it.

 
Reply With Quote
 
Marshall Barton
Guest
Posts: n/a
 
      7th May 2006
Jim wrote:
>I am generating a report which I use to plot a graph-on-the-fly using
>rectangle controls (small squares) as data points on top of a
>pre-scanned image. So, I create the new report in design view, add the
>rectangle controls to show my datapoints, and then I want the user to
>see to graph in preview mode.
>
>To do so, I seem to have to first save it (with the automatically
>generated name that access gives it such as Report_n- report name seems
>to be read-only) and then re-open it in preview mode. therefore, each
>time this is run, my database grows by one report.
>
>Is there a way to change the view mode of my temporary report without
>saving it? The only other option would be to open the report, make sure
>there are no rectangle controls already on it (delete those controls)
>and make my graph. but, again, you can't do that except in design mode.
> thoughts? (other than why not use a graph control... I want the image
>in the background)



Is there a good reason why you can not draw the rectangles,
etc. at run time using the section's Print event?

--
Marsh
MVP [MS Access]
 
Reply With Quote
 
Jim
Guest
Posts: n/a
 
      14th May 2006
Well, I do want the user to be able to preview the graph, and close it
or print it. Most times, the report would not be printed. Thanks.

 
Reply With Quote
 
Marshall Barton
Guest
Posts: n/a
 
      14th May 2006
Jim wrote:

>Well, I do want the user to be able to preview the graph, and close it
>or print it. Most times, the report would not be printed. Thanks.



I don't see that as a reason against doing it at runtime
without messy around with design operations. It's actually
easier to manipulate properties of existing controls than to
create the controls with those property settings.

What I was suggesting earlier is the use the report's Page
event and the Line method to draw boxes anywhere on the
page. The only thing this requires is that you know where
on the page the graph is located. Well, you also have to
know where you want the rectangles, but if you don't know
that, I don't see how any approach can work.

Bottom line here is, DO NOT USE CreateControl in a running
application.

--
Marsh
MVP [MS Access]
 
Reply With Quote
 
Jim
Guest
Posts: n/a
 
      16th May 2006
I understand now. Thank you. I hadn't considered that approach. It
will work nicely. I used the rectangle method because I did not know
how many data points there would be, but this does the same thing in
the end. Once again, thanks.

 
Reply With Quote
 
Marshall Barton
Guest
Posts: n/a
 
      16th May 2006
Jim wrote:

>I understand now. Thank you. I hadn't considered that approach. It
>will work nicely. I used the rectangle method because I did not know
>how many data points there would be, but this does the same thing in
>the end. Once again, thanks.



Let us know how it works out.

The last several versions of Acccess Help have messed up the
topic for the Line and Circle methods so if you have trouble
using the Line method come on back and we'll try to work it
out.

--
Marsh
MVP [MS Access]
 
Reply With Quote
 
Jim
Guest
Posts: n/a
 
      18th May 2006
Yes, The line method help says nothing about the "B" box mode etc, but
I found what I needed, following your lead. the module works great
now, and it was simple to switch over from the rectangle control method
to the line method.
Thanks again! Jim

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ACC2000: Switch report from design view to preview through VBA Martin Schneider Microsoft Access Form Coding 5 6th Nov 2009 03:57 PM
Closing print preview puts report in design view Freida Microsoft Access Reports 0 20th Aug 2009 04:00 PM
My report header shows in design view but not print preview Karen Microsoft Access 4 7th Feb 2008 09:01 PM
Preview pane with a newly created form =?Utf-8?B?Um9iIEFsbGVu?= Microsoft Outlook Discussion 1 19th Jan 2006 06:16 PM
Report differs in design view & print preview?!?! Carley Microsoft Access Reports 1 4th Feb 2004 02:07 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:01 AM.