Resizing Report in Dialog Mode

sherlocked

Registered User.
Local time
Today, 15:51
Joined
Sep 22, 2014
Messages
125
Experts,

I have a report that I open in acViewReport, acDialog mode. I am attempting to resize the report dialog so that the user press a button that takes a screen shot of the report and pastes it in an email. For reasons more complicated than I have time to explain here, SendObject isn't an option for this report.

Below is the code in the "On Open" event of my report. I have to set focus because there is another form open behind the report when the user clicks a menu button to launch the report. This does successfully open and resize the window, but I am only getting partial rendering of the report; my unbound text fields appear with data in them, but my labels and buttons do not appear. Is there any obvious reason for this? :banghead:

Code:
DoCmd.SelectObject acReport, "rptCapitol", False
DoCmd.MoveSize , , , 20000
 
You might try a DoEvents to give the rendering engine some cpu time.
 
Forgive my ignorance, but what would that look like, and where in the code should it take place? I appreciate your time :)
 
That's easy!:
Code:
DoCmd.SelectObject acReport, "rptCapitol", False
DoCmd.MoveSize , , , 20000
DoEvents
 
Thank you so kindly, but this doesn't seem to have made any difference. To help illustrate what's happening, I've included two screen shots, one with the MoveSize code and one without. This may help you see what's missing when the report renders :)
 

Attachments

  • WithMoveSize.jpg
    WithMoveSize.jpg
    52.2 KB · Views: 149
  • WithoutMoveSize.jpg
    WithoutMoveSize.jpg
    63.9 KB · Views: 131
@sherlocked

Not quite the same as you are doing but I wasted a long time trying to set up sending automatic emails with a screengrab of the message box when program errors occur. I never did get it to work well

I then tried replacing the MsgBox with a form and saving that as an image Still no luck in getting everything to show in the attached image.

I hope you have more luck than I did
 
rather than using movesize, use move

in the report open event

me.move me.left, me.top. me.width, 20000
 
Thank you so much, but this still is not working. The report opens, data appears in my text fields, but the rest of the information is missing.

Any other ideas?
 
Sorry, missed that question. This code is in the On Open event.

Thanks :)
 
Thanks! There are now some very bright helpers looking at this issue.
 
Testing some more, I found that if I put the Move Size event On_Load it is actually making the report longer, but not the dialog window the report is appearing in. That's really what I need to have larger, so that the screen shot captures all data. Any ideas how this can be accomplished?
 
What happens if you open the report NOT in dialog view?
 
The same thing. The report is longer, yes, but I still need to scroll down to view all the data, and this is what I have to avoid if the user is to be able to click a button to screen print the report and paste it into an email body.
 
Could you modify the layout so it fits on 2 pages & also change the default view to 2 pages so it all fits on the screen?

Alternatively why not save the report as a PDF and email it as an attachment
 
How about creating a pdf and attaching it to an email?
 
I was not able to find a satisfactory solution, so I wound up just squishing up all my report fields so that they appear on one page. This was a non-elegant but functional solution.

Best of luck to anyone in the future Googling this issue, hope you are able to find a way to accomplish this that I wasn't! :D
 

Users who are viewing this thread

Back
Top Bottom