How to change text in a text object of composite report.

--------------B06487694CA25DFE68949459
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi,
In composite report I need dynamicaly change some text fields' values. I
tried to get child and used dot notation., but it didn't work. bellw is
the code. What is wromg?
string ls_name
SELECT frb_label_txt
INTO   :ls_name
FROM   srt_lvl_typ_cd_dfn
WHERE  typ_cd_ind = "2" AND dist_cd = :gs_dist;
Datawindowchild dwc_report
dw_1.GetChild("d_nonofficer",dwc_report)
dwc_report.Object.level3_t.text = ls_name




--------------B06487694CA25DFE68949459
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<HTML>
Hi,
<BR>In composite report I need dynamicaly change some text fields' values.
I tried to get child and used dot notation., but it didn't work. bellw
is the code. What is wromg?
<BR>string ls_name
<BR>SELECT frb_label_txt
<BR>INTO&nbsp;&nbsp; :ls_name
<BR>FROM&nbsp;&nbsp; srt_lvl_typ_cd_dfn
<BR>WHERE&nbsp; typ_cd_ind = "2" AND dist_cd = :gs_dist;
<BR>Datawindowchild dwc_report
<BR><B>dw_1.GetChild("d_nonofficer",dwc_report)</B>
<BR><B>dwc_report.Object.level3_t.text = ls_name</B><B></B>

<P>&nbsp;
<BR>&nbsp;</HTML>

--------------B06487694CA25DFE68949459--

0
Henry
5/14/1999 7:15:10 PM
sybase.powerbuilder.datawindow 28057 articles. 4 followers. Follow

3 Replies
1027 Views

Similar Articles

[PageSpeed] 45

Henry,

The code you have written seems to be fine. I suspect that for the first
argument to the dw_1.GetChild function , you may have specified the
datawindow object name instead of  a report name. To specify a report
name, right click on the report in the dw and click on properties.

Thanks

John.


Henry Dilsky wrote:

>  Hi,
> In composite report I need dynamicaly change some text fields' values.
> I tried to get child and used dot notation., but it didn't work. bellw
> is the code. What is wromg?
> string ls_name
> SELECT frb_label_txt
> INTO   :ls_name
> FROM   srt_lvl_typ_cd_dfn
> WHERE  typ_cd_ind = "2" AND dist_cd = :gs_dist;
> Datawindowchild dwc_report
> dw_1.GetChild("d_nonofficer",dwc_report)
> dwc_report.Object.level3_t.text = ls_name
>
>
>



0
John
5/14/1999 10:10:47 PM
Henry,

You are right the report is read only. Hence it does not allow to change the
text content.
Also Object is not a valid property for DatawindowChild.

Thanks

John

Henry Dilsky wrote:

> John,
> Thank you for your reply. I checked the  report name again. It was right, I
> used the name of the report not a datawindow. When I used GetRow () function
> it returned right value. It does not work only when I tried to change a
> properties of the child datawindow. Maybe it's in read only mode?
> Thanks,
>
> Henry
> John Zachariah wrote:
>
> > Henry,
> >
> > The code you have written seems to be fine. I suspect that for the first
> > argument to the dw_1.GetChild function , you may have specified the
> > datawindow object name instead of  a report name. To specify a report
> > name, right click on the report in the dw and click on properties.
> >
> > Thanks
> >
> > John.
> >
> > Henry Dilsky wrote:
> >
> > >  Hi,
> > > In composite report I need dynamicaly change some text fields' values.
> > > I tried to get child and used dot notation., but it didn't work. bellw
> > > is the code. What is wromg?
> > > string ls_name
> > > SELECT frb_label_txt
> > > INTO   :ls_name
> > > FROM   srt_lvl_typ_cd_dfn
> > > WHERE  typ_cd_ind = "2" AND dist_cd = :gs_dist;
> > > Datawindowchild dwc_report
> > > dw_1.GetChild("d_nonofficer",dwc_report)
> > > dwc_report.Object.level3_t.text = ls_name
> > >
> > >
> > >



0
John
5/17/1999 12:26:31 PM
John,
Thank you for your reply. I checked the  report name again. It was right, I
used the name of the report not a datawindow. When I used GetRow () function
it returned right value. It does not work only when I tried to change a
properties of the child datawindow. Maybe it's in read only mode?
Thanks,

Henry
John Zachariah wrote:

> Henry,
>
> The code you have written seems to be fine. I suspect that for the first
> argument to the dw_1.GetChild function , you may have specified the
> datawindow object name instead of  a report name. To specify a report
> name, right click on the report in the dw and click on properties.
>
> Thanks
>
> John.
>
> Henry Dilsky wrote:
>
> >  Hi,
> > In composite report I need dynamicaly change some text fields' values.
> > I tried to get child and used dot notation., but it didn't work. bellw
> > is the code. What is wromg?
> > string ls_name
> > SELECT frb_label_txt
> > INTO   :ls_name
> > FROM   srt_lvl_typ_cd_dfn
> > WHERE  typ_cd_ind = "2" AND dist_cd = :gs_dist;
> > Datawindowchild dwc_report
> > dw_1.GetChild("d_nonofficer",dwc_report)
> > dwc_report.Object.level3_t.text = ls_name
> >
> >
> >



0
Henry
5/17/1999 1:48:06 PM
Reply: