Re: Displaying Long Binary Data in a Report
From: Stephen Lebans (ForEmailGotoMy.WebSite.-WWWdotlebansdotcom_at_linvalid.com)
Date: 04/25/04
- Next message: Bill: "frustrating - Count group as ONE"
- Previous message: Larry Linson: "Re: Group Sub-totals"
- In reply to: John Dougherty: "Displaying Long Binary Data in a Report"
- Next in thread: John Dougherty: "Re: Displaying Long Binary Data in a Report"
- Reply: John Dougherty: "Re: Displaying Long Binary Data in a Report"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 24 Apr 2004 23:22:23 -0300
John you are using two completely different methods to store data in
your Long Binary field.
1) Manually, in Acess you are inserting the BMP file as an OLE Object.
THe Long Binary field now contains OLE object data.
2) Programmatically inserting Byte data into a Long Binary field. The
Long Binary field does NOT contain OLE object data but simply your raw
binary data.
You should not mix the two data types. While you can programmatically
insert Images as OLE objects I would reccomend against it unless you
will only require a couple of Images.
If the raw Binary data is an exact copy of the original BMP file then
you have several options available to enable you to display the data in
a Report's standard Image control(not one of the OLE Frame controls!).
1)
In the Print event of the Detail section save the contents of the Binary
field to a temp disk file named say "1.BMP".
Set the Image control's Picture property to "1.BMP"
2) Rather than saving a Bitmap file, save a DIB(Device Independant
Bitmap) instead. Then you could easily, without having to save to a TEMP
disk file, load the DIB directly into the PictureData propery of the
Image control.
-- HTH Stephen Lebans http://www.lebans.com Access Code, Tips and Tricks Please respond only to the newsgroups so everyone can benefit. "John Dougherty" <anonymous@discussions.microsoft.com> wrote in message news:6D4B8845-9EA5-4254-A2F2-7356DE167F89@microsoft.com... > I have an Access 2000 database (TrainingClasses.MDB) containing a table (ClassHistory) with an OLE Object field (StudentSign). I have written a VB.NET application, which populates ClassHistory - the StudentSign field is being populated with students' signatures (captured from a PDA device). My application can read/write the signatures with no problems (they are originally captured as bitmap images, then my application stores them into the StudentSign field). When I am looking at the table via datasheet view, the StudentSign field shows "Long Binary Data". I have noticed that if I manually insert a .BMP file (through the Access Insert->Object pulldown menu), the field will display "Bitmap Image" rather than "Long Binary Data". > > I have created a simple report in Access to just display all the fields from ClassHistory. However, the StudentSign field displays nothing for those bitmap signatures which were added via my application. It displays the bitmap signature just fine for a record where I manually inserted the bitmap image through Access. > > Does this issue just boil down to an inherant problem between populating the data through my program (which is a process not as simple as just grabbing a .BMP file and sticking it into the field - I have to use an array into which the bitmap image is loaded, then store that into the field - fairly complicated process), and Access not being able to decipher the data that my app has loaded into the OLE Object field? As best I can tell, there is no way to programmatically insert a .BMP image into an Access OLE Object field, and Access still see this as a "Bitmap Image" (as it does when I manually insert a .BMP image through Access). > > Bottom line - am I going to have to just code a report viewer in my VB.NET application, rather than trying to use Access' report feature? > > - Thanks, > > JRD
- Next message: Bill: "frustrating - Count group as ONE"
- Previous message: Larry Linson: "Re: Group Sub-totals"
- In reply to: John Dougherty: "Displaying Long Binary Data in a Report"
- Next in thread: John Dougherty: "Re: Displaying Long Binary Data in a Report"
- Reply: John Dougherty: "Re: Displaying Long Binary Data in a Report"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|