Skip to main content
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:17 AM UTC

Uniface Development: [SOLVED] fill ocx container by pdf source

[SOLVED] fill ocx container by pdf source

Author: dylan.huart@gmail.com (Dylan)

Hello Wink , I wanted to know how to fill an "OCX​​" by a data source (pdf) stored for example on the c :/ temp I have a FRM which, thanks to a button provides access to the OCX container Thank you for your help

31 replies

Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:17 AM UTC

[SOLVED] fill ocx container by pdf source

Author: dylan.huart@gmail.com (Dylan)

Hello Wink , I wanted to know how to fill an "OCX​​" by a data source (pdf) stored for example on the c :/ temp I have a FRM which, thanks to a button provides access to the OCX container Thank you for your help

Some information is helpful. Thank for sharing. informdecisions


Author: johnland (johnland8193@gmail.com)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:17 AM UTC

[SOLVED] fill ocx container by pdf source

Author: dylan.huart@gmail.com (Dylan)

Hello Wink , I wanted to know how to fill an "OCX​​" by a data source (pdf) stored for example on the c :/ temp I have a FRM which, thanks to a button provides access to the OCX container Thank you for your help

Last question how remove this second slide bar ? :@ (it's on entity)


Author: Dylan (dylan.huart@gmail.com)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:17 AM UTC

[SOLVED] fill ocx container by pdf source

Author: dylan.huart@gmail.com (Dylan)

Hello Wink , I wanted to know how to fill an "OCX​​" by a data source (pdf) stored for example on the c :/ temp I have a FRM which, thanks to a button provides access to the OCX container Thank you for your help

I come back on the subject for ask you if you know how to load another pdf format in the ocx? e.g. :  .tif,.jpg,.png... Thanks Wink


Author: Dylan (dylan.huart@gmail.com)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:17 AM UTC

[SOLVED] fill ocx container by pdf source

Author: dylan.huart@gmail.com (Dylan)

Hello Wink , I wanted to know how to fill an "OCX​​" by a data source (pdf) stored for example on the c :/ temp I have a FRM which, thanks to a button provides access to the OCX container Thank you for your help

you can use $rscan to find the position of the rightmost ".". Use the index returned to separate the extension. If you code the case statements using (syntax) strings in single quotes, you do not need the $lowercase.   selectcase (v_extension) case 'pdf' ...


Author: ulrich-merkel (ulrichmerkel@web.de)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:17 AM UTC

[SOLVED] fill ocx container by pdf source

Author: dylan.huart@gmail.com (Dylan)

Hello Wink , I wanted to know how to fill an "OCX​​" by a data source (pdf) stored for example on the c :/ temp I have a FRM which, thanks to a button provides access to the OCX container Thank you for your help

thank you for this complete response, it helps me a lot, and brings new knowledge on uniface


Author: Dylan (dylan.huart@gmail.com)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:17 AM UTC

[SOLVED] fill ocx container by pdf source

Author: dylan.huart@gmail.com (Dylan)

Hello Wink , I wanted to know how to fill an "OCX​​" by a data source (pdf) stored for example on the c :/ temp I have a FRM which, thanks to a button provides access to the OCX container Thank you for your help

Method 1 if($lowercase(field[$length(field)-4:4]) = ".pdf") ; Get last 4 characters, compare (limits to 3 char extension) Method 2 (+; = <GOLD>;) if($lowercase($itemnr(-1,$replace(field,1,".","+;",-1))) = "pdf") ; Get string following last . compare. (Allows for many char extension) The first one is simpler, but the second allows for expansion to a case statement testing for different extensions...  selectcase $lowercase($itemnr(-1,$replace(field,1,".","+;",-1)))  case "pdf" ..... case "htm" .... case "html" ..... elsecase .... endselectcase


Author: Iain Sharp (i.sharp@pcisystems.co.uk)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:17 AM UTC

&#091;SOLVED&#093; fill ocx container by pdf source

Author: dylan.huart@gmail.com (Dylan)

Hello Wink , I wanted to know how to fill an "OCX​​" by a data source (pdf) stored for example on the c :/ temp I have a FRM which, thanks to a button provides access to the OCX container Thank you for your help

for know how the loaded file ends in ".pdf"  what the best method for you ?


Author: Dylan (dylan.huart@gmail.com)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:17 AM UTC

&#091;SOLVED&#093; fill ocx container by pdf source

Author: dylan.huart@gmail.com (Dylan)

Hello Wink , I wanted to know how to fill an "OCX​​" by a data source (pdf) stored for example on the c :/ temp I have a FRM which, thanks to a button provides access to the OCX container Thank you for your help

Hello, Thank for your help Ulrich, For the extensions it's good but when I would show a pdf file after an image, nothing :s because "Edit/Display/idle statement only allowed in EXECUTE trigger" I use 2 buttons for navigate between the attachments and this button call an Entries in Local Proc modules showing the next attachments (if I would show the next attachments e.g.) I don't see how I can show otherwise   ideas ? :/


Author: Dylan (dylan.huart@gmail.com)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:17 AM UTC

&#091;SOLVED&#093; fill ocx container by pdf source

Author: dylan.huart@gmail.com (Dylan)

Hello Wink , I wanted to know how to fill an "OCX​​" by a data source (pdf) stored for example on the c :/ temp I have a FRM which, thanks to a button provides access to the OCX container Thank you for your help

The fields need to be shown or hidden within either your occurrence shifting code (from the buttons), or in the occurrence gets focus trigger of the entity.  There is no need for edit, or display.  Simply set the field_syntax of one field to "HID" and the other one to "" (or is it "DEF"?) to brting it back to view.  You may get results if you replace the code in your button which says edit with 'show'.


Author: Iain Sharp (i.sharp@pcisystems.co.uk)
Jan Cees Boogaard
Rocketeer
Nov 19, 2018 11:17 AM UTC

&#091;SOLVED&#093; fill ocx container by pdf source

Author: dylan.huart@gmail.com (Dylan)

Hello Wink , I wanted to know how to fill an "OCX​​" by a data source (pdf) stored for example on the c :/ temp I have a FRM which, thanks to a button provides access to the OCX container Thank you for your help
I put the "show" at the end of each button event but now the first call from my FRM he doesn't read the first pdf,  for images there are no worries

Author: Dylan (dylan.huart@gmail.com)