Alpha Video Training
Results 1 to 8 of 8

Thread: Using UDF in Alpha V12

  1. #1
    Member
    Real Name
    Raj Patel
    Join Date
    Nov 2008
    Location
    Erskine, Scotland
    Posts
    56

    Default Using UDF in Alpha V12

    I wonder if anyone has any suggestions to solving this problem:

    I have a user defined function which return a numeric value into a calculated field in my Report based on a dbf file. I have created an .aex file from the Control Panel.

    If I run the report from the control panel I get the expected result.

    Total No. Male No. Female Average Median

    1256 860 68.47% 396 31.53% 66.91 69

    However, when the report is created using a5w_report_save function from a Dialog component and run using Live Preview, the UDF generated calculated field does not update as shown below

    Total No. Male No. Female Average Median

    1256 860 68.47% 396 31.53% 66.91 med

    med is the calculated variable in the report which is assigned the value returned by the UDF.

    I have copied the .aex file into the database, the live preview and the A5Webroot folders. The Development Server is also started.

    Any help would be appreciated.

    Kind regards

    Raj

  2. #2
    Member
    Real Name
    Garry M Flanigan
    Join Date
    Jul 2004
    Location
    Melbourne, Australia
    Posts
    909

    Default Re: Using UDF in Alpha V12

    When you publish you should select the option to compile the aex and publish.

  3. #3
    Member
    Real Name
    Raj Patel
    Join Date
    Nov 2008
    Location
    Erskine, Scotland
    Posts
    56

    Default Re: Using UDF in Alpha V12

    Hi Garry

    Good morning and thank you for your reply.

    Yes, I have selected the option to compile the .aex, stop and start the Development Server, but still will not work.

    I created a new UX component, on a button click I added a javascript action to open the Report with the UDF. In the Properties for the UX under Other I added the
    .aex file against Xbasic .aex Files. In this case the Report is generated correctly if I select "Working Preview" but not if I select "Live Preview" (both with IE and Chrome).

    Regards

    Raj

  4. #4
    "Certified" Alphaholic
    Real Name
    Gregg Schmidt
    Join Date
    Mar 2001
    Location
    Milwaukee
    Posts
    1,351

    Default Re: Using UDF in Alpha V12

    I haven't used AA webserver much where I've made adjustments to UDF, but with V11 I often
    have to restart the webserver to get the new UDFs to be recognized.
    Bad news is it's a PITA, good news is it doesn't take much effort to reboot AA webserver.

  5. #5
    Volunteer Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,642

    Default Re: Using UDF in Alpha V12

    have to restart the webserver to get the new UDFs to be recognized.
    Bad news is it's a PITA, good news is it doesn't take much effort to reboot AA webserver.
    You don't need to restart the web server to get your aex UDF's updated. Just create an a5w page with this code and run the page after you have published the updated aex:

    <%a5
    Server.ClearAEXCache()
    %>

  6. #6
    "Certified" Alphaholic
    Real Name
    Gregg Schmidt
    Join Date
    Mar 2001
    Location
    Milwaukee
    Posts
    1,351

    Default Re: Using UDF in Alpha V12

    Peter,
    I know that method is supposed to work with V11, but the reality
    of my experience requires a server reboot.

  7. #7
    Volunteer Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,642

    Default Re: Using UDF in Alpha V12

    I wonder why? My experience is that it works 100% of the time in v11 & v12. Never had a problem with it - and I use it, and have used it, extensively.

  8. #8
    Member
    Real Name
    Raj Patel
    Join Date
    Nov 2008
    Location
    Erskine, Scotland
    Posts
    56

    Default Re: Using UDF in Alpha V12

    Gregg and Peter

    Thank you both for your replies.

    And Best Wishes for 2019.

    I have tried the solutions you both have suggested but I am still having on luck with the UDFs.

    Strangely, there are no error messages and it appears as if the UDF does not execute (get called) when the Report with the UDF is generated from a grid component.

    This used to work fine in Version 10.5.

Similar Threads

  1. Replies: 0
    Last Post: 08-12-2014, 06:20 AM
  2. Replies: 0
    Last Post: 10-02-2013, 12:31 AM
  3. Alpha Five 2011 Plans & Announcing - a comprehensive Alpha Five Subscription Plan
    By Richard Rabins in forum Alpha Five Version 10 - Desktop Applications
    Replies: 24
    Last Post: 12-26-2010, 03:18 PM
  4. Replies: 0
    Last Post: 12-22-2010, 11:37 AM
  5. Replies: 5
    Last Post: 12-20-2009, 03:19 PM

Bookmarks

Posting Permissions

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