Modify("DataWindow.Table.Select='...'") of nested report fails

This is a multi-part message in MIME format.

------=_NextPart_000_0129_01C2686C.21557300
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello,

I have a problem with a nested report inside a composite report.

The main report is a freeform with a nested grid report inside.
I have converted the main report to a composite using the PROCESSING=3D5 =
in the SRD export file.

I want to modify the SQL select of the nested report just before the =
main report is retrieved.
This is done the following way:

DataWindowChild ldwc_nested
Integer li_ret
string ls_New_syntax
string ls_Ori_Syntax, ls_before_retrieve, ls_after_retrieve

ls_New_syntax =3D ... // new syntax of nested report
li_ret =3D dw_master.GetChild(r_nested, ldwc_nested )
if li_ret =3D -1 then
// display error
return
end if

// save the original select, and mofify the sqlsyntax
ls_ori_syntax=3D ldwc.Describe("DataWindow.Table.SQLSelect")
ldwc.Modify("DataWindow.Table.Select=3D'"+ls_new_syntax+"'")
ls_before_retrieve =3D ldwc.Describe("DataWindow.Table.SQLSelect")

// retrieve the master
dw_master.Retrieve()

// check the sqlsyntax now
li_ret =3D dw_master.GetChild(r_nested, ldwc_nested )
if li_ret =3D -1 then
// display error
return
end if
ls_after_retrieve =3D ldwc.Describe("DataWindow.Table.SQLSelect")


When I run this code:
- ls_ori_syntax contains the original select of the nested report
- the modify works because ls_before_retrieve =3D ls_new_syntax

When I retrieve the master report, the nested report hasn't been =
retrieved with the new syntax but with the original one, because the =
data I get isn't what i expect it to be. To verify my statement, I have =
checked the SQLSyntax after the retrieve, and I see that =
ls_after_retrieve =3D ls_ori_syntax

Does anybody know why the syntax is replaced with the original one with =
the retrieve ?=20
Is there any other way to change the SQL of the nested report ?=20
All i need to do is to add a few extra items to the where clause, and it =
can only be done at runtime

Thanx for any help
FredericH


------=_NextPart_000_0129_01C2686C.21557300
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.3315.2870" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>Hello,<BR><BR>I have a problem with a =
nested report=20
inside a composite report.<BR><BR>The main report is a freeform with a =
nested=20
grid report inside.<BR>I have converted the main report to a composite =
using the=20
PROCESSING=3D5 in the SRD export file.<BR><BR>I want to modify the SQL =
select of=20
the nested report just before the main report is retrieved.<BR>This is =
done the=20
following way:</FONT></DIV>
<DIV><BR><FONT face=3DArial size=3D2><FONT color=3D#0000ff=20
face=3D"Courier New">DataWindowChild ldwc_nested<BR>Integer =
li_ret<BR>string=20
ls_New_syntax<BR>string ls_Ori_Syntax, ls_before_retrieve,=20
ls_after_retrieve<BR><BR>ls_New_syntax =3D ... // new syntax of nested=20
report<BR>li_ret =3D dw_master.GetChild(r_nested, ldwc_nested )<BR>if =
li_ret =3D -1=20
then<BR>// display error<BR>return<BR>end if<BR><BR>// save the original =
select,=20
and mofify the sqlsyntax<BR>ls_ori_syntax=3D=20
ldwc.Describe("DataWindow.Table.SQLSelect")<BR>ldwc.Modify("DataWindow.Ta=
ble.Select=3D'"+ls_new_syntax+"'")<BR>ls_before_retrieve=20
=3D ldwc.Describe("DataWindow.Table.SQLSelect")<BR><BR>// retrieve the=20
master<BR>dw_master.Retrieve()<BR><BR>// check the sqlsyntax =
now<BR>li_ret =3D=20
dw_master.GetChild(r_nested, ldwc_nested )<BR>if li_ret =3D -1 =
then<BR>// display=20
error<BR>return<BR>end if<BR>ls_after_retrieve =3D=20
ldwc.Describe("DataWindow.Table.SQLSelect")<BR><BR><BR></FONT>When I run =
this=20
code:<BR>- ls_ori_syntax contains the original select of the nested =
report<BR>-=20
the modify works because ls_before_retrieve =3D =
ls_new_syntax<BR><BR>When I=20
retrieve the master report, the nested report hasn't been retrieved with =
the new=20
syntax but with the original one, because the data I get isn't what i =
expect it=20
to be. To verify my statement, I have checked the SQLSyntax after the =
retrieve,=20
and I see that <FONT color=3D#0000ff face=3D"Courier =
New">ls_after_retrieve =3D=20
ls_ori_syntax<BR></FONT><BR>Does anybody know why the syntax is replaced =
with=20
the original one with the retrieve ? </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Is there any other way to change the =
SQL of the=20
nested report ? </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>All i need to do is to add a few extra =
items to the=20
where clause, and it can only be done at runtime</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanx for any=20
help<BR>FredericH<BR></FONT></DIV></BODY></HTML>

------=_NextPart_000_0129_01C2686C.21557300--

0
FredericH
9/30/2002 8:28:34 AM
sybase.powerbuilder.general 62418 articles. 19 followers. Follow

0 Replies
643 Views

Similar Articles

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

Reply:

Similar Artilces:

dw_1.Modify("DataWindow.Table.Select='" + )
when following 3 lines of code executed original_select = dw_1.Describe("DataWindow.Table.Select") original_select = "DataWindow.Table.Select='" + original_select + "'" err_str = dw_1.Modify(original_select) err_str = Line 1 Column 235: incorrect syntax. What may be the problem? Nikolay Nikolay: Does the datawindow have arguments? Austin <NikolayG> wrote in message news:8D201CCF4F387C640051694E85256D01.005169A385256D01@webforums... > > > when following 3 lines of code executed > > original_se...

Should FxOS's "select all" really be docshell's "select all" (which tries to select everything in the document)?
The specs on https://bugzil.la/1023688 (specifically https://bug1023688.bugzilla.mozilla.org/attachment.cgi?id=8548761 which of the two is the one that discusses "select all") don't directly address the issue of containment for non-editable areas. Our implementation, as I trace it, ends up invoking do_selectAll on the docshell which tries to select *everything* editable in the entire page. This came to my attention while looking at https://bugzil.la/1152172 which is an email bug where select all was selecting both the selectable content on the current message rea...

Why Response.Write("<script>window.open("newWind.aspx','report','');</script>") not working?
I need to open a new web browser of url=newWind.aspx and tried the code below; Response.Write("<script>window.open('newWind.aspx','report','');</script>")However nothing happens, what can I do to make it work? Try RegisterClientScriptBlock("OpenWin","<script language=javascript>window.open('newWind.aspx','report','');</script>")I think that is the name of it...Also look at RegisterStartupScriptBlock (I think)MajorCats Thanks. But, it was same difference. Is there anything that blocks the new browser from showing up in the setting of IE or system?   &nbs...

Replace(txt,"'","''") in code-behind
i'm creating a file named client.vb using my wordpad. I'm using this as a code-behind sort of thing. The problem is I want to remove the ' from my strings so that i can put them in SQL statements. The Replace doesn't work, is there any other way to this. thanks. Can you show me the code sample you have for the string.Replace() method? That should work for you. You should instead use Sql Parameters to compile and send your query to the db. One of the many benefits of doing so is that you don't need to worry about the single quotes.-- daver True. However, I'd like to know why you are ha...

dw_1.Modify("DataWindow.StoragePageSize='LARGE'")
Dear PowerBuilder 7.03 Developers, The application I support here at work (PB7.03) has been having an excessive amount of 'Out of Memory' Errors. The app is running in a WindowsNT 4.0 environment. Today, in a Sybase White Paper, I found something that I think could help me with this problem but I have been unable to find anymore information on the following DataWindow property: dw_1.Modify("DataWindow.StoragePageSize='LARGE'") I can't find "StoragePageSize" anywhere. This case was originally listed in Sybase Case Id: 41085432. Can...

How to mofify text 'xyz' after issuing a dw_1.modify("CREATE TEXT(band='footer' text='xyz' ............)")
Hi All, I am new to Powerbuilder and on a steep learning curve so please bear with me and do not assume I know anything in your response! I have a datawindow control 'dw_1' in a window 'w_report_1' With the w_report_1.open() event, I assign a data object 'd_site_details' to the 'dw_1' control in the following code extract. I use a loop to provide different retrieval arguments for 'd_site_details' from a datastore so that we get different details for different system accounts. After each retrieval we print dw_1 together with a text footer w...

RFC: Make "use 5.14" select "use re '/a' " ?
I have pushed to blead (with Jesse's permission) the last commits (besides doc and any bug fixes) that enable the /a regular expression modifier. Presuming it works ok, should this become the default method of operation, signified by a "use 5.014" ? On 1/17/11 11:02 AM, Karl Williamson wrote: > Presuming it works ok, should this become the default method of > operation, signified by a "use 5.014" ? So when I upgrade my code, I have to put "no re '/a'" in every file? Why, oh why? On Mon, 17 Jan 2011, Elliot Shank wrote: > ...

superreview granted: [Bug 378544] General's Default Feed Viewer's " =?UTF-8?Q?Select=E2=80=A6?=" doesn't use real elipsis
Mike Pinkerton <mikepinkerton@mac.com> has granted Stuart Morgan <stuart.morgan@alumni.case.edu>'s request for superreview: Bug 378544: General's Default Feed Viewer's "Select=E2=80=A6" doesn't use r= eal elipsis https://bugzilla.mozilla.org/show_bug.cgi?id=3D378544 Attachment 264750: changed https://bugzilla.mozilla.org/attachment.cgi?id=3D264750&action=3Dedit ------- Additional Comments from Mike Pinkerton <mikepinkerton@mac.com> rs=3Dpink= ...

superreview requested: [Bug 378544] General's Default Feed Viewer's " =?UTF-8?Q?Select=E2=80=A6?=" doesn't use real elipsis
Stuart Morgan <stuart.morgan@alumni.case.edu> has asked Mike Pinkerton <mikepinkerton@mac.com> for superreview: Bug 378544: General's Default Feed Viewer's "Select=E2=80=A6" doesn't use r= eal elipsis https://bugzilla.mozilla.org/show_bug.cgi?id=3D378544 Attachment 264750: changed https://bugzilla.mozilla.org/attachment.cgi?id=3D264750&action=3Dedit= ...

Modify("col_name.initial='A'") can't work
hi all, need some help, the HTMLDW modify method doesn't change my column initial value... what wrong ? thanks Hi, That should work fine... Can you tell me where did you call this modify function? Is it after setting the dataobject or before setting the dataobject? - Srinivasan Boosi JDuke <jduke@mymailbag.com> wrote in message news:39AC7766.2E427B63@mymailbag.com... > hi all, > > need some help, the HTMLDW modify method doesn't change my column > initial > value... what wrong ? > > thanks > ...

Like "'" + Billtocompany + "%'" does not work
Dear All,  I have put the following code and not records returned. Do you know Why? Even I have set the variables to be empty string. SQL Data Source: <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:THL2ConnectionString %>"     SelectCommand="SELECT BLInv.InvNo, .....from ...... WHERE (BLInv.BilltoCompany like @BillToCompany) AND (BLInv.CountryCode like @CountryCode) AND (BLInv.Quarter like @Quarter)">        <SelectParameter...

Single Quote( ' ' ) and Double Quote( " " ) usage
Is there a standard usage in PB for using single and double quotes in script. Not really. I generally prefer to use the single quote because it doesn't require holding down the Shift key. My $.02 Ron Gallagher, CPDP Atlanta, GA rongallagher@mindspring.com Don Hill wrote in message <3757f6bb.169233004@forums.powersoft.com>... >Is there a standard usage in PB for using single and double quotes in >script. ...

Wired's Vista "Do's" Have Some Major "Don'ts"
Wired has an article up about how to speed up Vista. While they have a couple OK tips in there, there are a couple of suggestions that caught my attention as colossally BAD. I tried to edit the wiki page to reflect this, but I was rebuffed by the original author. So much for community contributions. http://www.windows-now.com/blogs/robert/archive/2008/02/27/wireds-vista-dos-have-some-major-donts.aspx -- "Never drive faster than your ANGEL can fly" In grc.techtalk, on Fri, 14 Nov 2008 17:32:04, paradoX wrote: >Wired has an article up about how to speed up Vist...

"SELECT * From Patient where Patient.PatientId = PatientForm.PatientId and Patient.PatientId = '" & id & "'"
  is this statement correct? ("SELECT * From Patient where Patient.PatientId = PatientForm.PatientId and Patient.PatientId = '" & id & "'") Most likely PatentID has some sort of numeric data type so you should not use single quotes around the value to which it is being compared.  And you likely need to INNER JOIN PatientForm. However, do not concatente id directly onto the query.   This is very insecure and is opening up your site/server to a SQL Injection attack (see Bertrand LeRoy's blog post for more information). Instead use a Parameter, like this: ...

Web resources about - Modify("DataWindow.Table.Select='...'") of nested report fails - sybase.powerbuilder.general

Resources last updated: 12/13/2015 7:28:52 PM