Customize Report Columns

L

Leeza

I have a report with two columns. I have an image for each record. I want to
make the image switch sides of the column in the second column. How do I do
this?

Example

Column 1 Column 2
Image Price Price Image
Image Price Price Image
Image Price Price Image
 
F

fredg

I have a report with two columns. I have an image for each record. I want to
make the image switch sides of the column in the second column. How do I do
this?

Example

Column 1 Column 2
Image Price Price Image
Image Price Price Image
Image Price Price Image

Are you using Across Then Down to display the data in the column?

If so, then add an unbound text control to the detail section.
Set it's Control Source to:
=1
Set it's Running Sum property to:
Over All
Name this control MoveControl
You can make it not visible.

Let's assume the Image.Left property is now set to 0" and the
Price.Left is now set to 2.125".

Note: All measurements are in Twips (1440 Per inch).

Code the Detail Format event:

If Me.MoveControl Mod 2 = 1 Then
' It's in column 1
Me.MyImage.Left = 0
Me.Price.Left = 2.125 * 1440
Else
' It's in column 2
Me.MyImage.Left = 2.125 * 1440
Me.Price.Left = 0
End If

Adjust the left positions as needed.
 
L

Leeza

Thank you. I am using the down then across to display the data because I have
headers. I figured it out late last night ... I used a =

textbox(visible = no) in the details and then referenced the text box for the
left margin of my second column.
Example:

If TextBox1 = 6235 Then
Image.Left = 3840
Price.Left = 0
Else: Image.Left = 0
Price.Left = 1379
End If

this worked!​
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top