ParamValues : IMetabaseObjectParamValues;
ParamValues : Prognoz.Platform.Interop.Metabase.IMetabaseObjectParamValues;
The ParamValues property contains properties and methods of collection of values of published report parameters.
By default, value of this property is empty regardless of the originally published object parameters.
Executing the example requires that the repository contains a mobile application container with the MOBILE identifier containing a regular report with set parameter.
Add links to the Metabase, Mobile, Report system assemblies.
Sub UserProc;
Var
mb: IMetabase;
Mobile: IMobileApplication;
Publicator: IMobileApplicationPublicator;
MaPubObjs: IMobileApplicationPublishObjects;
MaPubObj: IMobileApplicationPublishObject;
PrxPubObj: IMobilePublishReport;
Obj: IMetabaseObject;
PubObj: IMobilePublishObject;
Begin
mb := MetabaseClass.Active;
// Get mobile application
Mobile := mb.ItemById("MOBILE").Bind As IMobileApplication;
// Create a mobile application publisher
Publicator := Mobile.CreatePublicator;
// Get published objects
MaPubObjs := Publicator.Items;
// Select the first published object
MaPubObj := MaPubObjs.Item(0);
Obj := MaPubObj.PublishObject.Object;
PubObj := MaPubObj.PublishObject;
PrxPubObj := PubObj As IMobilePublishReport;
// Set parameters of published object
PrxPubObj.ParamValues := Obj.ParamValues;
// Display value of the first parameters in the console window
Debug.WriteLine(EaxPubObj.ParamValues.Item(0).Value);
End Sub UserProc;
After executing the example parameters of the published report are created, and the console window displays value of the first parameter.
The requirements and result of the Fore.NET example execution match with those in the Fore example.
Imports Prognoz.Platform.Interop.Mobile;
Imports Prognoz.Platform.Interop.Report;
…
Private Sub UserProc(sender: System.Object; e: System.EventArgs);
Var
mb: IMetabase;
Mobile: IMobileApplication;
Publicator: IMobileApplicationPublicator;
MaPubObjs: IMobileApplicationPublishObjects;
MaPubObj: IMobileApplicationPublishObject;
PrxPubObj: IMobilePublishReport;
Obj: IMetabaseObject;
PubObj: IMobilePublishObject;
Begin
mb := Self.Metabase;
// Get mobile application
Mobile := mb.ItemById["MOBILE"].Bind() As IMobileApplication;
// Create a mobile application publisher
Publicator := Mobile.CreatePublicator();
// Get published objects
MaPubObjs := Publicator.Items;
// Select the first published object
MaPubObj := MaPubObjs.Item[0];
Obj := MaPubObj.PublishObject.Object;
PubObj := MaPubObj.PublishObject;
PrxPubObj := PubObj As IMobilePublishReport;
// Set parameters of published object
PrxPubObj.ParamValues := Obj.ParamValues;
// Display value of the first parameters in the console window
System.Diagnostics.Debug.WriteLine(EaxPubObj.ParamValues.Item[0].Value);
End Sub;
See also: