Getting a reference/handle to nesteds reports

I have a datawindow with several nested reports.

I wish to get a handle to each of them and then try and export their 
contents to flat text.

I thought <dw_control>.getchild(<'name of nested report'>,<datawindowchild 
variable>) would work, but it returns a -1.

I'm using PB6.5, Windows2000 Pro.
0
Stuart_O
2/12/2001 12:29:00 PM
sybase.powerbuilder.datawindow 28057 articles. 5 followers. Follow

5 Replies
720 Views

Similar Articles

[PageSpeed] 42
Get it on Google Play
Get it on Apple App Store

It is absolutely correct and must work.
Check for the correctness of 'name of nested report'.




Stuart_O'_Donnell wrote:

> I have a datawindow with several nested reports.
>
> I wish to get a handle to each of them and then try and export their
> contents to flat text.
>
> I thought <dw_control>.getchild(<'name of nested report'>,<datawindowchild
> variable>) would work, but it returns a -1.
>
> I'm using PB6.5, Windows2000 Pro.

0
Vladimir
2/12/2001 3:44:14 PM
The datawindow is not of type composite.  There are other objects like 
columns, computed fields, etc. as well as nested reports.

I think you can only get a reference or handle to a nested report if the 
datawindow that has the nested report is a datawindow of type composite.
0
Stuart_O
2/12/2001 5:03:00 PM
Stuart,

    You can not get handle (datawindowchild) to the subreports
in nested reports. PB help says:

GetChild method (DataWindows)
====================================
Provides a reference to a child DataWindow or to a report in
a composite DataWindow, which you can use in DataWindow
functions to manipulate that DataWindow or report.
====================================

As we see it specifically says about composite. And the reason is
probably that each instance of a child has its own data, etc.. So if
it would be possible we would need an array of such handles.

    You can however manipulate properties and data of nested
objects using DW direct syntax reference (dot notation). Like
this:

dw_1.Object.NestRep[2].Object.Data =  dw_2.Object.Data

This example is from the "DataWindow Reference" PB manual.
You can manipulate data on the row level as well. Here we see
that we "address" the child with a row qualification.







Vladimir Gendler wrote:

> It is absolutely correct and must work.
> Check for the correctness of 'name of nested report'.
>
> Stuart_O'_Donnell wrote:
>
> > I have a datawindow with several nested reports.
> >
> > I wish to get a handle to each of them and then try and export their
> > contents to flat text.
> >
> > I thought <dw_control>.getchild(<'name of nested report'>,<datawindowchild
> > variable>) would work, but it returns a -1.
> >
> > I'm using PB6.5, Windows2000 Pro.

0
Vladimir
2/12/2001 6:04:25 PM
You can see the example of referencing nested reports
in PB examples among DataWindows|Retrieval|Referensing Nested Reports,
window w_nested_reference OK button script.




Vladimir Gendler wrote:

> Stuart,
>
>     You can not get handle (datawindowchild) to the subreports
> in nested reports. PB help says:
>
> GetChild method (DataWindows)
> ====================================
> Provides a reference to a child DataWindow or to a report in
> a composite DataWindow, which you can use in DataWindow
> functions to manipulate that DataWindow or report.
> ====================================
>
> As we see it specifically says about composite. And the reason is
> probably that each instance of a child has its own data, etc.. So if
> it would be possible we would need an array of such handles.
>
>     You can however manipulate properties and data of nested
> objects using DW direct syntax reference (dot notation). Like
> this:
>
> dw_1.Object.NestRep[2].Object.Data =  dw_2.Object.Data
>
> This example is from the "DataWindow Reference" PB manual.
> You can manipulate data on the row level as well. Here we see
> that we "address" the child with a row qualification.
>
> Vladimir Gendler wrote:
>
> > It is absolutely correct and must work.
> > Check for the correctness of 'name of nested report'.
> >
> > Stuart_O'_Donnell wrote:
> >
> > > I have a datawindow with several nested reports.
> > >
> > > I wish to get a handle to each of them and then try and export their
> > > contents to flat text.
> > >
> > > I thought <dw_control>.getchild(<'name of nested report'>,<datawindowchild
> > > variable>) would work, but it returns a -1.
> > >
> > > I'm using PB6.5, Windows2000 Pro.

0
Vladimir
2/12/2001 6:20:29 PM
Thankyou thankyou thankyou.....it now works fine for what i want to do.

in the end it look something like : 

dw_import_raw.object.report2.object.report1.object.datawindow.data

....and so on.....
...it looks complicated but when you break it down and parse through what 
you are writing it is ok.

Again...thanks!!
0
Stuart_O
2/13/2001 11:11:07 AM
Reply:

Similar Artilces:

Urgent
Dear all, I'm using PB 6.5.1. I have a report with the following layout: Datawindow A contain Datawindow B, Datawindow B contain Datawindow C And I want to get a reference to Datawindow C. However, I tried to use GetChild() for Datawindow B. It retured -1. Thus, I also tried to get another Datawindow D which is nested in Datawindow A and no nested datawindow nested in it. Then, using GetChild is worked for this case. Am I missing something?? is there any other way round?? Any ideas or suggestion are welcome. Thanks in Advance. Best Regards, Andy Cheung ...

How can I get the reference of nested report in datawindow?
I will like to insert or modify data in nested report. I am using pb65. thanks. simon Simon, Reference the DataWindow's GetChild() function in the on-line help. HTH Mark DeRosa CPD simon wrote in message ... >I will like to insert or modify data in nested report. >I am using pb65. > >thanks. > >simon > > GetChild() can only get reference to dddw or to a report in a composite dw. it can't get reference to nested report. simon Use the dot notation. e.g. dw_1.Object.nt_cutomer.Object.Data = dw_customer.Object.D...

Reference a datawindow object (nested report) in a datawindow
Is it possible to reference a datawindow object in a datawindow? My scenario : I have a datawindow (composite) which holds another datawindow (nested report). This child datawindow has a OLE ActiveX object which I am trying to access from the window which holds the composite datawindow. The reason for this is because I need to access the ActiveX properties/functions after the composite datawindow have been retrieved. I've tried to get a reference to the child datawindow : //DataWindowChild dwc_activex dw1.getchild("dw_activex", dwc_activex) But as datawi...

Get Reference to a nested datawindow
Hi all!... I have a little problem. I 'm using PB 8 and i need to get reference to a nested dw in a main dw. I have main datawindow, say dw_print, and a nested dw called dw_1. I'm trying to use dot syntax to get reference to nested datawindow dw_1, as i have read in old posts, but i take an error when applying this solution. In the old posts (relatively to PB 7) someone suggested to use this notation: ====================================================== dwcontrol.Object.nestedcontrolname { [row ] } .Object.dwcontrolname. & property { .property } { = value }...

getting the reference to a nested report
Hi, I have a tabular report (dw_list) with in the detail band a nested report (dw_nested). How can I get a reference to the nested report?? In a composite report one can do something like: datawindowchild ldwc dw_composite.getchild("nameNestedReport",ldwc) ldwc.SetTransObject(SQLCA) ldwc.insertrow(0) ... (or one can use sharedata to fill the nested report) However, if dw_list is not a composite report, dw_list.getchild("nameNestedReport",ldwc) DOES NOT WORK Is there a way to get the reference to the nested report?? Is the...

Getting reference to nested reports
In PB 6.5, I can't do a GetChild to get access to a nested report, unless the DW is a Composite. Anyone know if that has changed in PB 7/8? The limitation is still there in 7.x and 8.0. -- <hopethishelps /> Roy Kiesler [TeamSybase] mySybase -- http://my.sybase.com http://www.exp.com/app/expertProfile?expertID=512231 "Jim Deerkoski" <jimdeer@hotmail.com> wrote in message news:E4m5U0rSBHA.210@forums.sybase.com... > In PB 6.5, I can't do a GetChild to get access to a nested report, unless > the DW is a Composite. > > Anyone know i...

Getting a handle on a nested report PB8
I have a datawindow dw_rep whose dataobject I set at runtime: dw_rep.DataObject = 'dw_report' In dw_report there is a nested report dw_1 with report name d_clients_pnt What I need to do is change the text on a checkbox in d_clients_pnt. I was thinking of something like dwc_cl.Modify("cat4.checkbox.Text='new text'") I have tried getting a handle on d_clients_pnt with dw_rep.GetChild('dw_1', dwc_cl) or dw_rep.GetChild('d_clients_pnt', dwc_cl) but both return -1. Please how can I change this checkbox text? Thanks, Gerry. Can't...

Localization, How to get handle for nested datawindow
Hello There, We are in the process of localizating our application and I'm facing a road block with nested datawindow. I know that GetChild() doesn't return datawindow handle for a nested datawindow. I have decided to use Jacek Furmankiewicz approach to localization our current application ( http://www.sys-con.com/pbdj/archives2/0906/furmankiewicz/ ) i.e. I have written ORCA script to Pre-pending resouceID to the existing text. I have written a function which scans all the controls on the datawindow at runtime and than for each control I fetch the reso...

How to get reference of a nested report in a dw?
Hi, I can use GetChild() method to get reference of report in a composite dw, but it failed(return -1) to get reference of nested report in a dw. How can i get reference of a nested report in a dw? Best Regards Johnson Here is the example in powerbuilder help : In this example, dw_1 is composite report, emp_state is the name of the nested report (datawindowchild) and state_child is the reference to this datawindowchild. DataWindowChild state_child integer rtncode rtncode = dw_1.GetChild('emp_state', state_child) IF rtncode = -1 THEN MessageBox( & ...

Help getting a handle to a nested report
I am trying to get a handle to a nested report in a datawindow, and not having any success. I am using the following syntax. ll_ret_cd = dw_1.GetChild("dw_nest", ldwc_child) This code returns -1. How do I get a handle to the nested datawindow in a composite report. I tried looking at the help and following their example, but that did not work out. Am I missing something? This is the first time I have tried this. I am using PowerBuilder 7 Build 8046. In the composit datawindow you need to name the sub dw. Use that name in the getchild Bill <billa@legac...

Getting a reference to a nested report object.
Hi guys, Anyone know a way of getting a reference to a nested report object. I almost want to do something like reportObjectDataType reportObject for i = rows to 0 step -1 reportObect = dw_main.GetItemReport('nested_report_name', rownumber) var = reportObject.value if var = 'this' then dw_main.deleteRow(i) end if next I realise that this won't work but hope it shows what I am trying to do... Could really use some help, it will be a mission to change the report to to return the rows I dont' want in the first place (belive it...

how can i get a reference to a nested report?
TIA -- Savoulidis Iordanis Athens - Greece Look at the online help for the GetChild ( ) and datawindowchild object type. Savoulidis Iordanis wrote in message ... > >TIA >-- >Savoulidis Iordanis >Athens - Greece > > Getchild concerns only composite reports and dddws. Not what I need. I want to use RowsCopy() getting the rows from a NESTED report. You need to use dot notation. Suppose you have datawindowcontrol dw_1 which contains a nested report called d_report in the column col_report. dw_1.Object.col_report[1].Object.d_report dw_...

Getting a reference to a DW in a nested report
I need to get a reference to a datawindow in a nested report. The format (dw_1.Object.rpt_1) gets me a dwObject reference. I need an actual datawindow reference. Please, no off the cuff answers (and flat out uninformed answers). TeamPS preferred. Mail or post answer (preferably both) at wmarshal@ca.coopers.com. Wade Marshall Coopers & Lybrand Consulting Edmonton, AB, Canada. Wade, There are quite a few restrictions when dealing with nested DWs. Is this a true nest (i.e., an instance per master row), or a nest inside a composite? You can get a child handle on a nest ...

Localization, How to get handle for nested datawindow
Hello There, We are in the process of localizating our application and I'm facing a road block with nested datawindow. I know that GetChild() doesn't return datawindow handle for a nested datawindow. I have decided to use Jacek Furmankiewicz approach to localization our current application ( http://www.sys-con.com/pbdj/archives2/0906/furmankiewicz/ ) i.e. I have written ORCA script to Pre-pending resouceID to the existing text. I have written a function which scans all the controls on the datawindow at runtime and than for each control I fetch the reso...

Web resources about - Getting a reference/handle to nesteds reports - sybase.powerbuilder.datawindow

Resources last updated: 11/29/2015 9:47:02 PM