Changing dynamically dataobject in nested reports

Hi

Well as the subject states I want to be able to change the dataobject in a
nested report. Well that isnt a problem with getchild function. NOW my
problem is that I want to change it to a datawindow I fetched from a PBL
file (Or from Createsyntaxfromsql function). In other words I have a syntax,
not a name of a datawindow object.

I have no clue if this even is possible, advise is most appriciated.

My problem is as follows. We have several standard reports in our
application. We want to open up theese reports to be editable through
Infomaker. I need then to load the altered objects from this .PBL file. The
main report is no problem. Just do a create. The nested reports causes my
head to spin.

Your help is appriciated

With regards
Hakan Yngvik
Patrix AB

hyk@patrix.com






0
Hakan
6/5/2003 2:13:53 PM
sybase.powerbuilder.datawindow 28057 articles. 5 followers. Follow

3 Replies
2108 Views

Similar Articles

[PageSpeed] 3

Hi

If i understand u correctly

u have a SQL syntax right?

( somebody correct me if i wrong )

what u can do is create a datawindow based on this syntax and then assign 
that dw as ur datawindow object.

HTh

Manish


0
manish
6/5/2003 2:35:40 PM
I do this all the time using the following.

From help file on Create method (DataWindows)
The Create method creates a DataWindow object using the source code in
syntax. It substitutes the new DataWindow object for the DataWindow object
currently associated with dwcontrol.
DataWindow source code syntax is complex and is best produced by copying
existing DataWindows.

From help file on Examples for Create method (DataWindows)

string error_syntaxfromSQL, error_create
string new_sql, new_syntax
new_sql = 'SELECT emp_data.emp_id, ' &
        + 'emp_data.emp_name ' &
        + 'from emp_data ' &
        + 'WHERE emp_data.emp_salary>45000'
new_syntax = SQLCA.SyntaxFromSQL(new_sql, &
        'Style(Type=Form)', error_syntaxfromSQL)
IF Len(error_syntaxfromSQL) > 0 THEN
        // Display errors
       mle_sfs.Text = error_syntaxfromSQL
ELSE
        // Generate new DataWindow
        dw_new.Create(new_syntax, error_create)
        IF Len(error_create) > 0 THEN
            mle_create.Text = error_create
        END IF
END IF
dw_new.SetTransObject(SQLCA)
dw_new.Retrieve()


"Hakan Yngvik" <hyk@patrix.com> wrote in message
news:uZM4B22KDHA.275@forums-2-dub...
> Hi
>
> Well as the subject states I want to be able to change the dataobject in a
> nested report. Well that isnt a problem with getchild function. NOW my
> problem is that I want to change it to a datawindow I fetched from a PBL
> file (Or from Createsyntaxfromsql function). In other words I have a
syntax,
> not a name of a datawindow object.
>
> I have no clue if this even is possible, advise is most appriciated.
>
> My problem is as follows. We have several standard reports in our
> application. We want to open up theese reports to be editable through
> Infomaker. I need then to load the altered objects from this .PBL file.
The
> main report is no problem. Just do a create. The nested reports causes my
> head to spin.
>
> Your help is appriciated
>
> With regards
> Hakan Yngvik
> Patrix AB
>
> hyk@patrix.com
>
>
>
>
>
>


0
Tyler
6/5/2003 2:42:49 PM
Hi

Yeah you are correct, if you intend to change the syntax of the main
datawindow. I inteend to ONLY change the syntax of a Nested report.

The following code doesnt work, but hope you get the idea.

*****************************

//subreport1

string dwsyntax, ls_errors
string ls_report_id, ls_path, ls_msg, ls_subobject

long rtncode, ll_rtn

datawindowchild ldw_child

ls_path = sle_pbl.text
ls_report_id = sle_object.text
ls_subobject = sle_suboject.text

dw_1.getchild (ls_subobject,ldw_child)

IF NOT fileexists (ls_path) THEN
 Return 0
END IF

dwsyntax = Libraryexport( ls_path, ls_report_id, ExportDataWindow! )

IF len (dwsyntax) > 0 THEN
 // Tried this, create is not a valid function in datawindowchild
 ldw_child.create (dwsyntax, ls_errors)

 // This wont work either.
 dw_1.object.subreport1.Create(dwsyntax, ls_errors)

 IF len (ls_errors) > 0 THEN
  message.uf_getmessagetext (495,ls_msg)
  Messagebox ("Information",ls_msg + "~n~n" + ls_errors)
  Return -1
 END IF
END IF

Return 1


***************************

I now hope that my dilemma is clear. I actually is using the create command
quite extensively throught the application and is familiar with how it
works.

So, its getting tricky, anyone have a suggestion of how to solve this?

With regards

Hakan Yngvik

Patrix AB



"Tyler Craft" <tyler.craft@gnb.caNo_Spam_Please> wrote in message
news:#Nyh1G3KDHA.317@forums-2-dub...
> I do this all the time using the following.
>
> From help file on Create method (DataWindows)
> The Create method creates a DataWindow object using the source code in
> syntax. It substitutes the new DataWindow object for the DataWindow object
> currently associated with dwcontrol.
> DataWindow source code syntax is complex and is best produced by copying
> existing DataWindows.
>
> From help file on Examples for Create method (DataWindows)
>
> string error_syntaxfromSQL, error_create
> string new_sql, new_syntax
> new_sql = 'SELECT emp_data.emp_id, ' &
>         + 'emp_data.emp_name ' &
>         + 'from emp_data ' &
>         + 'WHERE emp_data.emp_salary>45000'
> new_syntax = SQLCA.SyntaxFromSQL(new_sql, &
>         'Style(Type=Form)', error_syntaxfromSQL)
> IF Len(error_syntaxfromSQL) > 0 THEN
>         // Display errors
>        mle_sfs.Text = error_syntaxfromSQL
> ELSE
>         // Generate new DataWindow
>         dw_new.Create(new_syntax, error_create)
>         IF Len(error_create) > 0 THEN
>             mle_create.Text = error_create
>         END IF
> END IF
> dw_new.SetTransObject(SQLCA)
> dw_new.Retrieve()
>
>
> "Hakan Yngvik" <hyk@patrix.com> wrote in message
> news:uZM4B22KDHA.275@forums-2-dub...
> > Hi
> >
> > Well as the subject states I want to be able to change the dataobject in
a
> > nested report. Well that isnt a problem with getchild function. NOW my
> > problem is that I want to change it to a datawindow I fetched from a PBL
> > file (Or from Createsyntaxfromsql function). In other words I have a
> syntax,
> > not a name of a datawindow object.
> >
> > I have no clue if this even is possible, advise is most appriciated.
> >
> > My problem is as follows. We have several standard reports in our
> > application. We want to open up theese reports to be editable through
> > Infomaker. I need then to load the altered objects from this .PBL file.
> The
> > main report is no problem. Just do a create. The nested reports causes
my
> > head to spin.
> >
> > Your help is appriciated
> >
> > With regards
> > Hakan Yngvik
> > Patrix AB
> >
> > hyk@patrix.com
> >
> >
> >
> >
> >
> >
>
>


0
Hakan
6/6/2003 8:00:01 AM
Reply:

Similar Artilces:

Dynamically change Nested Report
I have a composite report. It contains a nested report that I need to dynamically change the Report Object criteria for the report at run time. Does anyone know the code that I need to use so I can access the Report object criteria to filter the retrieve. Thanks in advance for any help. Tom Mauldin ...

Change dataobject nested report
Hi, I have 3 levels of dw object within a composite report, the dataobject of report object needs to be set dynamically. The dataobject can be successfully changed and data can be retrieved, but it always crashes when I close my application. Why? adw_1.object.dw_1.object.dw_1.dataobject = 'd_detail' Thanks, DS ...

Dynamically changing a nested report
Can you change a nested report dynamically between rows as necessary? Does this need to be done the the retrieveend event or can it be done later? I have a freeform data window with a nested report that may be one of six different reports depending on the type in each row. I tried all six nested report on the dw and made one visible as needed proved to be incredible inefficient with 4,000 rows. I don't believe this is possible. On Fri, 05 Feb 1999 17:09:39 -0700, in powersoft.public.powerbuilder.datawindow Steve Strong <ucadm.steve@state.ut.us> wrote: >Can ...

Dynamically Change a Nested Report
Hi, I'm trying to change the dataobject for a nested report in my script: dw_main.GetChild('dw_15', dwc_1) dwc_1.DataObject = 'whatever' <--- This won't save if I try: dw_main.Object.dw_15.Object.DataObject = 'whatever' <---I get an error accessing the objects property during execution. Basically I want the nested report to change depending on user input but I'm having problems. Any ideas? Thanks Dan Dataobject is a property of a DW control or a report control in a composite DW. A nested report is neither of those, and ...

Nested Reports
I have a composite datawindow with several nested reports. All the nested reports have a datawindow object assigned to them. I want to change the datawindow object assigned to a nested report through a PowerScript function call (Probably Modify?). How do I do this? What is the syntax? Thanks in advance. Joe Suchy <jsuchy@casecorp.com> wrote in article <3488744E.F8206225@casecorp.com>... > I have a composite datawindow with several nested reports. All the > nested reports have a datawindow object assigned to them. I want to > change the datawindow obj...

Dynamic change PDF in nested datawindow
We have a requirement for showing a PDF in a nested datawindow report. Each row in the report is for a different procedure and each procedure has it's own PDF file. The PDF datawindow is the fourth level down in a nested report. We can not reach it with dot notation to change the src file and the adobe activex does not allow you to specify anything other than a hardcoded string name of a file. Does anybody have any ideas? Thanks ...

Dynamically Changing SQL for a Nested Datawindow
Hi All, I am using a Datawindow (not composite) which has 2 nested reports inside it. I want to change the SQLs for the main datawindow and the 2 nested reports dynamically. I'm able to do the change for the main datawindow, but not for the nested datawindows because I'm not able to use the GetChild() function on them. Can anyone throw some light on this problem. Your help is appreciated. Thanks in Advance. Regards, Amal. Take a look at "Syntax for nested objects" in PBHelp. Take note that you will need to reference a row number of the main dw so y...

syntax for changing nested dataobject of composite report
what is the syntax for changing nested dataobject of a composite report Do a GetChild and change the dataobject of the DWChild. "egattu" <egattu@yahoo.com> wrote in message news:J6H$oRE4CHA.235@forums.sybase.com... > what is the > syntax for changing nested dataobject of a composite report > > > > > ...

Dynamically Changing the child datadow in Report Datawindow
Is there any way to dynamically change the name of datawindows inside the report datawindow? In normal datawwindow, you would dynamically change it using dataobject, such as in dw_1.dataobject = "d_test". Thanks in advance. DataObject DataWindow object property Description The name of the DataWindow that is the nested report within the main DataWindow. Controls Report objects Syntax Dot notation: dw_control.Object.reportname.DataObject Describe and Modify argument: "reportname.DataObject = ' dwname ' " Parameter Description reportname T...

Can a dataobject be assigned to a nested report dynamically?
I can access the nested report through getchild ok but would like to change the dataobject specifically based on what the user has requested. Is this possible? Conventional syntax does not apply... ie <child>.dataobject = "xxx" and modify doesn't seem to offer it when perusing the dw syntax tool options thanks using 10.5.2 That gets done by modifying the report on the main DW: <DW Control Name>.Modify("<Reportname>.DataObject='<dataobject name>' ") Report Bugs to Sybase: http://case-express.sybase.com/cx/welcome.do ...

changing the height of trailer band on nested report dynamically
Hi All, Sorry about cross-posting this one, but I had no answer from the other forum. I have a composite DW with 3 reports. Depending on the retrieval argument I pass I want to set the height property of the trailer band of group 1 of one of these reports to zero. How do I do that with the describe function and dot notation? TIA, Ivan Hello Ivan, I could not get dot notation to work with group bands had to use modify dw_estimate_total.modify("DataWindow.Header.2.Height=52"). Rex Chivers System Analyst Tampa Electric Co Ivan Takao Haratani wrote...

REPORTS
Hi all my question is if I can dinamically insert nested reports into an existing report if i have a report with the nested report d_nr1 and i have to use this depending on a retrieval argument once or more times... (up to 5 times)... do i have to build 5 different reports and then use report 1 if I have 1 retrieval argument and report 2 if I have 2 RA..?? or can I "insert" nested reports? ...

nested reports in nested report
Hi, I have a report with a nested dw in a nested dw. I would like to change som properties of both datawindows/reports (width and moving som columns - it's a grid report) But how do I reference the nested report. I cant use GetChild (fails as it is not a Composite). I have managed to get the to the first report and change the width of i with the syntax dwobject dwo_1 dwo_1 = dw_report.Object.dw_1 dwo_1.width = 3000 But trying to get to the next level this fails, i.e. i tried dwobject dwo_2 dwo_2 = dwo_1.Object.dw_2 // fails at runtime Does anyone have a sugg...

Does PowerBuilder 9.0 support changing color of a bar in nested report?
Hi, I got an answer saying that in v11.0 or v11.5, it is possible to change the color of a bar in a bar graph of nested report, using SetDataColor() function call. Is that also possible for version 9? For PB10 SetDataColor() was introduced for Web ActiveX targets. I don't believe this was in PB9 and only applies to Web ActiveX. SetDataStyle() can be used for PB DWs. Regards, John <Jaemin Lee> wrote in message news:4910c36f.2a91.1681692777@sybase.com... > Hi, > > I got an answer saying that in v11.0 or v11.5, it is > possible to change the color of a...

Web resources about - Changing dynamically dataobject in nested reports - sybase.powerbuilder.datawindow

Placebase team at Apple file “Schematic Maps” patent dynamically detailing important data
In a report from Computerworld way back in 2009, we learned that Apple had quietly acquired Maps API company Placebase. Then, founder of Placebase ...

Apple's Lightning port dynamically assigns pins to allow for reversible use
... a closer look at how Apple's new Lightning connector works, and has come to the conclusion that the 8 pins on each side of the plug are dynamically ...

In a dynamically typed language, is it a bad idea to return different data types?
In some cases, returning different types from a single function works.

Urlbox Launches Screenshots-as-a-Service Platform to Dynamically Update Galleries
... changes. Launched yesterday, Urlbox allows anyone with a gallery displaying website screenshots to automate the process and keep them dynamically ...

Everything.me launcher dynamically adapts to what you’re doing right now
... phone according to what you’re doing. Perform a search for ‘football’ and your background will change to the NFL logo. A launcher that dynamically ...


A YouTube Experiment Resizes the Player Dynamically
There's a new YouTube experiment that changes the video player's size, depending on the browser window's size. When resizing Chrome's window, ...

Apple Granted “Dynamically Changing Cursor for User Interface” Patent, Originally Filed in 2003
... a utility patent that covers the use of the mouse cursor that changes according to the context of the task it is engaged in. Called a “Dynamically ...

Atmel's FPSLIC II Dynamically Reconfigurable SoC Supports "Silicon-Sharing" For Peripherals & Interfaces ...
Silicon-Sharing Fits 200K Gate Design into 40K Gate FPSLIC II's, Cuts Power Drain by 97%

Everything.me Launcher Wants to Dynamically Change Phones Based on Location, Interests, and Mental State ...
What if your phone’s launcher dynamically changed based upon interests, your location, or topics you had in mind at a specific moment? A new ...

Resources last updated: 12/7/2015 9:57:55 PM