Baanboard.com

Go Back   Baanboard.com > Forum > Baan Quick Support: Functional & Technical > Tools Development

User login

Frontpage Sponsor

Main

Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
35%
Installation Wizard into new VRC
42%
Manual into existing VRC
3%
Manual into new VRC
19%
Total votes: 31

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 15th July 2002, 12:08
jaishni jaishni is offline
Junior Member
 
Join Date: Jul 2002
Location: india
Posts: 6
jaishni is on a distinguished road
Question Photo display on form

hi,

I am facing an important with useful problem as I want to display a picture on a form.

for example, we have pay-roll package in baan where I want to display the photo of each employee on form according to their employee code & name.

How could I achieve my goal

Again I tell that I want to display picture on form.

I will be thankful, if anyone provide me solution.

Regards
Reply With Quote
  #2  
Old 15th July 2002, 12:47
Sakhnini's Avatar
Sakhnini Sakhnini is offline
Junior Member
 
Join Date: Jun 2002
Posts: 15
Sakhnini is on a distinguished road
foto in Baan

Baan Hot link makes this possible.

check the attached GIF

http://www.nazdaq.co.il/demo/bhl15p4a.GIF
Reply With Quote
  #3  
Old 15th July 2002, 14:35
jaishni jaishni is offline
Junior Member
 
Join Date: Jul 2002
Location: india
Posts: 6
jaishni is on a distinguished road
photo display

this is not what i want ,

i want to display photo of employee as well as his details on form in baan how could i do that
Reply With Quote
  #4  
Old 15th July 2002, 19:40
NPRao's Avatar
NPRao NPRao is offline
Guru
 
Join Date: Aug 2001
Location: Pacific NW, USA
Posts: 3,028
NPRao will become famous soon enough
Baan: iBaanERP-5.2a(Reger),SSA-ERP-LN-6.1,Infor LN-10.x - DB: Oracle-10g,11g,12c,MS-SQL - OS: HP-UX, Linux, Windows
Hi Jai,

Please refer to the link in this forum-

http://www.baanboard.com/baanboard/s...&threadid=5554
__________________
The art of perfection does not lie in doing extraordinary things but, doing ordinary things extraordinarily well. [-N. Prashanth Rao]
How To Ask Questions The Smart Way,BaaNBoard,NPRao
Reply With Quote
Sponsored Links
  #5  
Old 15th July 2002, 21:41
~Vamsi's Avatar
~Vamsi ~Vamsi is offline
Guru
 
Join Date: Aug 2001
Location: San Diego CA, USA
Posts: 590
~Vamsi will become famous soon enough
Baan: ~*~ - DB: ~*~ - OS: ~*~
From old archives of Baanfans.

This question was asked and answered on Baanfans a few years ago. I am posting all the threads I believe are related to this subject. Please post a final code release to Code & Utilities if this results in useable code. Grzegorz's website link is unreachable. Perhaps he can share his code with us.

~Vamsi

Ivan Simeonov posted Message on May 19, 1999 at 05:30:09 EST

The following code is just an idea, to show employee picture in Maintain Emploees Session.

Code:
	long	pixid, w, h, z			|#BG002
	long 	toplevel


	#include 	"itgbrgeditor"
	#include	"itgbrg0001" 	
....
	
form.1:
after.form:
	if toplevel then
		destroy.object (toplevel)
		toplevel = 0
	endif
	
before.form:
	string 	picture.name(250)
	
	picture.name = tccom001.photo
	if not (strip$(picture.name) = "") then
		toplevel = create.object( DsCgwindow, current.mwindow(),
				DsNwidth, 	160, 	
				DsNheight, 	160,
				DsNx,		550,
				DsNy,		60 )
			
		pixid = load.pixmap.file(bse.dir$() & "/photos/" & picture.name, w, h)
		if pixid then
			create.sub.object(toplevel, DsCgpImage,
					DsNx,		5,
					DsNy,		5,
					DsNwidth,	w,
					DsNheight,	h,
					DsNpixmap,	pixid )
		endif
		update.object( toplevel )
	endif


Vineet Sawant posted Message on June 12, 1999 at 01:04:42 EST


Hi everyone,
Ever wanted to see Logo on your BaaN screens?? Do all this and more with the steps given below. The code for this is
there in BaaN Tools itself!! Read the section on Create.Object (3 GL function), the example given at the end can be copied almost as it is , with a few changes. Works for NT as well as UNIX.

PUT THIS CODE INTO INIT.FORM for ANY SESSION. THE GIF WILL BE DISPLAYED ON THE XPOS,YPOS THAT YOU SPECIFY.You must have source code (program script) for that session.
Code:
    long     cmap(256)
    long     cmap_sz
    string   imap(1)   based

    long     icon_w
    long     icon_h
    long     valid.icon

    long gwin
    string file(128)
    string bufr(1)  based
    long buflen, fp
    long idc, idp, image
  
    gwin = create.object(DsCgwindow,current.mwindow(),
    DsNbackground,    <Long Color>,
    DsNx,             <Long Xpos>,
    DsNy,             <Long ypos>,
    DsNwidth,         <Long WIDTH OF YOUR GIF file>,
    DsNheight,        <Long HEIGHT OF YOUR GIF file>,
    DsNpointerCursor, DSCHAND,
    DsNeventMask,     EVTALLEVENTMASK )

    file = "${BSE}/gif/desktop.gif/<yourgif>"|YOUR GIF file here
    fp = seq.open(file, "r")

    buflen = seq.seek(0, 2, fp)
    alloc.mem(bufr, buflen)
    seq.rewind(fp)
    seq.read(bufr, buflen, fp)
    seq.close(fp)

    if get.pixmap.info(bufr, cmap_sz, icon_w, icon_h) then
    alloc.mem(imap, icon_w * icon_h)
    valid.icon = decompress.pixmap(bufr, cmap, imap)
    cmap(1) = rgb(128,128,128)
    endif

    free.mem(bufr)
    update.object(gwin)
    idc = create.object(DsCcolormap,current.display(),DsNcolorTable,cmap,cmap_sz)

    idp = create.object(DsCpixmap,current.display(),
    DsNcolormap,      idc,
    DsNwidth,         icon_w,
    DsNheight,        icon_h,
    DsNdata,          imap, icon_w * icon_h,
    DsNdataType,      DSPIXMAP8 )

    image = create.sub.object(gwin,       DsCgpImage,
    DsNpixmap,        idp,
    DsNx,             0,
    DsNy,             0 )
POINTS TO REMEMBER:
Copy your GIF file to any of the subdirectories under $BSE/GIF..such as desktop.gif, etc. Remember thses are directories, not GIF files. Then, RENAME your .GIF file such that it does not have the .GIF extension..ie rename VIN.GIF to VIN, even for NT.

Its surprising , you can do things in BaaN you never thought possible, and the code is there , hidden away in BaaN Tools Help.
If any of you have any such stuff to share , please share it with all of us BaaN developers. It makes our normal mundane BaaN lives much more interesting!

Grzegorz posted Message on January 05, 2001 at 15:56:47 EST

: Hello pretty baanfans, i'm triyng to put an icon .gif in a normal session of BaaN. I know i have to use "create.object" functions, but the help is very confuse... Anybody has an example?
: Thanks. Kisses.

Please see at http://www.dst.com.pl/oferta/of_baan_szp_kadry.htm
Look at second screenshot (employee data with picture).If this is what you want to get, pls email me.

Regards
Grzegorz.

Ulrich Fuchs posted Message on January 08, 2001 at 06:09:15 EST

: Hello pretty baanfans, i'm triyng to put an icon .gif in a normal session of BaaN. I know i have to use "create.object" functions, but the help is very confuse... Anybody has an example?
: Thanks. Kisses.


Following is something that I tried out after a posting of someone within that forum:
Code:
form.1:
 init.form:
 
 
    long     cmap(256)
    long     cmap_sz
    string   imap(1)   based

    long     icon_w
    long     icon_h
    long     valid.icon

    long gwin
    string file(128)
    string bufr(1)  based
    long buflen, fp
    long idc, idp, image
  
    gwin = create.object(DsCgwindow,current.mwindow(),
    DsNbackground,    0,
    DsNx,             30,    | YOUR GIFs POSITION HERE
    DsNy,             100,
    DsNwidth,         110,   | YOUR GIFs WIDTH & HEIGHT HERE
    DsNheight,        120,
    DsNpointerCursor, DSCHAND,
    DsNeventMask,     EVTALLEVENTMASK )

    file = "${BSE}/gif/Auroflex/deskt01/delete01"|YOUR GIF file here - NAME IT WITHOUT THE .gif EXTENSION!
    fp = seq.open(file, "r")

    buflen = seq.seek(0, 2, fp)
    alloc.mem(bufr, buflen)
    seq.rewind(fp)
    seq.read(bufr, buflen, fp)
    seq.close(fp)

    if get.pixmap.info(bufr, cmap_sz, icon_w, icon_h) then
    	alloc.mem(imap, icon_w * icon_h)
    	valid.icon = decompress.pixmap(bufr, cmap, imap)
    	cmap(1) = rgb(128,128,128)
    endif

    free.mem(bufr)
    update.object(gwin)
    idc = create.object(DsCcolormap,current.display(),DsNcolorTable,cmap,cmap_sz)

    idp = create.object(DsCpixmap,current.display(),
    DsNcolormap,      idc,
    DsNwidth,         icon_w,
    DsNheight,        icon_h,
    DsNdata,          imap, icon_w * icon_h,
    DsNdataType,      DSPIXMAP8 )

    image = create.sub.object(gwin,       DsCgpImage,
    DsNpixmap,        idp,
    DsNx,             0,
    DsNy,             0 )
Reply With Quote
  #6  
Old 15th July 2002, 23:06
NPRao's Avatar
NPRao NPRao is offline
Guru
 
Join Date: Aug 2001
Location: Pacific NW, USA
Posts: 3,028
NPRao will become famous soon enough
Baan: iBaanERP-5.2a(Reger),SSA-ERP-LN-6.1,Infor LN-10.x - DB: Oracle-10g,11g,12c,MS-SQL - OS: HP-UX, Linux, Windows
Hi Vamsi,

Thats was great posting...!!!

I tested the solution, the 2nd code worked fine...

However, I am getting compilation error for the 1st coding you posted -

Quote:
pzmadmtest0( 140): Error: Unresolved reference to function 'load.pixmap.file'.
Any clues ??

I was thinking in the line of making a gif editor, something which we had on the TCS in BaaN.

Thanks!
Attached Images
File Type: jpg display.pix.jpg (13.5 KB, 1108 views)
__________________
The art of perfection does not lie in doing extraordinary things but, doing ordinary things extraordinarily well. [-N. Prashanth Rao]
How To Ask Questions The Smart Way,BaaNBoard,NPRao
Reply With Quote
  #7  
Old 15th July 2002, 23:32
~Vamsi's Avatar
~Vamsi ~Vamsi is offline
Guru
 
Join Date: Aug 2001
Location: San Diego CA, USA
Posts: 590
~Vamsi will become famous soon enough
Baan: ~*~ - DB: ~*~ - OS: ~*~
Prashanth,

I usually have no problem accepting laurels. But in this case I must decline . The original posting was from IIS (Ivan). Then Vineet posted a different piece and finally Ulrich posted some more code. I have reposted some of the code earlier too and each of those gentlemen may have used each others ideas.

Why does the code not work? I have no clue . This code does not have much interest for me at this moment.

Grzegorz had a similar piece of code working which he showcased on his website. He was willing to share his code with the lady who offered kisses all around .

Now that folks have a starting point for this code, will someone make it easy to link pictures to records. For example product pictures on Items session and employee pictures on Employees session.
__________________
~Vamsi
Vamsi Potluru
Baan XL Yet another tool to format Baan output in Excel from Baan Board
This one just happens to be free :)

Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
  #8  
Old 16th July 2002, 09:26
jaishni jaishni is offline
Junior Member
 
Join Date: Jul 2002
Location: india
Posts: 6
jaishni is on a distinguished road
Question photo display

thanks everybody for replying me

but that is not actually what i want


suppose if i have 100 employees and i want to display 100 photes of employees with their details according to ur code i will have to saperately write the code for each employee

i want to change the photo of emp. as soon as the details changes for different emp.

like when i click on next record of next employee the picture of next employee should display automatically

i will be very thankful if any one provide me solution.
Reply With Quote
  #9  
Old 16th July 2002, 09:54
NPRao's Avatar
NPRao NPRao is offline
Guru
 
Join Date: Aug 2001
Location: Pacific NW, USA
Posts: 3,028
NPRao will become famous soon enough
Baan: iBaanERP-5.2a(Reger),SSA-ERP-LN-6.1,Infor LN-10.x - DB: Oracle-10g,11g,12c,MS-SQL - OS: HP-UX, Linux, Windows
Jai,

You have to code as below to handle the current record of the table and get the picture info in your function to display -

Code:
for i=1 to filled.occ
	if mark.table(i) then
		do.occ(i, some_function)
	endif
endfor

© 1998 Baan Development B.V. All rights reserved
__________________
The art of perfection does not lie in doing extraordinary things but, doing ordinary things extraordinarily well. [-N. Prashanth Rao]
How To Ask Questions The Smart Way,BaaNBoard,NPRao
Reply With Quote
  #10  
Old 16th July 2002, 19:09
~Vamsi's Avatar
~Vamsi ~Vamsi is offline
Guru
 
Join Date: Aug 2001
Location: San Diego CA, USA
Posts: 590
~Vamsi will become famous soon enough
Baan: ~*~ - DB: ~*~ - OS: ~*~
Ok folks - time out!

Prashanth - if you were to display the picture it will have to be in the single-occ and not on the multi-occ session. So there is no need to do the stuff you outlined. Perhaps you are thinking of launching a picture from the specific menu. The ideal solution would be that the picture just appears just like any other field on the single-occ.

Jaishni, the base code is already provided. If you name the gif files same as the primary key of tccom001 you should be pretty close to the solution. If that does not make sense, please contact www.dst.com.pl or www.rmcis.com and they will probably be willing to provide you with a solution for a fee.
__________________
~Vamsi
Vamsi Potluru
Baan XL Yet another tool to format Baan output in Excel from Baan Board
This one just happens to be free :)

Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
  #11  
Old 24th July 2002, 09:27
jaishni jaishni is offline
Junior Member
 
Join Date: Jul 2002
Location: india
Posts: 6
jaishni is on a distinguished road
photo on form

thanks everybody,

I think that been enough by passing each and everybody thoughts ,

I have an idea and feel that it would be nice punch if we try that

like i create a program for photo display with employee's detail IN VISUAL BASIC and intigrate that program with baan

exp:

if i go through baan module i should be able to open it in BaaN Menu not in external resources.

if any one has idea upon this matter plz send me immediately

thanks
Reply With Quote
  #12  
Old 24th July 2002, 21:56
NPRao's Avatar
NPRao NPRao is offline
Guru
 
Join Date: Aug 2001
Location: Pacific NW, USA
Posts: 3,028
NPRao will become famous soon enough
Baan: iBaanERP-5.2a(Reger),SSA-ERP-LN-6.1,Infor LN-10.x - DB: Oracle-10g,11g,12c,MS-SQL - OS: HP-UX, Linux, Windows
Hi Jai,

I wouldnt extend any more functionality if its already available in standard BaaN.

Quote:
New functionality in BaanERP 5.2a
Difference Study iBaanERP 5.0c - 5.2a3-19

3.4 Dynamic Form Editor (DFE)

This section describes the DFE’s new functionality in BaanERP 5.2a.

3.4.1 Pictures on forms

In BaanERP 5.2a, you can use the DFE to insert a picture (gif format) on a session’s form. The picture you insert must be in the Icon Groups (ttdsk9100m000) session in the icon group form_<pp>, where pp is the package code of the session whose form you want to insert the picture on.

To insert a picture on a session’s form with the DFE:

1 Select Insert ►Picture, or click the picture icon on the toolbar. The picture properties dialog box appears:
Figure 3-19 The DFE’s Picture properties dialog box.

2 Click the zoom button on the Icon field. The ttgbf0005m000 window appears with the icons available to you. Select your icon.

3 You can select the:
−−−−Details Session check box for the picture to appear on the details session’s form.
−−−−Overview Session check box for the picture to appear on the overview session’s form.
−−−−Child Field(s) Behind check box to place the picture’s child field(s) (if any) immediately behind the picture.

4 If you want a label for your picture, enter the required details in the fields of the Label box.

5 Click OK.

You can use the programming function long.change.picture()to
change the picture on a form at runtime. The picture you use to replace the existing picture must also belong to the icon group form_<pp> in the Icon Groups (ttdsk9100m000) session.
I guess Vamsi has give good ideas and *timed out* this discussion.
__________________
The art of perfection does not lie in doing extraordinary things but, doing ordinary things extraordinarily well. [-N. Prashanth Rao]
How To Ask Questions The Smart Way,BaaNBoard,NPRao
Reply With Quote
  #13  
Old 25th July 2002, 13:20
Caner.B's Avatar
Caner.B Caner.B is offline
Senior Member
 
Join Date: Aug 2001
Location: Turkey
Posts: 107
Caner.B is on a distinguished road
Baan: B-IV c3 Mcr0 - DB: Informix ,Oracle 9.2 - OS: Hp-Ux, AIX 5.2
Hi ,
is it also possible to display jpg. and dwg files on the from .

and are there any zoom or print properties availble.

thanks

Caner
Reply With Quote
  #14  
Old 22nd August 2002, 14:07
sweetie's Avatar
sweetie sweetie is offline
Junior Member
 
Join Date: Nov 2001
Posts: 20
sweetie is on a distinguished road
problems when displaying gif-files

Vamsis code is working.
But when changing the gif with my proper gif file, the gif was displayed 3 or 4 times.
After a little research i discoverd that you have to save the gif files in the normal way not in the interleaced way.
In photoshop MS i did not found the option, using acrobat photoshop it is asked when you save a file in the gif format.
Reply With Quote
  #15  
Old 23rd August 2002, 16:04
hsteenwi's Avatar
hsteenwi hsteenwi is offline
Member
 
Join Date: Jul 2002
Location: Kampen, The Netherlands
Posts: 79
hsteenwi is on a distinguished road
Baan: Triton3.1, BaanIVc (SP19), Baan 5c - DB: BISAM, Oracle 7/8/9, MaxDB, MSSQL - OS: HP-UX; SUN Solaris; Tru64; NT; MS Server 2000, 2003; AIX
Great stuff!

Vamsi,

In name of our programmers, I have to thank you for the coding you posted. I passed it on to them, and they've not been doing their job until this moment, being happy as children with all kinds of pictures on their forms.

In short: great stuff!


Henk.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Display form fields vincent Tools Development 5 21st June 2004 16:15
adding form to display session en@frrom Tools Development 2 29th October 2003 08:36
CUMULATING + FILTERING records in DISPLAY SESSION en@frrom Tools Development 21 25th August 2003 16:16
Selecting recs for display on form JRussell Tools Development 0 25th October 2002 15:36
Problems with Display form field pjohns Tools Development 3 16th October 2002 14:37


All times are GMT +2. The time now is 00:01.


©2001-2017 - Baanboard.com - Baanforums.com