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 there a way to share or fill the nested report from script ??

any help is welcome !!

Dimitri


0
Dimitri
5/19/2000 2:55:21 PM
sybase.powerbuilder.datawindow 28057 articles. 5 followers. Follow

4 Replies
678 Views

Similar Articles

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

Dimitri,

You can't get a handle to a nested report unless its on a composite. For
other types of nested reports you can use dot notation to get at most
properties and set the data. The huge drawback is that without a handle you
can't call functions. Therefore ShareData can't be used. However, to set the
data you can use <dwmaster>.object.<nestedreport>.data = <an array which
matches the record type of the nested report DW>. To set just one cell you
can say data[x,y] where x is the row number and y is the column number

Regards,
John Olson [TeamSybase]
Developower, Inc.

Dimitri Van der Veken wrote in message
<39jSgSaw$GA.201@forums.sybase.com>...
>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 there a way to share or fill the nested report from script ??
>
>any help is welcome !!
>
>Dimitri
>
>


0
John
5/22/2000 4:10:54 AM
Hi,

I am sorry to say that I did not succeed in inserting data in the nested
report .
Here is what I tried ("dw_list" with nested report  "dw_person" in detail
band)
   str_test lstr_test[]

   ll_rowindex = dw_1.insertrow(0)
   dw_1.object.name[ll_rowindex] = "DIMI"

      lstr_test[1].name="JAN"
      lstr_test[1].age=1
     dw_1.object.dw_person[ll_rowindex].data = lstr_test

   ll_rowindex = dw_1.insertrow(0)
   dw_1.object.name[ll_rowindex] = "GEERT"

       lstr_test[2].name="JAKE"
       lstr_test[2].age=2
       dw_1.object.dw_person[ll_rowindex].data = lstr_test

RESULT:
Instead inserting the data (JAN,1),(JAKE,2) in the nested report, the nested
reports stayed empty, and
the values "DIMI"and "GEERT" got overwritten by "JAN" and "JAKE".

Did I do something wrong??


John Olson [TeamSybase] <john.olson@developower_nospam.com> wrote in message
news:OdFJnc6w$GA.201@forums.sybase.com...
> Dimitri,
>
> You can't get a handle to a nested report unless its on a composite. For
> other types of nested reports you can use dot notation to get at most
> properties and set the data. The huge drawback is that without a handle
you
> can't call functions. Therefore ShareData can't be used. However, to set
the
> data you can use <dwmaster>.object.<nestedreport>.data = <an array which
> matches the record type of the nested report DW>. To set just one cell you
> can say data[x,y] where x is the row number and y is the column number
>
> Regards,
> John Olson [TeamSybase]
> Developower, Inc.
>
> Dimitri Van der Veken wrote in message
> <39jSgSaw$GA.201@forums.sybase.com>...
> >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 there a way to share or fill the nested report from script ??
> >
> >any help is welcome !!
> >
> >Dimitri
> >
> >
>
>


0
Dimitri
5/23/2000 6:59:49 AM
hmmm. Your syntax looks correct except that your second data assignment
should insert two rows into the nested report while your first assignment
inserts one.

I don't see how you could overwrite the dw_1.name column by assigning the
array of structures to the nested report. Did you copy and paste the syntax
into your message or just rewrite it?

 Regards,
 John Olson [TeamSybase]
 Developower, Inc.

Dimitri Van der Veken wrote in message ...
>Hi,
>
>I am sorry to say that I did not succeed in inserting data in the nested
>report .
>Here is what I tried ("dw_list" with nested report  "dw_person" in detail
>band)
>   str_test lstr_test[]
>
>   ll_rowindex = dw_1.insertrow(0)
>   dw_1.object.name[ll_rowindex] = "DIMI"
>
>      lstr_test[1].name="JAN"
>      lstr_test[1].age=1
>     dw_1.object.dw_person[ll_rowindex].data = lstr_test
>
>   ll_rowindex = dw_1.insertrow(0)
>   dw_1.object.name[ll_rowindex] = "GEERT"
>
>       lstr_test[2].name="JAKE"
>       lstr_test[2].age=2
>       dw_1.object.dw_person[ll_rowindex].data = lstr_test
>
>RESULT:
>Instead inserting the data (JAN,1),(JAKE,2) in the nested report, the
nested
>reports stayed empty, and
>the values "DIMI"and "GEERT" got overwritten by "JAN" and "JAKE".
>
>Did I do something wrong??
>
>
>John Olson [TeamSybase] <john.olson@developower_nospam.com> wrote in
message
>news:OdFJnc6w$GA.201@forums.sybase.com...
>> Dimitri,
>>
>> You can't get a handle to a nested report unless its on a composite. For
>> other types of nested reports you can use dot notation to get at most
>> properties and set the data. The huge drawback is that without a handle
>you
>> can't call functions. Therefore ShareData can't be used. However, to set
>the
>> data you can use <dwmaster>.object.<nestedreport>.data = <an array which
>> matches the record type of the nested report DW>. To set just one cell
you
>> can say data[x,y] where x is the row number and y is the column number
>>
>> Regards,
>> John Olson [TeamSybase]
>> Developower, Inc.
>>
>> Dimitri Van der Veken wrote in message
>> <39jSgSaw$GA.201@forums.sybase.com>...
>> >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 there a way to share or fill the nested report from script ??
>> >
>> >any help is welcome !!
>> >
>> >Dimitri
>> >
>> >
>>
>>
>
>


0
John
5/23/2000 7:34:03 AM
Hi ,

I found a way to make it work:
    str_test lstr_test

   dw_1.insertrow(0)
   dw_1.object.name[1] = "DIMI"
   dw_1.insertrow(0)
   dw_1.object.name[2] = "GEERT"

       lstr_test[1].name="JAN"
       lstr_test[1].age=1
       dw_1.object.dw_person[1].data = lstr_test

       lstr_test[2].name="JAKE"
       lstr_test[2].age=2
       dw_1.object.dw_person[2].data = lstr_test

When I first insert and edit all the rows in the primary report and after
that all the data in the nested report, then all works fine.

Thanks for the help!

Dimi


Dimitri Van der Veken <dimitri@servico.be> wrote in message
news:oQAYhbIx$GA.201@forums.sybase.com...
> Hi,
>
> I am sorry to say that I did not succeed in inserting data in the nested
> report .
> Here is what I tried ("dw_list" with nested report  "dw_person" in detail
> band)
>    str_test lstr_test[]
>
>    ll_rowindex = dw_1.insertrow(0)
>    dw_1.object.name[ll_rowindex] = "DIMI"
>
>       lstr_test[1].name="JAN"
>       lstr_test[1].age=1
>      dw_1.object.dw_person[ll_rowindex].data = lstr_test
>
>    ll_rowindex = dw_1.insertrow(0)
>    dw_1.object.name[ll_rowindex] = "GEERT"
>
>        lstr_test[2].name="JAKE"
>        lstr_test[2].age=2
>        dw_1.object.dw_person[ll_rowindex].data = lstr_test
>
> RESULT:
> Instead inserting the data (JAN,1),(JAKE,2) in the nested report, the
nested
> reports stayed empty, and
> the values "DIMI"and "GEERT" got overwritten by "JAN" and "JAKE".
>
> Did I do something wrong??
>
>
> John Olson [TeamSybase] <john.olson@developower_nospam.com> wrote in
message
> news:OdFJnc6w$GA.201@forums.sybase.com...
> > Dimitri,
> >
> > You can't get a handle to a nested report unless its on a composite. For
> > other types of nested reports you can use dot notation to get at most
> > properties and set the data. The huge drawback is that without a handle
> you
> > can't call functions. Therefore ShareData can't be used. However, to set
> the
> > data you can use <dwmaster>.object.<nestedreport>.data = <an array which
> > matches the record type of the nested report DW>. To set just one cell
you
> > can say data[x,y] where x is the row number and y is the column number
> >
> > Regards,
> > John Olson [TeamSybase]
> > Developower, Inc.
> >
> > Dimitri Van der Veken wrote in message
> > <39jSgSaw$GA.201@forums.sybase.com>...
> > >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 there a way to share or fill the nested report from script ??
> > >
> > >any help is welcome !!
> > >
> > >Dimitri
> > >
> > >
> >
> >
>
>


0
Dimitri
5/29/2000 7:32:06 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 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...

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( & ...

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 ...

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_...

How to get data from nested report in datawindow?
I am using PB6.5 I used an nested report in current datawindow to get some data from database and I need to use data retrieved from nested report to compute in current window , and I do not how? Any help is apreciated... Mladen Mladen, If your nested report is on a composite DW and it doesn't itself have nested reports in it then you can use GetChild() to get a ref to the nested report then use the ref to call typical DW functions. Use those functions to grab the data and do what you want with it. If GetChild() doesn't work (because your DW doesn't match...

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. 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...

Get the child of a Nested report in a tabular Datawindow ( possible, but... )
Hi, I'm using PB 5.0.04, I have a nested report within a tabular DataWindow. I need to change several properties of nested report. GetChild(), comonly used, can't get the child, it returns -1. But, If i do that : After the Retrieve() of dw_tabular... DataWindowChild ldwc_nested dw_tabular.Modify( "DataWindow.processing = 5" ) dw_tabular.GetChild( "nested_report_object", ldwc_nested ) dw_tabular.Modify( "DataWindow.processing = 0" ) ldwc_nested is a DataWindowChild that handles the nested report. I can do any ldwc_nested.Describe( &...

How to use getChild() function to get the reference to a nested report?
Hi, There, I am tring to use getChild() function to get a reference to a nested report. Base dataWindow and nested report are SQL source datawindows. When this function is called, it returns -1. Any tips? Thanks. De Liu dliu@novell.com If you are not using Composite Datawindow you CAN NOT obtain handles to your report objects De Liu wrote in message <3491C53A.512D@novell.com>... >Hi, There, > >I am tring to use getChild() function to get a reference to a nested >report. Base dataWindow and nested report are SQL source datawindows. >When this function i...

Getting SqlSelect from a nested report in a datawindow via a datastore
The title says it all... I've got a free form datawindow with a nested report. I'm calling it via a datastore and I can't see to be able to get the sql statement out and back for the nested report in the datastore. Direction? Chris Well, it's still a little confusing. Let me guess at a cause, though. Are you trying GetChild() on the nested report to get its handle? If so, it doesn't work in nested reports. The only sql you'll be able to extract is that of the base report, the freeform. Let me know more in the case that I've totally misunderstood ...

Web resources about - getting the reference to a nested report - sybase.powerbuilder.datawindow

Wikipedia talk:Reference desk/Guidelines/Medical advice - Wikipedia, the free encyclopedia
I disagree with this implication that this section of the guideline represents the consensus. If you look at the last few years of discussion ...

Child sex abuse royal commission: Senior politician to be grilled over reference
A former deputy Premier will again take the stand on Tuesday to explain why he gave a positive job reference to a man he knew to have sexually ...

VA, reference pricing and the value of options
@hyperplanes eg, you can get free care at VA, or get a reimbursed at the reference price for care anywhere else. — Matthew Martin (@hyperplanes) ...

10 of the best movie references you’ll ever see in popular TV shows
I'm torn when it comes to breaking the fourth wall in TV shows . It can be a fun, clever way to connect with the audience, but it can also break ...

"As much as Poppy Bush scoffs at 'the D-word,' as he calls any reference to dynasty, the Bushes do consider ...
... re-defended myself: "Servants" seems like the right word for people who occupy the servants' quarters within a house, especially when the reference ...

'Enough with the Viagra references,' says the CEO behind the first FDA approved drug to boost women's ...
... the Fortune Most Powerful Women Next Gen conference. But the reaction to the pill still confounded her. "Enough already with the Viagra references," ...

Donald Trump prompts Nazi references
Some conservatives and political commentators say the GOP frontrunner's rhetoric has crossed the line

Arrow: Easter Eggs and DC Comics References in "Brotherhood"
This was a weird week for Arrow, in terms of the crazy minutia we generally look for.There were a [...]

Now you can bookmark Google image searches for later reference
Normally, image searches on Google are ephemeral things and gone the moment you close the browser tab. However, a new feature on the search giant's ...

The 5 Best Britney Spears References From Her 'Jane the Virgin' Visit
The 5 Best Britney Spears References From Her 'Jane the Virgin' Visit

Resources last updated: 12/7/2015 8:40:04 PM