Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Help with composite data windows

1 view
Skip to first unread message

Thomas Gagne

unread,
Aug 10, 1995, 3:00:00 AM8/10/95
to

Where in the documentation does it tell me how to construct
a composite data window and properly retrieve the data for those
two sub-windows? What if those two datawindows require arguments?

Does anybody use composite datawindows?
--
Thomas Gagne

Ro...@rc7151.sbc.com

unread,
Aug 16, 1995, 3:00:00 AM8/16/95
to

Look under GetChild().
I've done what you're talking about. You need to name the reports
when you make the composit dw. You can then use those names with
GetChild() to get a handle to the individual reports. Then simply
do a retrieve for each of the reports that have arguments before
doing the retrieve on the composit.

DataWindowChild dwc_nest1, dwc_nest2
dw_composit.getChild("report_name1", dwc_nest1)
dw_composit.getChild("report_name2", dwc_nest2)

dwc_nest1.settransobject(sqlca)
dwc_nest2.settransobject(sqlca)

dwc_nest1.retrieve(arg1, arg2)
dwc_nest2.retrieve(arg3)
dw_composit.retrieve()

HTH
Roger

Richard Gillespie

unread,
Aug 18, 1995, 3:00:00 AM8/18/95
to
In article <412fti$d...@pipe1.nyc.pipeline.com>,
eba...@nyc.pipeline.com (Edward Barlow) wrote:
>I think there is more to composite reports than is explained anywhere.
>Powerbuilder is seriously lacking documentation on this subject. I have
>been beating my brains against the wall
>for the past week - help....
>
>1) I have figured out that all reports need same print sizing otherwise
>report looks really messed up
>

Yep. Actually, this 'feature' is listed as a one-line tip somewhere in the
documentation. You shoulda seen what one of my colleagues went through to get
a report to work when he had the unit sizes on nested reports different from
the composite 'master' report. Impressed the hell out of me that he got it to
work.


>2) I name the reports and then use getchild and retrieve the children.
>Code example follows, and it looks right but FAILS. I get a request to the
>screen for retrieval arguments when I do the getchild function???? It then
>gives a GPF. HELP??? They need some examples...
>
>All I want is to pass a single argument to every dw in the nested report...
>
>Ed
>------------------
>int rc
>string user_view
>DataWindowChild ch1,ch2,ch3
>user_view="SYBASE"
>
>rc = dw_sheet.GetChild( "rpt1" ,ch1)
>if rc = -1 then MessageBox("Error","No Child Window")
>rc = dw_sheet.GetChild("rpt2",ch2)
>if rc = -1 then MessageBox("Error","No Child Window")
>rc = dw_sheet.GetChild("rpt3",ch3)
>if rc = -1 then MessageBox("Error","No Child Window")
>
>// Gets child 2 and three at this stage
>ch1.SetTransObject(sqlca)
>ch2.SetTransObject(sqlca)
>ch3.SetTransObject(sqlca)
>ch1.Retrieve( user_view )
>ch2.Retrieve(user_view)
>ch3.Retrieve(user_view)
>


More importantly, this is the hard way. Try a right-click on the body of the
composite 'master' report. One of the selections will be 'retrieval
arguments.' Here, all of the retrieval arguments to be used by the nested
subreports. It does'nt matter if each report does not use ALL of the
specified retrieval arguments.
On each nested report, repeat the right click. Again you will be shown a
selection to choose retrieval arguments. When you assign a retrieval argument
for the nested subreport, use the appropriate argument that you specified when
you built the composite report arguments.

Hope this works for you,
Richard Gillespie


_______________________________________________
These Comments are MINE!. MINE! MINE! MINE!. |
They certainly do not reflect the beliefs of |
the organization with which I am employed; |
anyone who knows me would be among the |
first to agree! |
Return Address rgill...@pepco.com |
______________________________________________|

Edward Barlow

unread,
Aug 18, 1995, 3:00:00 AM8/18/95
to
I think there is more to composite reports than is explained anywhere.
Powerbuilder is seriously lacking documentation on this subject. I have
been beating my brains against the wall
for the past week - help....

1) I have figured out that all reports need same print sizing otherwise
report looks really messed up

2) I name the reports and then use getchild and retrieve the children.
Code example follows, and it looks right but FAILS. I get a request to the
screen for retrieval arguments when I do the getchild function???? It then
gives a GPF. HELP??? They need some examples...

All I want is to pass a single argument to every dw in the nested report...

Ed
------------------
int rc
string user_view
DataWindowChild ch1,ch2,ch3
user_view="SYBASE"

rc = dw_sheet.GetChild( "rpt1" ,ch1)
if rc = -1 then MessageBox("Error","No Child Window")
rc = dw_sheet.GetChild("rpt2",ch2)
if rc = -1 then MessageBox("Error","No Child Window")
rc = dw_sheet.GetChild("rpt3",ch3)
if rc = -1 then MessageBox("Error","No Child Window")

// Gets child 2 and three at this stage
ch1.SetTransObject(sqlca)
ch2.SetTransObject(sqlca)
ch3.SetTransObject(sqlca)
ch1.Retrieve( user_view )
ch2.Retrieve(user_view)
ch3.Retrieve(user_view)

--
Edward Barlow eba...@pipeline.com
Check out My Sybase Library: http://sybase.pnl.gov:2080/Sybase/barlow/
Commercial Sybase Tools Forthcoming

Ken Nelson

unread,
Aug 21, 1995, 3:00:00 AM8/21/95
to
In <412fti$d...@pipe1.nyc.pipeline.com> eba...@nyc.pipeline.com (Edward

Barlow) writes:
>
>I think there is more to composite reports than is explained
anywhere.
>Powerbuilder is seriously lacking documentation on this subject. I
have
>been beating my brains against the wall
>for the past week - help....
>
>1) I have figured out that all reports need same print sizing
otherwise
>report looks really messed up
>

Ya, this is true, but it kinda makes sense...

>2) I name the reports and then use getchild and retrieve the children.

>Code example follows, and it looks right but FAILS. I get a request to
the
>screen for retrieval arguments when I do the getchild function???? It
then
>gives a GPF. HELP??? They need some examples...

Don't use getchild. Instead open your composite data window, right
mouse click on the datawindow there is an item called Retrieval
Arguements. These are place holders for the child datawindow retrieval
arguments. Works as all retrieval argument boxes work.

Next select a child datawindow, right mouse click. On the menu there
is an item called Retrieval Arguments. Match the retrieval arguements
for the child with ones you just created for the parent.

Next get rid of all of your get child code. And retrieve your parent
datawindow with the arguements. Done...


Ken
nels...@ix.netcom.com

0 new messages