Inventory list with pictures

This forum is for eXpress++ general support.
Post Reply
Message
Author
bwolfsohn
Posts: 649
Joined: Thu Jan 28, 2010 7:07 am
Location: Alachua, Florida USA
Contact:

Inventory list with pictures

#1 Post by bwolfsohn »

Are any of you producing inventory columnar reports with pictures ???

We have hundreds of reports, but very few include pictures..

We work with pictures throughout the rest of the program. I'm sure it's simple, but my brain is set on stupid lately, so i thought i'd just ask around to see what pitfalls, suggestions y'all might have..

TIA
Brian
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises

User avatar
rdonnay
Site Admin
Posts: 4733
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Inventory list with pictures

#2 Post by rdonnay »

Brian -

Are you asking how to do this or just whether or not it is a good idea?

I have written a few apps that use photos in a browse column.

Performance is quite good.

Roger
The eXpress train is coming - and it has more cars.

skiman
Posts: 1185
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: Inventory list with pictures

#3 Post by skiman »

Hi Brian,

I suppose you want to print pictures on reports?
Some results: http://www.aboservice.be/prijslijsten.php

Do you have specific questions? One of the things you have to do is calculating if a picture can be printed on a current page, or if you need to do an eject first.
Best regards,

Chris.
www.aboservice.be

User avatar
unixkd
Posts: 565
Joined: Thu Feb 11, 2010 1:39 pm

Re: Inventory list with pictures

#4 Post by unixkd »

Hi Roger

Can you please post a sample code of how to browse pictures stored in a blob field, that will be very helpful

bwolfsohn
Posts: 649
Joined: Thu Jan 28, 2010 7:07 am
Location: Alachua, Florida USA
Contact:

Re: Inventory list with pictures

#5 Post by bwolfsohn »

skiman wrote:Hi Brian,

I suppose you want to print pictures on reports?
Some results: http://www.aboservice.be/prijslijsten.php

Do you have specific questions? One of the things you have to do is calculating if a picture can be printed on a current page, or if you need to do an eject first.
Chris,

Nice reports...

No specific questions... we're already doing re-sizing/optimizing/creating thumbnails, etc...

Just wondering what issues people have hit... wondering about memory usage increase on the preview of large reports.. maintaining picture quality vs report size.
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises

skiman
Posts: 1185
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: Inventory list with pictures

#6 Post by skiman »

Hi,

On some reports we disable our preview functionality, this to prevent memory problems. If they are too large, speed is going dramatically down.
Best regards,

Chris.
www.aboservice.be

User avatar
rdonnay
Site Admin
Posts: 4733
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Inventory list with pictures

#7 Post by rdonnay »

Can you please post a sample code of how to browse pictures stored in a blob field, that will be very helpful
The below code uses the BMPDB.DBF and BMPDB.FPT files that are part of the Xbase++ distribution in \Alaska\Xppw32\Source\Samples\Data

Code: Select all

#INCLUDE "dcdialog.CH"

#Pragma Library("dclipx.lib")
#Pragma Library("dclip1.lib")

FUNCTION Main()

LOCAL GetList[0], GetOptions, oBrowse, oBitmap, aBrowPres, oStatic

DC_LoadRdds() // load all database engines

USE bmpdb VIA "FOXCDX"

oBitmap := XbpBitmap():new():create()

aBrowPres := ;
  { { XBP_PP_COL_HA_FGCLR, GRA_CLR_WHITE },            /* Header FG Color  */  ;
    { XBP_PP_COL_HA_BGCLR, GRA_CLR_DARKGRAY },         /* Header BG Color  */  ;
    { XBP_PP_COL_DA_ROWSEPARATOR, XBPCOL_SEP_DOTTED }, /* Row Sep          */  ;
    { XBP_PP_COL_DA_COLSEPARATOR, XBPCOL_SEP_DOTTED }, /* Col Sep          */  ;
    { XBP_PP_COL_DA_FGCLR, GRA_CLR_BLACK },            /* Row FG Color     */  ;
    { XBP_PP_COL_DA_BGCLR, GRA_CLR_WHITE },            /* Row BG Color     */  ;
    { XBP_PP_COL_DA_ROWHEIGHT, 100 },                   /* Row Height       */  ;
    { XBP_PP_COL_HA_HEIGHT, 20 },                      /* Header Height    */  ;
    { XBP_PP_HILITE_FGCLR, GRA_CLR_WHITE },            /* Hilite FG color  */  ;
    { XBP_PP_HILITE_BGCLR, GRA_CLR_BLUE },             /* Hilite BG color  */  ;
    { XBP_PP_COL_FA_FGCLR, GRA_CLR_WHITE },            /* Footer FG Color  */  ;
    { XBP_PP_COL_FA_BGCLR, GRA_CLR_DARKGRAY },         /* Footer BG Color  */  ;
    { XBP_PP_COL_FA_HEIGHT, 10 }                       /* Footer Height    */  ;
  }


@ 0,0 DCBROWSE oBrowse ALIAS 'BMPDB' SIZE 40,30 PRESENTATION aBrowPres ;
      ITEMMARKED {||oBitMap:setBuffer(BMPDB->BITMAP,XBPBMP_FORMAT_WIN3X), oStatic:setCaption(oBitmap)}

DCBROWSECOL FIELD BMPDB->name HEADER 'Name' WIDTH 10 PARENT oBrowse

DCBROWSECOL DATA {||oBitMap:setBuffer(BMPDB->BITMAP,XBPBMP_FORMAT_WIN3X), oBitmap} ;
    HEADER 'Image' WIDTH 20 PARENT oBrowse TYPE XBPCOL_TYPE_BITMAP

@ 0, 42 DCSTATIC TYPE XBPSTATIC_TYPE_BITMAP CAPTION oBitmap SIZE 60,30 OBJECT oStatic

DCREAD GUI FIT

oBitmap:destroy()

RETURN nil

* ---------

PROC appsys ; RETURN
The eXpress train is coming - and it has more cars.

Post Reply