How many pixels per page? .Top property

wrek

Registered User.
Local time
Today, 16:54
Joined
Jun 14, 2001
Messages
88
Hi guys,

I have a report that uses a position variable for its controls (they are user defined so I give them the option of which ones come out on the report).

I use the .top property to do this, but I was wondering if anyone knew how many pixels (unit of measure for .top and .left) make up a page.

This info is vital for me to set the page number in the footer (Page 1 of 3) etc.

It might vary with margins, but the default is???

thx.
 
Hi wrek

I am a bit confused by your posting. You have posted under the Reports forum yet want to find out the number of pixels. Reports are for printing out on paper so the unit of measurement should be centimetres or inches (or possibly points), but pixels don't seem to be relevant.

Pixels are the dots on the screen and this will depend on your resolution (640x480 means 640 pixels wide and 480 pixels high - 800x600 means ... and so on).

Also I don't understand why these values for top and left would impact on your Page 1 of 3 etc. Put that in the Page Footer and then this will be displayed/printed on your Report each time you print regardless of margins etc.

HTH

Rich Gorvin

[This message has been edited by Rich@ITTC (edited 07-23-2001).]
 
Pixels, semantically, I guess would be an incorrect unit of measure in reports. But Access uses the same measure for their forms and reports (in the VB module at least)

But the reason I can't use a generic Page N of M in the footer is because the 'maximum length' of my report is probably 4 pages.

This is if the user chooses to have every data field shown. The minimum length is 1. Therefore in design view I have to have the layout stretched to my max.

Using the generic Page N of M, will always give me my max length (M=4). This is why I need a variable to ascertain where the position counter is, so I can define how many pages are to be printed.
 
Hi wrek

I still don't understand why you can't use Pages along these lines as your control source for an unbound text box:

="Page " & [Page] & " of " & [Pages]

This will mean that if a report of two pages is printed it will say Page 1 of 2 (first page) and Page 2 of 2 (second page). If your report reaches its maximum of 4 then you will have Pages 1 of 4, 2 of 4, 3 of 4 and so on. With a single page it seems a bit pointless - Page 1 of 1 - but at least you know you have the full report in your hands.

HTH

Rich Gorvin
 
Might it not be easier to set the fields to null if not wanted instead of hiding? Just a thought.
 
Hi wrek

Hmmm, that's some report you've made there! I won't even begin to try and work out what kind of data you are trying to display.

I would still forget the pixels, and I would still go for the page N of M pages in the page footer but change the property setting for the subreport to CanGrow = Yes. To do this open the main report in Design view, select the subreport (with a single click) and view the properties. You can then change CanGrow (and for that matter CanShrink) to "Yes" and resize your subform to say 2cm high. Then your main report is not being forced to include a subreport of at least 16 cm (whether needed or not) which could lead to additional probably blank pages.

HTH

Rich Gorvin

[This message has been edited by Rich@ITTC (edited 07-23-2001).]
 
The subreport is of a constant size...so the cangrow and canshrink wont affect the total report size...setting the fields to null, now you might have something there.

Thanks.

(Btw, I'm a graduate working for a nuclear plant....all that gibberish you see is nuclear safety credit info...radiation calculations etc.)
 
Hi wrek

I can't take credit for the Null idea - that was Rich rather than Rich@ITTC.

However with a big long list of possible fields and their associated labels I wonder if you won't still get blank spaces.

So here are a couple of other ideas - select the report's background - Detail and set the property CanShrink for that section to Yes.

You can also set the actual fields to CanGrow and CanShrink to Yes (may not have much effect unless ...)

How about incorporating the label within the text field e.g.

Delete the labels - add the label caption to the text box as a concatenated string but within an IIf function to only show if there is data, so for the label and text box TGM/EQSRCL Current.TGM you would change the control source to:

=IIf(IsNull([EQSRCL Current.TGM]),"","TGM: "& [EQSRCL Current.TGM])

If the field is Null nothing is displayed (no label, nor field value) so Access can then shrink the text box down so it doesn't appear. If there is data in this field (as it was selected by your user) then the label and the data are displayed.

HTH

Rich Gorvin

[This message has been edited by Rich@ITTC (edited 07-23-2001).]
 

Users who are viewing this thread

Back
Top Bottom