cancel
Showing results for 
Search instead for 
Did you mean: 

GetFullState and dynamically created datastores with nested reports

Former Member
0 Kudos

Hi all,

I have a problem with GetFullState and dynamically created datastores with nested reports. The problem is that apparently GetFullState does not include the nested reports rows into the blob variable passed by reference.

See the following script:

Blob lbl_syntax

Blob lbl_some

Blob lbl_dyn_ds

DataStore lds_some // datastore with 2 nested reports

DataStore lds_dyn_ds // the scripts create it based on a syntax in a blob column of a table

SelectBlob Sintax_DS

Into :lbl_syntax

From some_table

Where id_some = 1 ;

lds_some = Create DataStore

lds_some.DataObject = 'd_some' // datawindow with 2 nested reports

lds_some.SetTransObject ( SQLCA )

lds_dyn_ds = Create DataStore

lds_dyn_ds.Create ( String ( lbl_syntax ) , ls_error_msg ) // lbl_syntax from exported 'd_some'

lds_dyn_ds.SetTransObject ( SQLCA )

lds_some.Retrieve()

lds_dyn_ds.Retrieve()

lds_some.GetFullState ( lbl_some ) // INCLUDES nested reports rows

lds_dyn_ds.GetFullState ( lbl_dyn_ds ) // DOES NOT include nested reports rows ¿?¿?¿?¿?¿? PB 9.0.3 8004

Any clue ? Does anybody can reproduce it ?

Best regards and happy new year

___________________

AUS Julián Tagarro

NeoSistemas SRL

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi all, Can anybody reproduce this behaviour ? Any help ? Please advice. Regards Julián.

Former Member
0 Kudos

We use dynamically loaded datawindow syntax in our reports.  Are the two subreports within lbl_syntax compiled into your pbls?  It has been my experience that subreports are not stored with the rest of the datawindow source - so I would expect them to be missing at the time of your retrieve call.  Perhaps this isn't so much a getfullstate issue for you as the absence of these subreports from the datastore after loading it dynamically?  This could be verified by converting the datastores into viewable datawindows for debug purposes.

I handle subreports in dynamic datawindows by dynamically creating a PB library in the user's temp folder and importing the subreport syntax into that library prior to loading the parent datawindow dynamically.  While a bit klunky to implement, it works.

Former Member
0 Kudos

Hi Will, Well, finally I imported the syntax located in lbl_sintax into a temp library and now GetFullState works fine. Definitly, problem is GetFullState used with dynamically created DW with nested reports inside. Thanks for your help. __________________ AUS Julián Tagarro NeoSistemas SRL

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi  Julián ;

  That is correct ... the GetFullState only works on the immediate DWO's primary buffer. No child DWO's buffers are processed by this method. That is the way it was originally designed and unfortunately Sybase never addressed this enhancement request.

Regards ... Chris

Former Member
0 Kudos

Hi Chris,

Thanks for your answer.

GetFullState perfectly works for lds_some (the datastore that's not dynamically created). I mean, the blob returned by GetFullState does include the 2 nested reports and the rows in them.

From what I can underestand, the problem is the dynamic created datastores (see the script in original post)

Regards.

________________

AUS Julián Tagarro

NeoSistemas SRL