UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Formatted report not working withOUT detail OnFormat    
 
   
pere_de_chipstic...
post Feb 13 2010, 03:11 PM
Post #1

UtterAccess VIP
Posts: 7,591
From: South coast, England



I have a report which is designed for producing a credit card style photo pass.

The report can be formatted in various differrent ways - different backgrounds / fonts / colours / control positions
etc which is carried out in the detail on format event.

The user can also select which printer the reports are printed on (if not the default printer) and set paper size, margins, and orientation.

For the different orientations (Portrait / Landscape) I need two different reports, however the controls in the
portrait style report are fixed, and hence do not need the Detail On Format event.

If I preview either report before printing they print fine; If I print the landscape format report directly (without previewing) it prints fine, however if I print the the portrait format directly it prints the current FORM!

Even if I make a direct copy of the working (landscape format) report and remove the 'Event Procedure' from the
properties, with NO other changes, then this prints the form (IMG:http://www.utteraccess.com/forum/style_emoticons/default/crazy.gif) .

I have resolved the problem by including the detail on format event in the portrait report and setting the control
postions to their current position.

But why does this happen, what is going on?

Am I missing something in the way I am creating / formatting / printing the reports which I ought to be aware of?

Thanks in anticipation (and bewilderment!)
Go to the top of the page
 
+
pere_de_chipstic...
post Feb 14 2010, 05:10 AM
Post #2

UtterAccess VIP
Posts: 7,591
From: South coast, England



Hi all

I have managed to resolve, (from another post on UA), I had missed a line in my code;
After the open report command, there should be a select object command, so
CODE
DoCmd.OpenReport strSelRpt, acViewPreview, , stLinkCriteria, acHidden, strArgs
[color="blue"]DoCmd.SelectObject acReport, strSelRpt  [/color]
Thanks to all who've taken the time to look over this for me. (IMG:http://www.utteraccess.com/forum/style_emoticons/default/uarulez2.gif)
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 25th May 2013 - 10:01 AM