Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

GetFullState and dynamically created datastores with nested reports

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

Former Member
Former Member replied

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.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question