Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Struggling with layout using DBPix (ActiveX Control) in a report

Status
Not open for further replies.

ErinHM

Programmer
Apr 9, 2008
1
I'm trying to put together a report that contains 3 images using DBPix (fields are named dbPixMemoriesPhoto1, dbPixMemoriesPhoto2, and dbPixMemoriesPhoto3).
The report displays a series of records. Some of these records have an image in each of the 3 DBPix fields, some have an image in just one of them, some have no images, etc. The problem with this is that there appears to be no Can Grow/Can Shrink on the DBPix control. This means that while I can get the layout to work when there are three images, I have to have large gaps in the report when an image is missing. I want there to be no gaps.
I've tried shrinking the DBPix control way down, leaving very small gaps between them, and writing code to make it bigger when there's an image present. This code does cause the DBPix control to grow to the size I specify in the code, and it takes care of the gap problem, but when there is more than one image in the record, the images overlap in the report - as they grow they don't 'push down' the next image.
Here's the coding I currently have:

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

If dbPixMemoriesPhoto1.ImageBytes > 0 Then
dbPixMemoriesPhoto1.height = 1525
Else
dbPixMemoriesPhoto1.height = 0
End If

If dbPixMemoriesPhoto2.ImageBytes > 0 Then
dbPixMemoriesPhoto2.height = 2830
Else
dbPixMemoriesPhoto2.height = 0
End If

If dbPixMemoriesPhoto3.ImageBytes > 0 Then
dbPixMemoriesPhoto3.height = 5035
Else
dbPixMemoriesPhoto3.height = 0
End If


Has anyone worked with DBPix in a report trying to get the layout to work properly? Anyone have any suggestions? Going out of my mind here.

Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top