473,768 Members | 7,424 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to show images linked to records on a report

Hey,

In my database i have images, linked to the database, corresponding to
different records. I am having trouble making them show in the report.
At the moment i can only get the one picture to show everytime.

There is a catch to the situation; the report is constructed in such a
way in that it doesn't have anything in the record source field.

I would greatly appreciate some help.

Thanks in advance,

Christina

Jun 15 '06 #1
3 4083
<ch*******@hotm ail.com> wrote
In my database i have images, linked
to the database, corresponding to
different records. I am having trouble
making them show in the report.
At the moment i can only get the
one picture to show everytime.

There is a catch to the situation; the
report is constructed in such a way
in that it doesn't have anything in the
record source field.
So where is it getting (1) the data to print and (2) the information to
print and move to the next record? I just can't imagine circumstances in
which it would be useful to have a Report with no RecordSource. If you can
explain how you move from record to record to print the data, then maybe I
can tell you where to put code to fill the Picture Property of the Control
with the image path-and-filename.
I would greatly appreciate some help.


The following really only is useful with bound Forms and Reports, because it
uses events that are fired by the Form or Report when it moves to a new
Record, or Prints a Record.

The sample imaging databases at http://accdevel.tripod.com illustrate three
approaches to handling images in Access, and the download includes an
article discussing considerations in choosing an approach. Two of the
approaches do not use OLE Objects and, thus, avoid the database bloat, and
some other problems, associated with images in OLE Objects.

If you are printing the images in reports, to avoid memory leakage, you
should also see MVP Stephen Lebans' http://www.lebans.com/printfailures.htm.
PrintFailure.zi p is an Access97 MDB containing a report that fails during
the Access formatting process prior to being spooled to the Printer Driver.
This MDB also contains code showing how to convert the contents of the Image
control to a Bitmap file prior to printing. This helps alleviate the "Out of
Memory" error that can popup when printing image intensive reports.

Larry Linson
Microsoft Access MVP
Jun 15 '06 #2
Hi Larry,

Thanks for the quick response.

Ok, i didn't actually make this database, a former employee contructed
it and now we need to included images with one of the reports. The
database and it's code is very messy and hard to understand which is
why I am having so much trouble with it.

The record source on the report is empty but underneath in the 'filter'
field it has the following:

([FixturePhase] Is Null) or ([FixturePhase]= "")

I'm not sure how that relates or if that is relevant. The report does
have an 'On open' event which contains the following code:

Private Sub Report_Open(Can cel As Integer)
Dim dbs As Database
Dim strSQL
Dim rst As Recordset
Dim ProjectNameVar

Me.RecordSource = ReportFixtureSp ecControlSource

strSQL = "SELECT First([Project details].[Project name]) AS [Project
name] " _
& "FROM [Project details];"

Set dbs = CurrentDb
Set rst = dbs.OpenRecords et(strSQL)

With rst
..MoveFirst
ProjectNameVar = ![Project name]
End With
Me.ProjectNameC trl.Caption = ProjectNameVar

Dim DocNumHold
Dim SQLstrgDoc
Dim rstDoc
Dim LatestRevisionN um
Dim rstRevNum As Recordset, strsqRevNum As String

SQLstrgDoc = "SELECT [Drawing details].[Document Reference], [Drawing
details].Title From [Drawing details] WHERE ((([Drawing
details].Title)=" & """" & "Fixture Specification" & """" & "));"
Set rstDoc = dbs.OpenRecords et(SQLstrgDoc)

If Not rstDoc.RecordCo unt = 0 Then

With rstDoc
.MoveFirst
DocNumHold = ![Document Reference]
End With

strsqRevNum = "SELECT DISTINCTROW Max(DocRevLink. RevisionNum) AS
MaxOfRevisionNu m FROM RevisionNumberM ap INNER JOIN DocRevLink ON
RevisionNumberM ap.RevisionNum = DocRevLink.Revi sionNum GROUP BY
DocRevLink.[Document Reference] HAVING (((DocRevLink.[Document
Reference])=" & "'" & DocNumHold & "'" & "));" ' Open dynaset-type
Recordset object.
Set rstRevNum = dbs.OpenRecords et(strsqRevNum)

With rstRevNum
If .RecordCount > 0 Then

.MoveFirst
LatestRevisionN um = !MaxOfRevisionN um
Else
LatestRevisionN um = 0
End If
End With
rstRevNum.Close
Dim strsqRevLetter
Dim rstRevLetter
Dim LatestRevisionL etter

strsqRevLetter = "SELECT RevisionNumberM ap.RevSign From
RevisionNumberM ap WHERE (((RevisionNumb erMap.RevisionN um)=" &
LatestRevisionN um & "));"
Set rstRevLetter = dbs.OpenRecords et(strsqRevLett er)
With rstRevLetter
If .RecordCount > 0 Then

.MoveFirst
LatestRevisionL etter = !RevSign
Else
LatestRevisionL etter = "/"
End If

End With
rstRevLetter.Cl ose
Me.RevLetterCtr l.Caption = LatestRevisionL etter

If LatestRevisionN um = 0 Then
Me.RevLetterCtr l.Visible = 0
Me.RevisionLabe l.Visible = 0
Else
Me.RevLetterCtr l.Visible = 1

Me.RevisionLabe l.Visible = 1

End If
Set dbs = Nothing
DoCmd.Maximize
Else
MsgBox "You need to have a specification document called 'Fixture
Specification' or the revision letter feature of the report will not
function. Ensure correct spelling!"
End If

End Sub

I hope that code helps because I am having great trouble understanding
it.

Thank you again for your help.

Cheers,

Christina

Jun 15 '06 #3
Hey Larry,

I just took another look at the code and found the line below:
Me.RecordSource = ReportFixtureSp ecControlSource


I have found the same line in a module although it only says:

Public ReportFixtureSp ecControlSource

Hope that sheds some more light on the situation.

Christina

Jun 15 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
13454
by: Sam | last post by:
Hello everyone, I have a table, which contains a picture column, I put URL info into it. "www.myweb.com/1.jpg..." I want to show this picture in my crystal report, I find some samples show the "static" picture in Crystal report, No "Dynamic" one. Can Crystal Report do that? Thanks in advance. Sam
0
1276
by: Tiago Miguel Silva | last post by:
I there. I´m almost desperate with a report that i´m doing! I am creating a report using the push method, being the data returned by a typed dataset. The report shows activities by week and have a subreport with the exactly same records, but with more information. It looks something like this: Sat 1 _______________ Sun 2 _______________
1
2444
by: Starwood | last post by:
After getting around a problem with the Norton utilities, I have finally been able to get .jpg images linked to my table. When I try to display the images using a form, the form presents icons which, when selected, will then display the image. Is it possible to get the actual images (they are small thumbnails) to appear on the form without having to deal with this icon? George
1
1470
by: news | last post by:
I have an Access database of two tables. One table is a vehicle inventory table and the other is a vehicle maintenance table. There is one field common between both tables and these fields are linked. This field is the vehicle number. When I query the tables, I get the all the records that fit the parameters of the query. Up to here, everything works fine. My problem is I wish to create a report based on a query that will return a...
15
7260
by: brettclare | last post by:
I have linked a large SQL Server table to Access, however 'only' 2,195,439 records are shown and are available to query. Can I increase the size (cache??)/number of records showing in Access? Thank you.
4
4232
by: bridgemanusa | last post by:
Hi All: I have a very long page of html that I want to take portions and hide them in divs, then show when a link is clicked. I have the hide show part working when the link is clicked, however I would really like to use linked images instead to do the following: - When open.gif is clicked, the contents of the div show and open.gif is swapped with close.gif - subsequently, when close.gif is clicked, the div contents get hidden
7
2600
by: chrisse_2 | last post by:
Hey, I currently have images in records linked to my database which print out on a report. Each of the images is a different size. What i would like to be able to do is have the image control grow and shrink depending on the size image, so more records can fit in the page. Is there any way to do this? Thanks for your help.
0
1470
by: crazytegger | last post by:
Hi, I have an access report that has 2 different images on it. One is embedded, and one is a linked image. The report prints to a local printer just fine. When I try to fax the report (using WinFax) it comes through all right but the 2 images are not on the fax. I tried importing both images into a word doc and faxing them and that worked just fine. Is there something im missing?? some property that needs to be set in order to transmit these...
1
2231
by: urange | last post by:
Hi to all, I am setting up a database which has to store a great number of images. I will therefore store the images not as OLE but as a text link to the file (maybe I'll try the BLOB-solution). While it is no problem to show the image in a form with the .picture property, I am trying to find a way to show the image on a report. So far, I can only do this by the following code sequence: stDocName = "Test_Report"
0
9576
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
9961
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9843
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8840
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7384
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6656
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5425
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3932
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2808
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.