Results 1 to 7 of 7

Thread: Get Max Grid Rows

  1. #1
    New Member
    Join Date
    Dec 2000
    Posts
    7

    Get Max Grid Rows

    Hi List,

    i have a problem with the system function "Get Max Grid Rows".
    i use this function to loop through all lines in a grid and set a default value in a row for each line. this seems to work fine as long as i do not have more lines in the grid as they could be seen on the screen.
    for example: the grid contains 25 lines. if i have a screen resolution 1024x768 i can see aprox. 20 lines and the "GetMaxGridRows" returns 25 but if i change now the res to 800x600 the systemfunction returns for the same grid only 15.
    if i go to the bottom of the grid, the grid fetches all lines and after that the value is again 25.
    any ideas how to solve this problem

    thanks
    Axel

    XE on AS400 SP16, CO on AS400, Citrix Clients


  2. #2
    Member
    Join Date
    Jan 2001
    Location
    New Zealand
    Posts
    61

    Re: Get Max Grid Rows

    Axel,

    Try turning on the grid option "Disable Page at a time Processing".

    By default when a grid loads it loads the number of rows that can be displayed plus a few more. This is to prevent long grid loading times when there is a lot of data.

    Disabling page at a time processing means the grid will load will rows, possibly delaying displaying the screen because of the amount of data that needs to be loaded.

    XE - SP15.1 - Update 2
    Oracle 8.1.6
    Sun Solaris 8
    Various release/OS/DB

  3. #3
    New Member
    Join Date
    Dec 2000
    Posts
    7

    Re: Get Max Grid Rows

    Thanks,

    that's it....you solved my problem ;-)

    Axel

    XE on AS400 SP16, CO on AS400, Citrix Clients


  4. #4
    Senior Member Zoltan_Gyimesi's Avatar
    Join Date
    Oct 2000
    Location
    Budapest, Hungary
    Posts
    4,167

    Re: Get Max Grid Rows

    Hi Axel,

    Trevor's hint is right but if you have a lot of records then disabling the "Page at a Time" processing has performance disadvantage as well for the user who runs the application as well for concurrent users and running UBEs.

    If your logic enables, you can place your default setting into the Write Grid Line-Before event (Form Event)instead of disabling the "Page at a Time" processing. In this case you do not have to construct a while loop using Get Max Grid Row and Get Grid Row system functions, further you can spare the two row counter variables also, so this is simpler solution and hasn't performance disadvantage.

    If you are not sure, that this solution can work for you then please let us know more about your current situation, e.g.:

    1.) What is the type of your Form?
    2.) What kind of information required to generate default value? E.g. is all information available when a record fetched from the DB?
    3.) Do you want to re-run your logic after the grid has been populated? E.g. when something changed on the header part of the form?
    4.) Do you want to set default value for all record or just which appear in the grid?

    Please, let us know could it work for you or not. Thanks.

    Regards,
    Zoltán


    B7332 SP11, ESU 4116422, Intel NT4, SQL 7 SP1
    (working with B7321, B7331, XE too)
    - XE UPDATE 2 SP22, Intel NT4, SQL 2000
    - B9 (8.93B1)
    - was/is working with B7321, B7331, B7332 too

  5. #5
    New Member
    Join Date
    Nov 2001
    Location
    Canada
    Posts
    10

    Re: Get Max Grid Rows

    Hi Zoltan, (repost#22476/re:22452))

    I realize that this reply is from a long time post but I just came across the same problem and I was wondering if you could explain further the alternative to disabling the "Page-at-a-time" option. I am trying to create an app similiar to "P0911Z1" but want to display the number and total amount records that have been retrieved. I have tried disabling the page-at-a-time option and you are right when you wrote that that could affect performance. This is just a test app that I am trying to create so no rush on this one. Oh yeah, this is my first post to the list.

    Thanks,
    Ted




  6. #6
    Senior Member Zoltan_Gyimesi's Avatar
    Join Date
    Oct 2000
    Location
    Budapest, Hungary
    Posts
    4,167

    Re: Get Max Grid Rows

    Hi Ted,

    First, welcome to the JDEList Forums!

    I hope, you won't forget to attach your system configuration informations nex times to your posts.

    I checked P0911Z1 on our XE and it has 3 forms. I am not sure want you want to do exeactly. I suppose you do not want to insert all rows from the Business View and want to insert Total rows, am I right?

    Let's see:

    1.) You can issue a SuppressGridLine system function call (Grid category) in the GridRecord in the GridRecordIsfetched form event when you do not want the record to be inserted into the grid. Of course, you can accumulate its values to your totals.

    2.) If you have only one level totaling then accumulate your total in the grid buffer (GB prefixed elements in the ER). You can use the ClearGridBuffer and and InsertGridBufferRow system function (both are in Grid category). With the first you can initialize the totals, with the second you can insert it into the grid at the right place.

    3.) If you have more level of totaling then you can create ER variables (the best to choose Form scope for later flexibility of coding) to store the totals on the different levels. When you encounters a point when you have to insert the total then move the valuse from the variables to the GridBuffer and InsertGridBufferRow.

    An other solution can be to use a "dummy" business view and suppress all automatical fetches: use SuppressFind system function (General category) and set the Options appropriatly on the Properties window of he Form. Code your own logic to fetch the records and populating the grid in the ButtonClicked event of the Find button. If you want an automatical Find on entry then you can issue a PressButton(HC Find) in the PostDialogIsInitialized event.

    An other hint is that you can set different font and colour for your total rows (e.g. including diffent for each level too).

    Coding totaling, mainly multi level totaling has several tricks and traps. Here are some for you:

    1.) Creating a logic to detect the first level breaks.
    2.) How to detect level breaks.
    3.) Higher level breaks have to trigger all lower level breaks starting from the lowest.
    4.) Managing the totals after the last row has been fetched.
    5.) Minimizing the code placing the different level of break logic into the ButtonPressed event of different hidden buttons simulating something "subroutine" and each level triggers only the immediattely lowest level.
    6.) Disableing the QBE lines to disable for the users to change the sequence on the grid which generally cause malfunction of the logic (level breaks are tightly tied to a supposed sequence of the records).
    7.) etc.

    Hope, could be a bit of help for you.

    Good luck,

    Zoltán

    P.S.: What kind of form do you have to use? Do you want Update/Delete/Add capabilities (or some of them) on your form?

    B7332 SP11, ESU 4116422, Intel NT4, SQL 7 SP1
    (working with B7321, B7331, XE too)
    - XE UPDATE 2 SP22, Intel NT4, SQL 2000
    - B9 (8.93B1)
    - was/is working with B7321, B7331, B7332 too

  7. #7
    New Member
    Join Date
    Nov 2001
    Location
    Canada
    Posts
    10

    Re: Get Max Grid Rows

    Hi Zoltán,

    Thanks for the reply, haven't tried it yet though. I'll keep you posted.

    Ted
    JDE OneWorld B733, SP16.1


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to select all rows in a grid ?
    By jroux in forum JD Edwards® EnterpriseOne Developers
    Replies: 5
    Last Post: 06-10-2014, 04:40 AM
  2. Fixed Rows in a grid
    By venkateshg in forum JD Edwards® EnterpriseOne Developers
    Replies: 2
    Last Post: 03-23-2014, 03:07 PM
  3. Copy Selected Grid Rows from One Form to Another (FDA/Grid)
    By jefrey in forum JD Edwards® EnterpriseOne Developers
    Replies: 5
    Last Post: 07-14-2008, 12:15 PM
  4. Selecting All Rows in a Grid
    By mnorwood in forum JD Edwards® EnterpriseOne Developers
    Replies: 5
    Last Post: 09-07-2006, 10:00 AM
  5. Insert Rows in Grid....
    By AS400Guru in forum JD Edwards® EnterpriseOne
    Replies: 1
    Last Post: 02-14-2001, 11:28 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
The legal restrictions and terms of use applicable to this site are available here.
Use of this site signifies your agreement to the terms of use.
JDELIST is NOT affiliated with JD Edwards® & Company, Oracle or Peoplesoft. Contents of this site are neither endorsed nor approved by JD Edwards® & Company, Oracle or Peoplesoft.