|
-
Jul 26th, 2005, 10:26 AM
#1
Thread Starter
New Member
images from database in vb reports
i'm working on vb6 with a medical application.
at the end of the program i need to display the results
of the analysis.
every value has an associated picture to inform the user
about the value's related anatomy.
the final report will looks like
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
IMAGE......................|...Value.....|..normal value...|..inference..|
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-----------------------------------------------------------------------
Header 1 (eg: nose width)
-----------------------------------------------------------------------
___________
image1...................|...22.4mm ..|...20-24mm ......|...looks normal
___________
-----------------------------------------------------------------------
Header 2 (eg: nose length)
-----------------------------------------------------------------------
__________
image2..................|...24mm .....|...30-34mm ........|..looks short
___________
----------------------------------------------------------------------
:::::::::::::::
:::::::::::::::
:::::::::::::::
:::::::::::::::
the images' path will be stored in the database against each record's
identifier (usually that which comes in the header)
i would like to use the inbuilt datareports.
can some one please enlighten me on this and help me? please !
thank you
-
Jul 26th, 2005, 11:10 AM
#2
Lively Member
Re: images from database in vb reports
are you using crystal report with vb
if yes them you need to embeded report by using crystal report designer with vb
then add picturebox to the detailes section on the format sections use
picturebox.loadpicture (your picture path)
-
Jul 26th, 2005, 12:13 PM
#3
Thread Starter
New Member
Re: images from database in vb reports
can't it be done with the datareport tool of vb?
i don't have the crystal reports installed.
thanks a lot
-
Jul 26th, 2005, 01:53 PM
#4
Fanatic Member
Re: images from database in vb reports
I would suggest that you not store image in a database, unless you have good reason for doing so. It is alot easyer, painless, and faster, to just store the images on the filesystem and load them when needed. You can just store the filename and or location of the image in the db, and reference it.
-
Jul 28th, 2005, 05:01 AM
#5
Junior Member
Re: images from database in vb reports
Try saving just the filename of the picture to the database. If you are using a data report, insert the following codes before you call the report.
VB Code:
'check if the filename of the picture exists
If dir(rs.Fields("PicFileName")) <> "" Then
'sets the report picture box
Set dtrPicture.Sections("Sect1").Controls("img1").Picture = LoadPicture(rs.Fields("PicFileName"))
Else
'clears the report picture box
Set dtrPicture.Sections("Sect1").Controls("img1").Picture = Nothing
End If
dtrPicture.Refresh
dtrPicture.Show
-
Jul 29th, 2005, 01:18 PM
#6
Thread Starter
New Member
Re: images from database in vb reports
i tried this code but it says the object does not support this property
or method !!!
and i have one more doubt in this method..
will this dynamically add the different images for each record
if i store all the filepaths of the images in the database?
thanks a lot for the help
-
Jul 29th, 2005, 01:32 PM
#7
Frenzied Member
Re: images from database in vb reports
i would sugesst that you shoudn't store the images in the database since its a lot easyer and time consuming and space consuming too. just stor them in sysfolder and use them by uploading them as needed
-
Jul 29th, 2005, 02:02 PM
#8
Hyperactive Member
Re: images from database in vb reports
i think saving the pic in database is necessary for drpavan for the picture corresponds to data itself
-
Jul 31st, 2005, 07:34 PM
#9
Junior Member
Re: images from database in vb reports
 Originally Posted by drpavan
i tried this code but it says the object does not support this property
or method !!!
and i have one more doubt in this method..
will this dynamically add the different images for each record
if i store all the filepaths of the images in the database?
thanks a lot for the help
Object does not support this property - You're getting the wrong index/name of the section/control. Check the index/ name of the section/rptimage control and it will surely work.
Unfortunately you need to insert that code inside a loop to be able to show the image for each record. In my case, I needed 7 pictures in one page. So I added 7 indexes of that image control. I just don't know if there's an easier way but this solved my problem.
-
Jul 31st, 2005, 07:40 PM
#10
Re: images from database in vb reports
You might be able to create a mailmerge type app if you have Word available, or as I've said before, create your own reports using the RichTextBox control.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|