Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Sunday, February 23, 2025 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Architect Forums - SalesLogix Scripting & Customization
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: Get Summary Function For Data Grid Not Working
Vaughn Poulson
Posts: 32
 
Get Summary Function For Data Grid Not WorkingYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 Jun 11 3:47 PM
fiogf49gjkf0d

I'm using the GetSummary Function on a datagrid and the summary part works great, the problem is that i'm only able to see the first row of the datagrid.  None of the other rows appears.


Here is the code i'm using to get the totals i need:


    If Column.FieldName = "A2_TOTALPAYMENTS" Or Column.FieldName = "SO_TOTAL" Or Column.FieldName = "TOTAL_TAX" Or Column.FieldName = "SUB_TOTAL" Then
        Dim rs, amnt
        amnt = 0
        Set rs = Sender.RecordSet
        If rs.RecordCount > 0 Then
            rs.MoveFirst
            While Not rs.EOF
                If IsNull(rs.Fields("UN_CANCELED_BYID").Value) Then
                    If Not IsNull(rs.Fields(Column.FieldName).Value) Then
                        amnt = amnt + CDbl(rs.Fields(Column.FieldName).Value)
                    End If
                End If
                rs.MoveNext
            Wend
        End If
        Set rs = Nothing
        Value = amnt
    End If


 


If i take out the looping then all the rows show up, but the only way to get what i need without doing another call to the database is to loop through the recordset.


Any thoughts would be appreciated.

[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: Get Summary Function For Data Grid Not WorkingYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 01 Jul 11 11:06 PM
fiogf49gjkf0d

When do you set the grid.recordset = rs?


 


what happens if you don't set the rs to nothing?


 


What happens if you do a rs.movefirst as the last line of code before the end if?

[Reply][Quote]
Vaughn Poulson
Posts: 32
 
Re: Get Summary Function For Data Grid Not WorkingYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 Jul 11 11:06 AM
fiogf49gjkf0d

I don't set the grid.recordset in this method. When i have tried that i get an error saying that the recordset is not open.


If I don't set the rs to nothing then i get memory leaks.


Setting the rs.movefirst after doing the looping doesn't do anyting.

[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: Get Summary Function For Data Grid Not WorkingYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 10 Jul 11 10:09 PM
fiogf49gjkf0d

Solunds like SLX doesn't like the recordset\ and or it's not a valid record set.


Do you have a valid grid object (Columns? SQL?)


I always create a recordset and then


Set grid.recordset = myRS


 


Always.

[Reply][Quote]
Vaughn Poulson
Posts: 32
 
Re: Get Summary Function For Data Grid Not WorkingYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 11 Jul 11 8:23 AM
fiogf49gjkf0d

It is a valid recordset.


I've stepped thourhg the code and there are records in the record set. 


I've done it both with grids bound using the desinger and with grids i've created in code and i get the same result.

[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: Get Summary Function For Data Grid Not WorkingYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 11 Jul 11 10:05 AM
fiogf49gjkf0d

Obviously we are unable to figure out what a valid recordset with a summary row in it looks like that is SLX Grid compatible.....


This is one area I've never worked on so I am of no further help......have done extensive cusomizations with the Header grouping functionality......not the Summary footer stuff....


 

[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 2/23/2025 7:05:15 PM