Connecting Tech Pros Worldwide Help | Site Map

Print Output

 
LinkBack Thread Tools Search this Thread
  #1  
Old November 13th, 2005, 08:28 AM
Brian Keanie
Guest
 
Posts: n/a
Default Print Output

If controls on a report have the CanShrink and CanGrow properties set to
"Yes" how then can you format your print output? other than leaving it to
the smarts of access
Don't want to show my age or lack of expertise but I'm thinking back to
Basic Basic when you had to know how many lines were going to be printed on
a page etc. Surely there must be the same requirement in access on occasion.
Could someone direct me to a site or correspondence to explain this?
In case you didn't recognize the relationship this has to do with my OLE
quandry.



  #2  
Old November 13th, 2005, 08:30 AM
bruce@aristotle.net
Guest
 
Posts: n/a
Default Re: Print Output

"How can you format your print output" is a pretty broad question.
However, looking at the threads regarding your OLE quandary, I think
the answer to your question lies in your report's Detail Format event
as Stephen Lebans mentioned. Try adding the following code to your
report:

In the General Declarations section add the following
declarations:

Dim mlngDetailDefaultHeight As Long
Dim mlngOLEDefaultHeight As Long

Then modify your Report_Open and Detail_Format event code as follows:

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)

If IsNull(OLEBound1) Then
OLEBound1.Height = 0
OLEBound1.Visible = False
Me.Detail.Height = 0
Else
OLEBound1.Visible = True
OLEBound1.Height = mlngOLEDefaultHeight
Me.Detail.Height = mlngDetailDefaultHeight
End If

End Sub

Private Sub Report_Open(Cancel As Integer)

' Save the default height of the OLE control and the
' detail section it is in.
mlngOLEDefaultHeight = OLEBound1.Height
mlngDetailDefaultHeight = Me.Detail.Height

End Sub

HTH,
Bruce

  #3  
Old November 13th, 2005, 08:30 AM
bruce@aristotle.net
Guest
 
Posts: n/a
Default Re: Print Output


bruce@aristotle.net wrote:[color=blue]
> "How can you format your print output" is a pretty broad question.
> However, looking at the threads regarding your OLE quandary, I think
> the answer to your question lies in your report's Detail Format event
> as Stephen Lebans mentioned. Try adding the following code to your
> report:
>
> In the General Declarations section add the following
> declarations:
>
> Dim mlngDetailDefaultHeight As Long
> Dim mlngOLEDefaultHeight As Long
>
> Then modify your Report_Open and Detail_Format event code as follows:
>
> Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
>
> If IsNull(OLEBound1) Then
> OLEBound1.Height = 0
> OLEBound1.Visible = False
> Me.Detail.Height = 0
> Else
> OLEBound1.Visible = True
> OLEBound1.Height = mlngOLEDefaultHeight
> Me.Detail.Height = mlngDetailDefaultHeight
> End If
>
> End Sub
>
> Private Sub Report_Open(Cancel As Integer)
>
> ' Save the default height of the OLE control and the
> ' detail section it is in.
> mlngOLEDefaultHeight = OLEBound1.Height
> mlngDetailDefaultHeight = Me.Detail.Height
>
> End Sub[/color]

I forgot to mention that this assumes your OLE control is named
'OLEBound1'. If it's named differently, replace appropriately. Also,
you can probably get away with declaring your height storage variables
as integer rather than long, e.g.

Dim mintDetailDefaultHeight As Integer
Dim mintOLEDefaultHeight As Integer

HTH,
Bruce

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,840 network members.