?
Solved

Problem in getting nested window values in Windows XP when user goes to other programs

Posted on 2006-04-24
12
Medium Priority
?
587 Views
Last Modified: 2013-12-26
Dear Sir,

 

We are facing one problem with Powerbuilder in Windows XP operating system. We are on client-server setup with Powerbuilder 10.2.1 and ASE 12.5.2.

 

We have a party ageing report and the grand totals are not displayed in case of  Windows XP(when user goes to other programs when data is retrieving). But we don’t face this problem in operating systems below Windows XP. We have migrated to Powerbuilder 10.2.1 Build 9004 from Powerbuilder 7.0. We faced the same problem in PB 7.0 and Windows XP.


THIS PROBLEM IS FACED IN CASE OF WINDOWS XP OPERATING SYSTEM [CHECKED IN HOME AND PROFESSTIONAL EDITIONS] ONLY IF USER GOES TO OTHER PROGRAMS WHEN THE DATA IS IN RETRIEVAL PROCESS AND THIS PROBLEM IS IRRESPECTIVE OF POWERBUILDER VERSIONS.


PARTY AGEING PROCESS IS AS FOLLOWS

 

1. There is main datawindow which selects the parties for ageing on the basis of criterias like      date criterias, date range etc.
  The datasoure(select sql) for this datawindow is set in the script of the window which calls this datawindow.

 

2. In main datawindow, there is a nested datawindow in detail band and some computed fields in its summary band. This nested datawindow is having stored

procedure as its datasource, executes it for each party sent by main datawindow and retrieves nine columns(two text and seven amount columns).

 

3 Once the data is retrieved(above two steps), retrieveend event of the datawindow triggers explicitly a user defined event(ue_retrieveend) through postevent method.

 

4. In this userdefined event, there is a loop(FOR statement) which scrolls through the retrieved rows(by nested datawindow) and adds each amount columns for each row in its local variables. The amount column values are taken using the dot object notation(e.g ldwo_current.Object.age_break1[1] -- whereby

ldwo_current is the reference to nested datawindow for the row in the FOR loop and age_break[1] is the amount column ].

 

5. After the loop[step 4], the local variables values are set in main datawindow's computed fields(grand total) in the summary band.

 

 

In case of Windows 2000 and below, this works properly even if the user goes to some other application or clicks anywhere else. But in case of Windows XP, if the data is retrieving and user shuffles to other programs, grand total is not set and it is blank. Whereas if user does not go to any other program, the grand totals are displayed(set).

 

During debugging found that the amount values are retrieved blank from nested datawindow(step 4), and hence the local variables which are set as grand totals remain as nil. So concluded that dot object notation is creating some problem.

 

Hopefully, we find the solution to this issue soon.

 

Awaiting your prompt response.  Thanks in advance.

 

Thanks & Regards,

Vaishali

Dolphin Team

Group IT

Gulf Agency Company

Email : vaishali.nayak@gacworld.com

0
Comment
Question by:dolteam
  • 5
  • 5
11 Comments
 

Author Comment

by:dolteam
ID: 16531609
We need urgent solution to the above.

Thanks in advance
Vaishali
0
 
LVL 18

Expert Comment

by:diasroshan
ID: 16531749
Hi,

In Step 3 instead of Post Event try Trigger Event...

PostEvent
------------
Adds an event to the end of the event queue of an object.
Eg.
This statement adds the Clicked event to the event queue for CommandButton cb_OK. The event script will be executed after any other pending event scripts are run:
cb_OK.PostEvent(Clicked!)

TriggerEvent
---------------
Triggers an event associated with the specified object, which executes the script for that event immediately.
Eg.
This statement executes the script for the Clicked event in the CommandButton cb_OK immediately:
cb_OK.TriggerEvent(Clicked!)

Im sure changing from Post event to trigger event will solve ur problem....

Cheers,
Rosh
0
 

Author Comment

by:dolteam
ID: 16531856
Thanks for your quick reply.

We have already tried TriggerEvent method but unfortunately it did not solve our issue.

Hopefully we get the solution soon.

Thanks,
Vaishali
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 18

Expert Comment

by:diasroshan
ID: 16532134
Hi,

if its not too much of an issue can u post ur code here... might help us in pointing more hints...

just for the sake of it... can u write <nestedDWname>.GroupCalc() at the end of step 2

Also,
try placing messageboxes at relavant places in ur code to identify where the prob occurs and whether it is consistent...

Cheers,
Rosh
0
 
LVL 18

Expert Comment

by:diasroshan
ID: 16532164
Hi,

i suspect the ue_retrieveend event isnt firing immediately when u switch between programs...
besides, Post event is a failure in ur case coz there is everychance that ur event will fire after step 4 or 5... and u have to execute it before step 4...

try placing message boxes with numbers in each steps so u know which step is executing first and so on...

try using an alternative like a function or something...


Cheers,
Rosh
0
 

Author Comment

by:dolteam
ID: 16541469
Hi,

I copied the script from ue_retrievend to retrievend event of datawindow but still same problem.

Secondly, Can we use groupcalc for nested datawindows? When i use it, it gave me system error.


THIS PROBLEM HAPPENS ONLY IN WINDOWS XP  WHEN USER MOVES TO OTHER PROGRAM WHEN RETRIEVING THE DATA.

Below is the whole script of ue_retrievend event and we are having dr_std_party_ageing as datawindow object. And the setting of grand total is done in the case statement for that datawindow. I have put some comments with 'VaishaliN'(search on this). let me know if u need anything more.

/*****************************************************/

INTEGER            li_rowcnt, li_i, li_nestcnt,ll_row
DECIMAL{3}      lde_ptytot, lde_ptytot1, lde_ptytot2,lde_ptytot_1
DWOBJECT       ldwo_current
Any                  la_Data[]
STRING            ls_message
m_report            lm_report
decimal             lde_sum_age
integer             i

String ls_curr            
Long ll_total_rows,ll_pset_rows,ll_age,li_count
String ls_party,ls_ind,ls_data
Dec ll_totnestrep1,ll_totnestrep2

long ll_rows
li_rowcnt = dw_1.RowCount()


Choose Case This.Dataobject
//Shilpa 24/1/2005
//for department wise report it was showing a blank page if the department does
//not have data. To remove those blank pages code added
//shilpa 08/08/2005 'dr_main_vessel_statement' added
Case      'dr_main_stmt_lamt_bkdt_deptwise','dr_main_stmt_xamt_bkdt_deptwise','dr_party_mainled_deptwise','dr_main_vessel_statement'      ,'d_avg_payment_days_main'
            string ls_temp,      ls_old, ls_cgrp ,ls_cgrpdesc,ls_rep
      For li_i = li_rowcnt to 1 STEP -1
            if This.Dataobject = 'dr_party_mainled_deptwise' then
                  ldwo_current      = dw_1.Object.nest_rep[li_i]
            else                   
                  ldwo_current      = dw_1.Object.nest_rep1[li_i]
            end if
            
            
            ls_temp      = left(trim(ldwo_current.Object.Datawindow.data),10)
            
            If len(trim(ls_temp)) <= 0 Then
                  dw_1.setitem(li_i,"no_nested_rows",'N')
            End If            
            
            if This.Dataobject = 'dr_party_mainled_deptwise' then
                  lde_ptytot            = ldwo_current.Object.nest_tot[1]
            
                  If IsNull(lde_ptytot) Then lde_ptytot = 0
                  This.SetItem(li_i, "group_tot", lde_ptytot)
            elseif This.Dataobject = 'd_avg_payment_days_main' then
                  If len(trim(ls_temp)) > 0 Then
                        lde_ptytot            = ldwo_current.Object.compute_0003[1]
                        If IsNull(lde_ptytot) Then lde_ptytot = 0
                        This.SetItem(li_i, "avg_days", lde_ptytot)
                        
                        ls_rep = dw_1.Describe("Evaluate('as_rep',0)")
                        if  ls_rep = "Report ID" then
                              ls_cgrp =  w_repmain.dw_1.getItemstring(li_i,"cgrp")
                              if ls_old <> ls_cgrp then
                                    ls_cgrpdesc = ''
                                    select description into :ls_cgrpdesc
                                    from label_detail_master
                                    where t_name = 'accrpmst' and g_name = 'Rep ID'
                                    and code = :ls_cgrp;
                              end if
                  
                              ls_old =ls_cgrp      
                              w_repmain.dw_1.SetItem(li_i,"cgrpdesc",ls_cgrpdesc)
                        end if      
                        
                        //Addition Start : Sathya : 12/04/2006 : Set location desc
                        if  ls_rep = "Location" then
                              ls_cgrp =  w_repmain.dw_1.getItemstring(li_i,"cgrp")
                              if ls_old <> ls_cgrp then
                                    ls_cgrpdesc = ''
                                    select descr into :ls_cgrpdesc
                                    from accloca
                                    where loca = :ls_cgrp;
                              end if
                              ls_old =ls_cgrp      
                              w_repmain.dw_1.SetItem(li_i,"cgrpdesc",ls_cgrpdesc)
                        end if      
                        //Addition end : Sathya : 12/04/2006 : Set location desc
                                                
                        
                  end if      
            end if      
      next
      
      dw_1.setfilter("upper(no_nested_rows) = 'Y'")
      dw_1.filter()

//Shilpa

// Case      'dr_party_mainled', 'dr_gl_mainled', 'dr_expense_mainled', 'dr_income_mainled' *** changed by AN on 12/1/00
//modified by fahim on 14.02.2000
Case      'dr_party_mainled', 'dr_gl_mainled', 'dr_expense_mainled', 'dr_income_mainled',  &
         'd_transit_mainled', 'dr_party_mainled_hist'       
      For li_i = li_rowcnt to 1 STEP -1
            ldwo_current      = dw_1.Object.nest_rep[li_i]
            
            li_nestcnt      = INTEGER(ldwo_current.Object.Datawindow.LastRowOnPage)
            If li_nestcnt <= 0 Then
                  Continue
            End If

            lde_ptytot            = ldwo_current.Object.nest_tot[1]
            
            If IsNull(lde_ptytot) Then lde_ptytot = 0
            This.SetItem(li_i, "group_tot", lde_ptytot)
      Next
/* Included by G.S on 22.09.1999 */      
Case 'dr_inc_ledger_dept' // Income Ledger Department wise
      For li_i = li_rowcnt to 1 STEP -1
            ldwo_current      = dw_1.Object.nest_rep[li_i]
            
            li_nestcnt      = INTEGER(ldwo_current.Object.Datawindow.LastRowOnPage)
            If li_nestcnt <= 0 Then
                  Continue
            End If

            lde_ptytot            = ldwo_current.Object.nest_tot_1[1]
            
            If IsNull(lde_ptytot) Then lde_ptytot = 0
            This.SetItem(li_i, "group_tot", lde_ptytot)
      Next
/* Included by G.S on 22.09.1999 */      
//modified by fahim on 14.02.2000
Case 'dr_main_statement', 'dr_main_statement_hist'
//shilpa 2/2/2005 added dr_main_deptpartywise_schedule for departmetnwise party summary
Case 'dr_main_party_schedule','dr_main_party_schedule_hist','dr_main_deptpartywise_schedule'
      For li_i = li_rowcnt to 1 STEP -1
            ldwo_current      = dw_1.Object.nest_rep[li_i]
            
            li_nestcnt      = INTEGER(ldwo_current.Object.Datawindow.LastRowOnPage)
            If li_nestcnt <= 0 Then
                  Continue
            End If

            lde_ptytot            = ldwo_current.Object.nest_tot1[1]
            If IsNull(lde_ptytot) Then lde_ptytot = 0
            This.SetItem(li_i, "group_tot1", lde_ptytot)

            lde_ptytot            = ldwo_current.Object.nest_tot2[1]
            If IsNull(lde_ptytot) Then lde_ptytot = 0
            This.SetItem(li_i, "group_tot2", lde_ptytot)
      Next
/*
Commented and Modified by GS on 14.02.2000
Case 'dr_party_ageing', 'dr_std_party_ageing'
*/

/*
Commented and Modified by FR on 14.02.2000
Case 'dr_party_ageing', 'dr_std_party_ageing', 'dr_os_party_ageing', 'dr_os_std_party_ageing'
*/
//shilpa 09/07/2003 fro adding new option for agging crdays/limit - added 'dr_std_ptyage_mfc'
//shilpa 1/2/2005 added dr_main_ageing_lamt_deptwise
//VaishaliN - this case is executed for the report
Case 'dr_party_ageing', 'dr_std_party_ageing', 'dr_os_party_ageing', 'dr_os_std_party_ageing', &
      'dr_party_ageing_hist', 'dr_std_party_ageing_hist', 'dr_std_ptyage_mfc', & 
      'dr_std_party_ageing_xamt','dr_main_ageing_lamt_deptwise'
      
      //For li_i = li_rowcnt to 1 STEP -1 // Sathya : 11/04/2006 : Commented to make the loop progressive to display the
                                                                              //                                                 customer code in the w_message1 in assending order
        For li_i = 1 to li_rowcnt  //Added : Sathya : 11/04/2006 : For above purpose
      
            /*By VaishaliN -- This is creating problem as this loses its reference to nested report but when we use Isvalid to check its existence it returns true*/
            ldwo_current      = dw_1.Object.nest_rep[li_i]
            
            li_nestcnt      = INTEGER(ldwo_current.Object.Datawindow.LastRowOnPage)
            If li_nestcnt <= 0 Then
                  Continue
            End If
            
            //Addition start : Sathya : 11/04/2006
            // Call the new function of_setmessage to diplay the customer code to user in the w_message1 window
          ls_party = ldwo_current.Object.party[1]
             of_setmessage(ls_party)       
             //Addition end : Sathya : 11/04/2006

         //VaishaliN -- This returns blank -- if user moves to other program while retrieval process-- if we try to take string columns in the dw using same below syntax it also returns blank
            lde_ptytot            = ldwo_current.Object.age_break1[1]
            If IsNull(lde_ptytot) Then lde_ptytot = 0
            This.SetItem(li_i, "group_tot1", lde_ptytot)

            lde_ptytot            = ldwo_current.Object.age_break2[1]
            If IsNull(lde_ptytot) Then lde_ptytot = 0
            This.SetItem(li_i, "group_tot2", lde_ptytot)
            
            lde_ptytot            = ldwo_current.Object.age_break3[1]
            If IsNull(lde_ptytot) Then lde_ptytot = 0
            This.SetItem(li_i, "group_tot3", lde_ptytot)
      
            lde_ptytot            = ldwo_current.Object.age_break4[1]
            If IsNull(lde_ptytot) Then lde_ptytot = 0
            This.SetItem(li_i, "group_tot4", lde_ptytot)
            
            lde_ptytot            = ldwo_current.Object.age_break5[1]
            If IsNull(lde_ptytot) Then lde_ptytot = 0
            This.SetItem(li_i, "group_tot5", lde_ptytot)
            
            lde_ptytot            = ldwo_current.Object.age_break6[1]
            If IsNull(lde_ptytot) Then lde_ptytot = 0
            This.SetItem(li_i, "group_tot6", lde_ptytot)

            lde_ptytot            = ldwo_current.Object.adv_break[1]
            If IsNull(lde_ptytot) Then lde_ptytot = 0
            This.SetItem(li_i, "adv_tot", lde_ptytot)
            
            lde_ptytot            = ldwo_current.Object.due_amt[1]
            If IsNull(lde_ptytot) Then lde_ptytot = 0
            This.SetItem(li_i, "tot_due", lde_ptytot)
            
            /* ------ Added by VS for Alert list options ------- */
            m_report.m_file.m_alertlist.Enabled = True
            m_report.m_file.m_alertlist-filter.Enabled = True
            /* --------------- */
      
      Next
      //shilpa 04/11/2003 this is to filter the party rows which does not have any amount pending
      if this.dataobject = 'dr_std_party_ageing_xamt' then
            this.setfilter('compute_13 <> 0')
         this.filter()

            ll_rows = this.rowcount()
            If ll_rows = 0 Then
                        MessageBox("Information","No details found")
                        Close(parent)
                        close(w_reportframe)
                        Return
            End If
      end if      
      //shilpa end
//Added by fahim on 20/09/2000

Case 'dr_party_ageing_grhead'
      For li_i = li_rowcnt to 1 STEP -1
            ldwo_current      = dw_1.Object.nest_rep[li_i]
            
            li_nestcnt      = INTEGER(ldwo_current.Object.Datawindow.LastRowOnPage)
            If li_nestcnt <= 0 Then
                  Continue
            End If


            lde_ptytot            = ldwo_current.Object.percent6[1]
            If IsNull(lde_ptytot) Then lde_ptytot = 0
            This.SetItem(li_i, "group_per6", lde_ptytot)

            lde_ptytot            = ldwo_current.Object.percent5[1]
            If IsNull(lde_ptytot) Then lde_ptytot = 0
            This.SetItem(li_i, "group_per5", lde_ptytot)


            lde_ptytot            = ldwo_current.Object.percent4[1]
            If IsNull(lde_ptytot) Then lde_ptytot = 0
            This.SetItem(li_i, "group_per4", lde_ptytot)

            lde_ptytot            = ldwo_current.Object.percent3[1]
            If IsNull(lde_ptytot) Then lde_ptytot = 0
            This.SetItem(li_i, "group_per3", lde_ptytot)

            lde_ptytot            = ldwo_current.Object.percent2[1]
            If IsNull(lde_ptytot) Then lde_ptytot = 0
            This.SetItem(li_i, "group_per2", lde_ptytot)

            lde_ptytot            = ldwo_current.Object.percent1[1]
            If IsNull(lde_ptytot) Then lde_ptytot = 0
            This.SetItem(li_i, "group_per1", lde_ptytot)


            lde_ptytot            = ldwo_current.Object.percent0[1]
            If IsNull(lde_ptytot) Then lde_ptytot = 0
            This.SetItem(li_i, "group_per0", lde_ptytot)

            lde_ptytot            = ldwo_current.Object.age_break0[1]
            If IsNull(lde_ptytot) Then lde_ptytot = 0
            This.SetItem(li_i, "group_tot0", lde_ptytot)

            lde_ptytot            = ldwo_current.Object.age_break1[1]
            If IsNull(lde_ptytot) Then lde_ptytot = 0
            This.SetItem(li_i, "group_tot1", lde_ptytot)

            lde_ptytot            = ldwo_current.Object.age_break2[1]
            If IsNull(lde_ptytot) Then lde_ptytot = 0
            This.SetItem(li_i, "group_tot2", lde_ptytot)
            
            lde_ptytot            = ldwo_current.Object.age_break3[1]
            If IsNull(lde_ptytot) Then lde_ptytot = 0
            This.SetItem(li_i, "group_tot3", lde_ptytot)
      
            lde_ptytot            = ldwo_current.Object.age_break4[1]
            If IsNull(lde_ptytot) Then lde_ptytot = 0
            This.SetItem(li_i, "group_tot4", lde_ptytot)
            
            lde_ptytot            = ldwo_current.Object.age_break5[1]
            If IsNull(lde_ptytot) Then lde_ptytot = 0
            This.SetItem(li_i, "group_tot5", lde_ptytot)
            
            lde_ptytot            = ldwo_current.Object.age_break6[1]
            If IsNull(lde_ptytot) Then lde_ptytot = 0
            This.SetItem(li_i, "group_tot6", lde_ptytot)

            lde_ptytot            = ldwo_current.Object.adv_break[1]
            If IsNull(lde_ptytot) Then lde_ptytot = 0
            This.SetItem(li_i, "adv_tot", lde_ptytot)
            
            lde_ptytot            = ldwo_current.Object.due_amt[1]
            If IsNull(lde_ptytot) Then lde_ptytot = 0
            This.SetItem(li_i, "tot_due", lde_ptytot)
      Next

//Added by fahim on 20/09/2000


//Commented by fr on 14.02.2000
//Case 'dr_main_stmt_of_acc'
Case 'dr_main_stmt_of_acc','dr_main_stmt_of_acc_hist'

Case      'dr_job_ledger', 'dr_job_ledger_serv', 'dr_job_ledger_dept', &
            'dr_income_ledger', 'dr_inc_ledger_dept','dr_job_ledger_xamount'
            //shilpa 3/6/2003 added - dr_job_ledger_xamount to the case statment
      For li_i = li_rowcnt to 1 STEP -1
            ldwo_current      = dw_1.Object.nest_rep[li_i]
            
            li_nestcnt      = INTEGER(ldwo_current.Object.Datawindow.LastRowOnPage)
            If li_nestcnt <= 0 Then
                  Continue
            End If
            
            lde_ptytot            = ldwo_current.Object.nest_tot[1]
            
            If IsNull(lde_ptytot) Then lde_ptytot = 0
            This.SetItem(li_i, "group_tot", lde_ptytot)
      Next
case 'dr_job_schedule'
      For li_i = li_rowcnt to 1 STEP -1
            ldwo_current      = dw_1.Object.nest_rep[li_i]
            
            li_nestcnt      = INTEGER(ldwo_current.Object.Datawindow.LastRowOnPage)
            If li_nestcnt <= 0 Then
                  Continue
            End If

            lde_ptytot            = ldwo_current.Object.nest_tot1[1]
            If IsNull(lde_ptytot) Then lde_ptytot = 0
            This.SetItem(li_i, "group_tot1", lde_ptytot)

            lde_ptytot            = ldwo_current.Object.nest_tot2[1]
            If IsNull(lde_ptytot) Then lde_ptytot = 0
            This.SetItem(li_i, "group_tot2", lde_ptytot)
            
            //-- Added by pradeep on 17-12-2002
            lde_ptytot = ldwo_current.Object.nest_tot3[1]
            If IsNull(lde_ptytot) Then lde_ptytot = 0
            This.SetItem(li_i, "group_tot3", lde_ptytot)
            //-- by pradeep on 17-12-2002            
      Next
// NP      
Case      'dr_gl_mainled_dthead_acc', 'dr_gl_mainled_dthead_dept', +&
            'dr_gl_mainled_dthead_anal', +&
            'dr_hisgl_mainled_dthead_acc', 'dr_hisgl_mainled_dthead_dept', +&
            'dr_hisgl_mainled_dthead_anal'
      For li_i = li_rowcnt to 1 STEP -1
            ldwo_current      = dw_1.Object.nest_rep[li_i]
            
            li_nestcnt      = INTEGER(ldwo_current.Object.Datawindow.LastRowOnPage)
            If li_nestcnt <= 0 Then
                  Continue
            End If
            
            lde_ptytot            = ldwo_current.Object.nest_tot[1]
            
            If IsNull(lde_ptytot) Then lde_ptytot = 0
            This.SetItem(li_i, "group_tot", lde_ptytot)
      Next
// NP
//shilpa 16/8/2003 for displaying total for landscape mode
Case      'dr_gl_mainled_dthead_acc_dc', 'dr_gl_mainled_dthead_dept_dc', +&
            'dr_gl_mainled_dthead_anal_dc'
            //, +&
            //'dr_hisgl_mainled_dthead_acc', 'dr_hisgl_mainled_dthead_dept', +&
            //'dr_hisgl_mainled_dthead_anal'
      For li_i = li_rowcnt to 1 STEP -1
            ldwo_current      = dw_1.Object.nest_rep[li_i]
            
            li_nestcnt      = INTEGER(ldwo_current.Object.Datawindow.LastRowOnPage)
            If li_nestcnt <= 0 Then
                  Continue
            End If
            
            lde_ptytot            = ldwo_current.Object.nest_tot1[1]
            lde_ptytot1            = ldwo_current.Object.nest_tot2[1]
            If IsNull(lde_ptytot) Then lde_ptytot = 0
            If IsNull(lde_ptytot1) Then lde_ptytot1 = 0
            This.SetItem(li_i, "group_tot1", lde_ptytot)
            This.SetItem(li_i, "group_tot2", lde_ptytot1)
      Next
//shilpa------------------------------------------
// Added by Pradeep on 04-03-2003
Case  'dr_party_ageing_int_calc'
      
      For li_i = li_rowcnt to 1 STEP -1
            ldwo_current      = dw_1.Object.nest_rep[li_i]
            
            li_nestcnt      = INTEGER(ldwo_current.Object.Datawindow.LastRowOnPage)
            If li_nestcnt <= 0 Then
            Continue
            End If
            
                  For i = 1 to li_nestcnt      
                        lde_ptytot = ldwo_current.Object.interest[i]
                        If IsNull(lde_ptytot) Then lde_ptytot = 0
                        lde_sum_age = lde_sum_age + lde_ptytot
                        This.SetItem(li_i, "group_tot4", lde_sum_age)
                  Next
      Next
// pradeep       
Case  'dr_party_wise_income'
/* ------ Added by pradeep for Alert list options ------- */
            m_report.m_file.m_alertlist.Enabled = True
            m_report.m_file.m_alertlist-filter.Enabled = True
/* --------------- */

//For Currency reports drill down data on 24.04.2005 by Vaishali*/
Case 'd_curr_party_ageing_dd'
      For li_i = li_rowcnt to 1 STEP -1
            ldwo_current      = dw_1.Object.nest_rep[li_i]
            
            lde_ptytot            = ldwo_current.Object.totdue[1]
            IF lde_ptytot = 0 Then
                  //dw_1.DeleteRow(li_i)
                  This.SetItem(li_i,'cfilter','Y')
                  Continue
            End If
            
//            li_nestcnt      = INTEGER(ldwo_current.Object.Datawindow.LastRowOnPage)
//            If li_nestcnt <= 0 Then
//            Continue
//            End If
            
            lde_ptytot            = ldwo_current.Object.agebrk1[1]
            If IsNull(lde_ptytot) Then lde_ptytot = 0
            This.SetItem(li_i, "group_tot1", lde_ptytot)

            lde_ptytot            = ldwo_current.Object.agebrk2[1]
            If IsNull(lde_ptytot) Then lde_ptytot = 0
            This.SetItem(li_i, "group_tot2", lde_ptytot)
            
            lde_ptytot            = ldwo_current.Object.agebrk3[1]
            If IsNull(lde_ptytot) Then lde_ptytot = 0
            This.SetItem(li_i, "group_tot3", lde_ptytot)
      
            lde_ptytot            = ldwo_current.Object.agebrk4[1]
            If IsNull(lde_ptytot) Then lde_ptytot = 0
            This.SetItem(li_i, "group_tot4", lde_ptytot)
            
            lde_ptytot            = ldwo_current.Object.totdue[1]
            If IsNull(lde_ptytot) Then lde_ptytot = 0
            This.SetItem(li_i, "tot_due", lde_ptytot)

            
      Next
      dw_1.SetFilter("cfilter = 'N'")
      dw_1.Filter()
      
      Case 'd_curr_ageing','d_curr_party_ageing'
            For li_i = li_rowcnt to 1 STEP -1
                  ldwo_current      = dw_1.Object.dw_1[li_i]
                  String ll
                  ll =  left(trim(ldwo_current.Object.Datawindow.data),10)
                  
            //      MessageBox("",String(ldwo_current.Rowcount()))
               if len(ll) <> 0 Then
                  lde_ptytot            = ldwo_current.Object.totdue[1]
                  IF lde_ptytot = 0 Then
                        //dw_1.DeleteRow(li_i)
                        This.SetItem(li_i,'cfilter','Y')
                        Continue
                  End If
                End If
            
            Next
            
            dw_1.SetFilter("cfilter = 'N'")
            dw_1.Filter()
            
      Case 'dr_main_stmt_lamt_bkdt'      //By Vaishali for indicators below for stmt bal <> ageing bal(#) and if pset data thr in accbatch(*)
                  Long ll_nestrowcnt      
         ll_age =      Long(dw_1.Describe("Evaluate('ai_run',0)"))
            
            For li_i = li_rowcnt to 1 STEP -1
                  ls_data = string(dw_1.object.nest_rep1[li_i].object.datawindow.data)

                        If len(ls_data) <= 0 Then
                              dw_1.object.nestedrows[li_i] = 'N' //for parties with no data should not be displayed
                              continue
                        End If
                        
                        dw_1.object.nestedrows[li_i] = 'Y' //For parties with data should be shown
                  
            Next
            
            w_repmain.dw_1.SetFilter("nestedrows = 'Y'")
            w_repmain.dw_1.Filter()
            
            li_rowcnt = dw_1.RowCount()
            
                  
            For li_i = li_rowcnt to 1 STEP -1
                        ls_ind = ''
                        ls_party = dw_1.Object.party[li_i]
                        
                        ls_data = string(dw_1.object.nest_rep1[li_i].object.datawindow.data)

                        If len(ls_data) <= 0 Then
                              //dw_1.object.nestedrows[li_i] = 'N' //for parties with no data should not be displayed
                              continue
                        End If
                        
                  //      dw_1.object.nestedrows[li_i] = 'Y' //For parties with data should be shown*/
                        
                        If ll_age = 1 Then
                              ll_total_rows = dw_1.object.nest_rep1[li_i].object.totalrows[1]
                                                                  
                              ll_totnestrep1 = Round(dw_1.object.nest_rep1[li_i].object.alltotal[ll_total_rows],3)
                              
                        //      string l
                        //      l = dw_1.object.nest_rep1[li_i].object.dw_1.Visible
                              
                              If ll_totnestrep1 <> 0 Then
                                    ll_totnestrep2 = Round(dw_1.object.nest_rep1[li_i].object.dw_1[ll_total_rows].object.due_amt[1],3)
                                                
                                    If ll_totnestrep1 <> ll_totnestrep2 Then
                                          ls_ind = '#'
                                    End If
                                    
                              End If
                                                
                              select count(*) into :ll_pset_rows from accbatch
                              where ctype = 'P' and party = :ls_party and serv = 'PSET';
            
                              If ll_pset_rows > 0 Then
                                    ls_ind = ls_ind + ' *'
                              End If
            
                              //ls = dw_1.Object.st_notes[li_i]
                              //MessageBox("party",ls)
                        //       dw_1.object.t_14[li_i] = ls_ind
            //                   dw_1.object.nest_rep1[li_i].object.indi[ll_total_rows] = ls_ind
            
                               For li_count = 1 To ll_total_rows Step 1
                              //      MessageBox("indi",String(ldwo_current.object.indi[li_count]))
                              
                                    If Len(ls_ind) > 0 and Not Isnull(ls_ind) Then
                                          dw_1.object.nest_rep1[li_i].object.indi[li_count] = ls_ind + " Preliminary Statement..Check unupdated posting " + Reverse(ls_ind)
                                    //      ldwo_current.SetItem(1,'indi','ABC')
                                    End If      
                               Next
                              
                        End IF
                        
                  
                  //      ll_nestrowcnt = dw_1.object.nest_rep1[li_i].totrows[1]
                  //      dw_1.object.nest_rep1[li_i].object.note[1] = 'testing'
                  
                  Next      
            
      Case 'dr_main_stmt_xamt_bkdt'      //Foreign By Vaishali for indicators below for stmt bal <> ageing bal(#) and if pset data thr in accbatch(*)

      
         ll_age =      Long(dw_1.Describe("Evaluate('ai_run',0)"))
            
            For li_i = li_rowcnt to 1 STEP -1
                  ls_data = string(dw_1.object.nest_rep1[li_i].object.datawindow.data)

                        If len(ls_data) <= 0 Then
                              dw_1.object.nestedrows[li_i] = 'N' //for parties with no data should not be displayed
                              continue
                        End If
                        
                        dw_1.object.nestedrows[li_i] = 'Y' //For parties with data should be shown
                  
            Next
            
            w_repmain.dw_1.SetFilter("nestedrows = 'Y'")
            w_repmain.dw_1.Filter()
            
            li_rowcnt = dw_1.RowCount()
            
            For li_i = li_rowcnt to 1 STEP -1
                        ls_ind = ''
                        ldwo_current      = dw_1.Object.nest_rep1[li_i]
                        ls_party = dw_1.Object.party[li_i]
                        ls_curr = dw_1.Object.trngl_curr[li_i]
                        
                        ls_data = string(dw_1.object.nest_rep1[li_i].object.datawindow.data)

                        If len(ls_data) <= 0 Then
                              //dw_1.object.nestedrows[li_i] = 'N' //for parties with no data should not be displayed
                              continue
                        End If
                        
                        //dw_1.object.nestedrows[li_i] = 'Y' //For parties with data should be shown*/
                        
                        If ll_age = 1 Then
                              ll_total_rows = dw_1.object.nest_rep1[li_i].object.totalrows[1]
                        
                        //Aded gi_decplaces for rounding off == Vaishali 30/01/2006
                              ll_totnestrep1 = Round(dw_1.object.nest_rep1[li_i].object.alltotal[ll_total_rows],gi_decplaces)
                              
                        //      string l
                        //      l = dw_1.object.nest_rep1[li_i].object.dw_1.Visible
                              
                        //      If ll_totnestrep1 <> 0 Then
                        //Aded gi_decplaces for rounding off == Vaishali 30/01/2006
                                    ll_totnestrep2 = Round(dw_1.object.nest_rep1[li_i].object.dw_1[ll_total_rows].object.due_amt[1],gi_decplaces)
                                                
                                    If ll_totnestrep1 <> ll_totnestrep2 Then
                                          ls_ind = '#'
                                    End If
                        
                        //      End If
                                                
                              select count(*) into :ll_pset_rows from accbatch
                              where ctype = 'P' and party = :ls_party and serv = 'PSET'
                              and curr = :ls_curr;
            
                              If ll_pset_rows > 0 Then
                                    ls_ind = ls_ind + ' *'
                              End If
            
                              //ls = dw_1.Object.st_notes[li_i]
                              //MessageBox("party",ls)
                               //dw_1.object.t_14[li_i] = ls_ind
                              
                               For li_count = 1 To ll_total_rows Step 1
                                    If Len(ls_ind) > 0 and Not Isnull(ls_ind) Then
                                          ldwo_current.object.indi[li_count] = ls_ind + " Preliminary Statement..Check unupdated posting " + Reverse(ls_ind)
                              //      ldwo_current.SetItem(1,'indi','ABC')
                                    End If
                               Next
                              
                        End IF
                  Next            

      
      
End Choose

If  (This.Dataobject = 'dr_std_party_ageing') or (This.DataObject = 'dr_os_std_party_ageing') & 
         or (This.DataObject = 'dr_party_ageing') or (This.DataObject = 'dr_os_party_ageing') & 
                  or (This.DataObject = 'dr_std_ptyage_mfc') /*or (This.DataObject = 'dr_std_party_ageing_xamt')*/  Then//By Vaishali for not displaying parties having no data as blank line used to come --19/09/2005
            For li_i = li_rowcnt to 1 STEP -1
                  ls_data = string(dw_1.object.nest_rep[li_i].object.datawindow.data)

                        If len(ls_data) <= 0 Then
                              dw_1.object.nestedrows[li_i] = 'N' //for parties with no data should not be displayed
                              continue
                        End If
                        
                        dw_1.object.nestedrows[li_i] = 'Y' //For parties with data should be shown
                  
            Next
            
            w_repmain.dw_1.SetFilter("nestedrows = 'Y'")
            w_repmain.dw_1.Filter()
End If

If Right(This.DataObject, 4) = "_fax" Then
      Parent.Of_EnableFax("")
End If

of_enablelink(True)
      
/***********************************************/

Regards & thanks for you help

Vaishali


0
 
LVL 18

Expert Comment

by:diasroshan
ID: 16542108
hi,

first let me know, is ur nested DW retrieving rows...

next, instead of calling ue_retrievend from retrievend event of DW call it from ur window event or button click...

XP always has strange issues... did u try numbering messageboxes and placing them at specific events... cud b that certain event fires after another...  

no reason why dot notation isnt working...

Cheers,
Rosh
0
 

Author Comment

by:dolteam
ID: 16542484
Hi Rosh,

Yes, nested datawindow is retrieving the rows. But due to this grand total issue, users have to save this nested dw to excel and then in excel they give the formula to get grand total.

Secondly, our report parameter screen has OK button which opens our report window in a frame window. Like this
cb_ok clicked event has:
open(w_reportframe)
OpenSheet(w_repmain, w_reportframe, 1, Layered!)

In w_repmain we have datawindow dw_1.

In cb_ok event we assign datawindow object to dw_1 like
w_repmain.dw_1.dataobject = 'dr_std_party_ageing'

Tried with putting messagebox but no luck.

Thanks
Vaishali
0
 
LVL 18

Expert Comment

by:diasroshan
ID: 16543277
hi,

vaishali, im sure u must have tried this, but wanna check again to narrow down where exactly the problem is,

instead of assigning a DWObject,
ldwo_current     = dw_1.Object.nest_rep[li_i]

did u try changing ur code to full reference like below, at all place...          
ls_party = dw_1.Object.nest_rep[li_i].Object.party[1]
lde_ptytot   = dw_1.Object.nest_rep[li_i].Object.age_break1[1]
etc
etc
...
..
.

Cheers,
Rosh
0
 

Author Comment

by:dolteam
ID: 16602671
Hi,

We have resolved the issue. Problem was the syntax LastRowOnPage was creating problem. We were using it to check it nested dw has any row within it but now we have used ldwo_current.object.datawindow.data to check if any data exists for retrieved row. This solved our problem.

Thanks for you help.

Regards
Vaishali
0
 

Accepted Solution

by:
GranMod earned 0 total points
ID: 16868693
PAQed with points refunded (500)

GranMod
Community Support Moderator
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand column That will then direct you to their download page. From that p…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
Suggested Courses
Course of the Month13 days, 18 hours left to enroll

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question