GetFullState and dynamically created datastores with nested reports
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:
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
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.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
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.