Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Dynamic AI Library for DF 24.0

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2009
    Location
    Maasland, The Netherlands
    Posts
    2,656

    Default Dynamic AI Library for DF 24.0

    Currently I am working on the migration of a large Windows application to DataFlex 2024. The program contains many Dynamic AI reportviews. I tweaked the Dynamic AI Library 1.3 a bit and I have got it working.

    In one of the reports I get a scripting error. This also happens with the same report in DataFlex 18.2. When the report is run in the browser, it works correctly. This applies Edge, Chrome, Firefox and even Internet Explorer.

    I have two questions:
    - How can I solve the scripting error?
    - Is there a DF 24.0 version of the Dynamic AI Library?


    Click image for larger version. 

Name:	DynamicAI.jpg 
Views:	62 
Size:	70.1 KB 
ID:	16949
    Best regards,

    Peter van Mil
    Appvantage b.v.

  2. #2
    Join Date
    Feb 2009
    Posts
    1,501

    Default Re: Dynamic AI Library for DF 24.0

    Hello Peter,

    I once encountered this same error in an Windows application that sounds very, very similar to the one you mention! If my memory is not completely shot, the cause was trying to execute javascript using a version of IE that doesn't support the script. Dynamic AI at some point updated to a new version of Highcharts that IE 8 does not support. In the customer environment that had this problem Windows was using IE 8 as the default for IEFrame.dll, which is what is being used for embedded browser inside a Windows app. Using a registry entry you can set which version of IE is used. You have to add your application name to the list. See the attached image I assembled for my own reference when I first had to solve this.

    Registry key to edit:
    Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Int ernet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULA TION
    OR
    Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Int ernet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULA TION
    OR…this is the one that worked for me!
    Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\M icrosoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULA TION

    You can find more information on this at these links:
    https://social.msdn.microsoft.com/Fo...lating-msie-70

    https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/general-info/ee330730(v=vs.85)?redirectedfrom=MSDN#browser_emul ation


    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	Windows_Browser_Emulation_Information.jpg 
Views:	28 
Size:	246.1 KB 
ID:	16952  

  3. #3
    Join Date
    Feb 2009
    Posts
    1,501

    Default Re: Dynamic AI Library for DF 24.0

    P.S. Notice in the screenshot that Studio.exe is also there! Seems like Dataflex product knows about this issue and the DF installer automatically adds the Studio app to the needed registry keys. Had this information been documented it would have saved me a lot of time back then.

  4. #4
    Join Date
    Feb 2009
    Location
    Maasland, The Netherlands
    Posts
    2,656

    Default Re: Dynamic AI Library for DF 24.0

    Hi Bob,

    Good to hear from you about Dynamic AI

    I was just too curious if this works, so I had a quick look. On the development server this registry key already existed. I added on the live server. But it didn't make a difference.

    I am a bit surprised that there isn't a Dynamic AI library avaible based on WebView2, but "they are working on it".
    Best regards,

    Peter van Mil
    Appvantage b.v.

  5. #5
    Join Date
    Feb 2009
    Posts
    1,501

    Default Re: Dynamic AI Library for DF 24.0

    It should work. Did you specify 11000 or 11001 as the registry value? Is IE11 installed on the live server that is hosting DF24? The notes in the screenshot mention declaring "doctype". The line shown below was in my notes but I didn't include it in my post because I didn't comment it and didn't remember if it was necessary or what I did with it. Maybe you can find it on that dev server where that registry key already existed. Sorry I don't remember where I put it but you can probably guess better than I, or you could try using 11000 as the registry value for the app exe name. I wonder if DF24 is not using the "WOW6432" node.

    <meta http-equiv="X-UA-Compatible" content="IE=9">

  6. #6
    Join Date
    Feb 2009
    Location
    Maasland, The Netherlands
    Posts
    2,656

    Default Re: Dynamic AI Library for DF 24.0

    Hi Bob,

    It actually worked for my local development machine. It didn't work on the development and live server. The app is still running with DataFlex 18.2, but the test version with DataFlex 24.0 has the same issue.
    I have asked Data Access Europe for a WebView2 version, but that will take some time.

    Click image for larger version. 

Name:	DAI Browser.jpg 
Views:	27 
Size:	70.8 KB 
ID:	16953
    Best regards,

    Peter van Mil
    Appvantage b.v.

  7. #7
    Join Date
    Feb 2009
    Location
    Brazil
    Posts
    5,957

    Default Re: Dynamic AI Library for DF 24.0

    Maybe IE version on dev/live are different than what is being set at the registry ?
    Samuel Pizarro

  8. #8
    Join Date
    Feb 2009
    Location
    Somewhere in Vermont, USA - unless I'm not
    Posts
    11,275

    Default Re: Dynamic AI Library for DF 24.0

    While this may be of little use, I had a client that had to use the latest IE (& nothing else) to access a bank website in a browser object in a view. The app, upon launching, used this code to set it to the latest & then run the exe. This was early Windows !0 - so it might (will) need some tweaking. You also wouldn't need the check to see if the exe had changed - this was code for a launcher that made sure the user ran the latest verion of the exe.

    Code:
    Function GetOldKey Returns String
        Boolean bOpened bExists
        Handle  hoRegistry hoArray
        String  sKey sKeyStringValue sNewKey sParseValue sKeyString sNewValue
        Integer iNumValues iValue iKeyVersion
        
        Get Create (RefClass(cRegistry)) to hoRegistry
    
        // Set the default of phRootKey...
        Set phRootKey of hoRegistry to HKEY_CURRENT_USER
        
        // set access rights to read
        Set pfAccessRights of hoRegistry to Key_Read
    
        Move 'Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION\' to sKey
        
        Get OpenKey of hoRegistry sKey to bExists
        If (bExists) Begin
            Get Create U_Array to hoArray
        
            Get GetValues of hoRegistry hoArray to iNumValues
        
            For iValue from 0 to (iNumValues -1)
                Move (Value(hoArray, iValue)) to sKeyString
                Move (Lowercase(sKeyString))  to sKeyString
                If (sKeyString contains "accounting") Begin 
                    Send Destroy of hoArray
                    Send Destroy of hoRegistry
                    Function_Return sKeyString
                End
            Loop
            // destroy the array, as it is not needed anymore...
            Send Destroy of hoArray
        End
        Send Destroy of hoRegistry
        Function_Return ""
    End_Procedure
    
    Procedure ChangeBrowser String sCurrentEXE
        String  sRun sOldEXE
        
        Get GetOldKey             to sOldEXE
        Move (Lowercase(sOldEXE)) to sOldEXE
        If (Trim(sOldEXE)=(Trim(Lowercase(sCurrentEXE)))) Procedure_Return  //Nothing to change
        If (sOldEXE>"") Begin
            //Delete Old Key
            Move 'reg Delete "HKCU\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION"  /v ' to sRun
            Append sRun (Trim(sOldEXE)) " /f"
            Runprogram Wait sRun
        End
        //Create New Key
        Move 'reg Add "HKCU\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION"  /v ' to sRun
        Append sRun (Trim(sCurrentEXE)) " /t reg_dword /d 11000 /f"
        Runprogram Wait sRun
    End_Procedure
    Garret

    My brain just logged me out due to inactivity and now I can't remember my password.

  9. #9
    Join Date
    Feb 2009
    Location
    Maasland, The Netherlands
    Posts
    2,656

    Default Re: Dynamic AI Library for DF 24.0

    Hi Garret,

    I can try it, although this example uses HKEY_CURRENT_USER.
    Best regards,

    Peter van Mil
    Appvantage b.v.

  10. #10
    Join Date
    Feb 2009
    Location
    Somewhere in Vermont, USA - unless I'm not
    Posts
    11,275

    Default Re: Dynamic AI Library for DF 24.0

    As I mentioned - old code
    Garret

    My brain just logged me out due to inactivity and now I can't remember my password.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •