View Full Version : VPE Library/Packages issues.
colw
28-Nov-2022, 02:34 AM
Hi all,
I am in the process of test migrating an application from 19.0 to 20.1 and having problems with reports that use VPE to write pdf's.
It seems like it might be Dataflex code that is not compatible with 64bit/unicode, because it runs fine when selecting to compile as 32bit using the 32 bit vpe.dll but not as 64 bit.
Before I start chasing all these rabbits down rabbit holes I am wondering of anyone else is using this yet with the latest Dataflex and is happy to share any experiences/advice?
Thanks,
Col.
Mark Powers
28-Nov-2022, 03:53 PM
Following! On my list of todo's.
Mark
Dennis Piccioni
28-Nov-2022, 04:01 PM
Hi Col,
take a look at this thread (https://support.dataaccess.com/Forums/showthread.php?65592-Virtual-Print-Engine-(VPE)-and-Unicode).
colw
28-Nov-2022, 05:11 PM
Thanks Dennis. I will do some more reading.
Oddly I firstly did a few searches for 'VPE' across the entire site and got zero results!?!
Marco
28-Nov-2022, 05:28 PM
I got two large projects with vpe.
One is 32 bit and I wrote a converter from dataflex character mode ___ reports. Been running perfect for 4 years now on 19
Other is a 20.1 project 64bit. One that works perfect too, using Arnold’s winprint to vpe. Did need some changes, but saved a LOT of work by not neding to change 500+ reports from winprint classes.
It’s a very good engine and our preferred way for coded reports.
Dennis Piccioni
28-Nov-2022, 06:02 PM
It's too short a word, vBulletin has a 4 character limit. I'll try to add it as an exception. I found it via Google search (https://support.dataaccess.com/Forums/showthread.php?40338-Forum-Search-FAQ).
colw
29-Nov-2022, 04:50 PM
Marco,
Thanks for responding.
"Arnold's winprint to vpe".... I am not sure what that is!?!.
I have been using a beta 3 version of Dataflex VPE library for some years.. is it the same?
I had to do some mods initially to get it to work but it is good now with 19.0 and also works with 20.1 in 32bit mode but not 64bit.
I have just finished reading a section in the help titled "64-bit in Dataflex" which explains A LOT... and is required reading for anyone moving to 64bit!!!
Looks like I will need to get my hands dirty with this one!!
Col.
Marco
29-Nov-2022, 09:35 PM
Hi Col
Yeah I think that is the one.
Changes to 64 bit were limited to two packages as I remember. Some pointer/address changes.
Did not use the Unicode versions or the calls much, just convert from Unicode to ansi.
Oh and some of the previously signed integers were set to negative, that now can and should be unsigned integers.
colw
29-Nov-2022, 10:25 PM
Thanks Marco, I will debug what I have got then.
However, in fixing these packages I have noticed that "Global_Variable Handles" do not always get initialized to 0 in 64 bit mode. Is anyone else able to duplicate this?
//These are results compiled as 32 bit
1= 0
2= 0
3= 0
4= 0
5= 0
//These are results compiled as 64 bit
1= 0
2= 0
3= 6359736094333875520
4= 6359736094333875520
5= 6359736094333875520
//The above results come from the code below. As a test the code below is a new Windows Project straight from the Wizard with the following code insert in 5 different places
Global_Variable Handle ghtest?
Showln "?= " ghtest?
//Full Code follows
Use DFAllEnt.pkg
Use cCJStandardCommandBarSystem.pkg
//Global Handle test********************************************** *******************************
Global_Variable Handle ghtest1
Showln "1= " ghtest1
Object oHtmlHelp is a cHtmlHelp
End_Object
Object oApplication is a cApplication
Set peHelpType to htHtmlHelp
Object oConnection is a cConnection
Use LoginEncryption.pkg
Use DatabaseLoginDialog.dg
End_Object
End_Object
Object oToolTipController is a cToolTipController
Move Self to ghoToolTipController
End_Object
Use oEditContextMenu.pkg
Use oDEOEditContextMenu17.pkg
Object oMain is a Panel
Set Label To "My Project"
Set Location to 4 3
Set Size to 300 450
//Global Handle test********************************************** *******************************
Global_Variable Handle ghtest2
Showln "2= " ghtest2
Object oCommandBarSystem is a cCJCommandBarSystem
Set pbTimerUpdate to True
Set peVisualTheme to xtpThemeOffice2013Outlook
Set pbAutoResizeIcons to True
Procedure OnCreateCommandBars
Handle hoOptions
Get OptionsObject to hoOptions
Forward Send OnCreateCommandBars
End_Procedure
Object oMenuBar is a cCJMenuBar
Object oFileMenu is a cCJMenuItem
Set peControlType to xtpControlPopup
Set psCaption to "&File"
Set psDescription to "Find, Save, Delete, Clear information or quit this application."
Set psCategory to "Menus"
Object oClearMenuItem is a cCJClearMenuItem
Set pbAddToDesignerMenu to True
End_Object
Object oClearAllMenu is a cCJClearAllMenuItem
Set pbAddToDesignerMenu to True
End_Object
Object oPromptMenuItem is a cCJPromptMenuItem
Set pbAddToDesignerMenu to True
Set pbControlBeginGroup to True
End_Object
Object oFindMenuItem is a cCJFindMenuItem
Set pbAddToDesignerMenu to True
Set pbControlBeginGroup to True
End_Object
Object oFindNextMenu is a cCJFindNextMenuItem
Set pbAddToDesignerMenu to True
End_Object
Object oFindPreviousMenu is a cCJFindPreviousMenuItem
Set pbAddToDesignerMenu to True
End_Object
Object oFindFirstMenu is a cCJFindFirstMenuItem
Set pbAddToDesignerMenu to True
End_Object
Object oFindLastMenu is a cCJFindLastMenuItem
Set pbAddToDesignerMenu to True
End_Object
Object oSaveMenuItem is a cCJSaveMenuItem
Set pbAddToDesignerMenu to True
Set pbControlBeginGroup to True
End_Object
Object oDeleteMenuItem is a cCJDeleteMenuItem
Set pbAddToDesignerMenu to True
End_Object
Object oExitMenu is a cCJExitMenuItem
Set pbControlBeginGroup to True
End_Object
End_Object
Object oViewMenu is a cCJMenuItem
Set peControlType to xtpControlPopup
Set psCaption to "&View"
Set psToolTip to "View"
Set psDescription to "Available Views"
End_Object
Object oReportMenu is a cCJMenuItem
Set peControlType to xtpControlPopup
Set psCaption to "&Report"
Set psToolTip to "Report"
Set psDescription to "Available Reports"
End_Object
Object oNavigateMenu is a cCJMenuItem
Set peControlType to xtpControlPopup
Set psCaption to "&Navigate"
Set psTooltip to "Navigate"
Set psDescription to "Move to different areas of the application"
Object oNextAreaMenu is a cCJNextAreaMenu
End_Object
Object oPriorAreaMenu is a cCJPriorAreaMenu
End_Object
Object oNextViewMenu is a cCJNextViewMenu
End_Object
Object oPriorViewMenu is a cCJPriorViewMenu
End_Object
Object oPromptMenu is a cCJPromptMenuItem
Set pbControlBeginGroup to True
End_Object
Object oZoomMenu is a cCJZoomMenuItem
End_Object
End_Object
Object oWindowMenu is a cCJMDIWindowsMenuItem
Set peControlType to xtpControlPopup
Set psCaption to "&Window"
Set psToolTip to "Window"
Set psDescription to "Display Current Views and set other display options."
// These are the static windows items. More will be created in onInitPopup
Object oDisplayOptionsMenu is a cCJMenuItem
Set peControlType to xtpControlPopup
Set psCaption to "&Display Options"
Set psToolTip to "Display Options"
Set psDescription to "Set display options"
Object oStatusbarMenu is a cCJStatusbarMenuItem
End_Object
Object oAutoArrangeIconsMenu is a cCJAutoArrangeIconsMenuItem
End_Object
Object oRestoreMenusMenu is a cCJRestoreMenusMenuItem
Set pbControlBeginGroup to True
End_Object
End_Object
Object oCascadeMenu is a cCJCascadeMenuItem
Set pbControlBeginGroup to True
End_Object
Object oHorizTile is a cCJTileHorizontally
End_Object
Object oVertTile is a cCJTileVertically
End_Object
Object oMinimizeMenuItem is a cCJMinimizeWindowsMenuItem
Set pbControlBeginGroup to True
End_Object
Object oRestoreMenuItem is a cCJRestoreWindowsMenuItem
End_Object
Object oArrangeIconsMenuItem is a cCJAutoArrangeIconsMenuItem
Set pbControlBeginGroup to True
End_Object
End_Object
Object oHelpMenu is a cCJMenuItem
Set peControlType to xtpControlPopup
Set psCaption to "&Help"
Set psDescription to "Access Information for learning and using this DataFlex application."
Set psToolTip to "Help"
Object oHelpMenuItem is a cCJHelpMenuItem
End_Object
Object oAboutMenuItem is a cCJAboutMenuItem
End_Object
End_Object
End_Object
Object oFindToolBar is a cCJToolbar
Set psTitle to "Finding Toolbar"
Object oFindFirstTool is a cCJFindFirstMenuItem
End_Object
Object oFindPreviousTool is a cCJFindPreviousMenuItem
End_Object
Object oFindMenuTool is a cCJFindMenuItem
End_Object
Object oFindNextTool is a cCJFindNextMenuItem
End_Object
Object oFindLastTool is a cCJFindLastMenuItem
End_Object
Object oPromptToolItem is a cCJPromptMenuItem
Set pbControlBeginGroup to True
End_Object
End_Object
Object oFileToolBar is a cCJToolbar
Set psTitle to "Data Entry Toolbar"
Object oClearToolItem is a cCJClearMenuItem
Set peControlStyle to xtpButtonIconAndCaption
End_Object
Object oClearAllToolItem2 is a cCJClearAllMenuItem
Set peControlStyle to xtpButtonIconAndCaption
End_Object
Object oSaveToolItem is a cCJSaveMenuItem
Set peControlStyle to xtpButtonIconAndCaption
Set pbControlBeginGroup to True
End_Object
Object oDeleteToolItem is a cCJDeleteMenuItem
Set peControlStyle to xtpButtonIconAndCaption
End_Object
End_Object
Object oEditToolBar is a cCJToolbar
Set psTitle to "Edit Toolbar"
Object oCutToolbarItem is a cCJCutMenuItem
End_Object
Object oCopyToolbarItem is a cCJCopyMenuItem
End_Object
Object oPasteToolbarItem is a cCJPasteMenuItem
End_Object
Object oDeleteEditToolbarItem is a cCJDeleteEditMenuItem
Set pbControlBeginGroup to True
End_Object
End_Object
Object oRememberToolbar is a cCJToolbar
Set psTitle to C_$Remember
Object oRememberItems is a cCJMenuItem
Set peControlType to xtpControlPopup
Set peControlStyle to xtpButtonCaption
Set psCaption to C_$Remember
Object oMenuItem is a cCJRememberFieldMenuItem
Set peControlStyle to xtpButtonIconAndCaption
End_Object
Object oMenuItem is a cCJRememberLastFieldMenuItem
Set peControlStyle to xtpButtonIconAndCaption
End_Object
Object oMenuItem is a cCJUnRememberFieldMenuItem
Set peControlStyle to xtpButtonIconAndCaption
End_Object
Object oMenuItem is a cCJUnRememberFieldAllMenuItem
Set peControlStyle to xtpButtonIconAndCaption
End_Object
End_Object
End_Object
Object oStatusBar is a cCJStatusBar
Object oStatusPane1 is a cCJStatusBarPane
Set piID to sbpIDIdlePane
Set pbStyleStretch to True
End_Object
Object oStatusPane2 is a cCJStatusBarPane
Set phoViewPane to Self
Set pbStyleStretch to True
End_Object
End_Object
End_Object
Object oClientArea is a ClientArea
Use StdAbout.pkg
//Global Handle test********************************************** ***************************
Global_Variable Handle ghtest3
Showln "3= " ghtest3
Procedure Activate_About
Send DoAbout "" "" "" "" ""
End_Procedure
End_Object
//Global Handle test********************************************** *******************************
Global_Variable Handle ghtest4
Showln "4= " ghtest4
End_Object
//Global Handle test********************************************** *******************************
Global_Variable Handle ghtest5
Showln "5= " ghtest5
Start_UI
Chris_V
30-Nov-2022, 12:26 AM
Hi Marco,
I'm interested in using VPE to convert a project with character mode print screens and winprint. Any chance you can share Arnold's winprint to vpe classes for 64 bit?
Cheers,
Chris
Edgard
30-Nov-2022, 05:59 AM
Hi Chris,
If you don't intend to use the graphic resources, I recommend using Winprint 2.
Of course, you would want a DFPrint64.DLL (legacy) and certainly you, who are thinking about VPE.
As this is out of the question and my client was not interested in migrating to DR, I chose to preserve the legacy in DF20.1 32 bits and converting from Winprint 1 (with graphics) -> Winprint 2 (without graphics - 64 bits).
Regards,
Edgard Luis Paneque
Chris_V
3-Dec-2022, 07:04 PM
Hi Edgard,
I'm going to try Arnold's VPE to Winprint2 package in 64bit.
starzen
4-Dec-2022, 05:48 AM
Not sure which VPE packages you are referring too.
Our VPE classes work for 32bit as well as 64bit
Mike
Hi all,
Well this package now seems to be working ok in 64 bit DF. I mostly used the struc padding tool which worked well.
The main problem seemed to be the declaration of Global_Variables of type Handle which do not always get initiated to 0. Once I moved 0 to these straight after declaration it all seemed to work.
I notice no-one commented on that above so I will post it again as a separate item as it does seem like a bug to me
Happy to email more detail if anyone else is interested in using this. Just let me know.
BTW. The testing was done using Postgresql which has also worked very well via 64bit odbc , so now feeling quite confident upgrading this application to 64 bit.
All the best,
Col.
Powered by vBulletin® Version 4.2.5 Copyright © 2023 vBulletin Solutions Inc. All rights reserved.