1. systems tcc
  2. PowerBuilder
  3. Friday, 13 November 2020 06:32 AM UTC

Hi,

 

I have a datawindow "dw_1" for purchase enquiry report. 

 

in dw_1 , there is a dataobject "r_enqlist" which is dynamically set.

 

in r_enqlist there are two dataobjects "r_enqdetails" and "r_enq_annexure"

 

When i retrieve dw_1 i get a single report with enquiry details of multiple parties. I want to filter this report for a single party by clicking a button placed in the window.

 

How can i achieve that ?

I assume that dw_child cannot be used with nestd datawindow.

 

please help.

 

 

 

 

 

 

systems tcc Accepted Answer Pending Moderation
  1. Saturday, 14 November 2020 04:41 AM UTC
  2. PowerBuilder
  3. # 1

 

 

Hi

 

I have a datawindow dw_1. The data object for  this datawindow  "r_enqlist" is set at run time. 

 

r_enqlist has two data windows dw_1 and dw_2.

 

dw_1 has data object r_enqdetails and i want to filter this datawindow.

 

When i  alert  Messagebox("Alert",String(dw_1.object.dw_2.dataobject)) r_enqdetails is being displayed.

When i  alert Messagebox("Alert",String(dw_1.Object.dw_2.Object.DataWindow.Column.Count)), i get correct column count of r_enqdetails .

 

So I think I get the correct reference to it. But when i try to filter it by 

 

dw_1.object.dw_2.object.filter(). I get error "error accessing external object property.....".

 I also tried with some change like dw_1.object.dw_2.filter() but got same error.

 

Hope it is clear to you. 

 

If you still need screenshots i shall attach them.

 

Please help

 

 

 

Comment
  1. Chris Pollach @Appeon
  2. Saturday, 14 November 2020 13:42 PM UTC
Hi;

You cannot use a command like Filter () in DW DOT notation. You would need to use a GetChild() command to get a pointer to the child DWO and then issue the filter from there.

Regards ... Chris
  1. Helpful
  1. Olan Knight
  2. Sunday, 15 November 2020 18:52 PM UTC
Yes, exactly. :)
  1. Helpful
There are no comments made yet.
Olan Knight Accepted Answer Pending Moderation
  1. Friday, 13 November 2020 14:00 PM UTC
  2. PowerBuilder
  3. # 2

Another trick is to use two DWOs and share them, making the primary DWO a grid format and the display DWO whatever format you need. Filter the primary.

Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Friday, 13 November 2020 10:12 AM UTC
  2. PowerBuilder
  3. # 3

Hi,

To understand well what you mean, it would be very helpful if you could make a dummy window with your report / datawindow and the nested reports and attach it here

In the help on GetChild():

Nested reports

"You cannot use GetChild to get a reference to a report in a composite DataWindow when the report itself is a composite or nested DataWindow."

 

There might be a little trick to get around that limitation by doing a Modify and change the type of dw to be temporarily of type Grid, if I recall well (processing attribute). I'm not sure if this is what is limiting you, hence the request for you to attach a sample app, so I can try out the "little trick".

 

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.