ReportTemplate class

From Catglobe Wiki
Revision as of 06:03, 7 December 2016 by Nguyenduyan (talk | contribs)
Jump to: navigation, search

ReportTemplate



A report template

Constructors

  • (int resourceId "ResourceId of existing template") - Fetch existing template
  • (string name "Resource name", int parentResourceId "Parent resource") - Create new template

Methods

  • Empty DefaultLanguage(string isocode "Iso code to set as default") - Which content is the default
  • Empty Save() - Save the template
  • string ToString() - The string representation of the object.

Properties

  • Dictionary LocalizedContent { get; set; } - Localized content of the template
  • string Name { get; } - Name of the template
  • string ObjectTypeName { get; } - The name of the type of object.
  • int ResourceId { get; } - Resource Id of the template
  • TypeInformation TypeInformation { get; } - Get information about this class.
  • string ViewUrl { get; } - Url to use to view template


Examples

//Create new report template:
ReportTemplate rt = new ReportTemplate ("Antest1",11088827);
Dictionary content = {
 "da-DK":"content in DK",
 "en-US":"content in US"
};
rt.LocalizedContent=content;
rt.DefaultLanguage("en-US");
rt.Save();
print(rt.ResourceId);//15550190
//Get an existing report template:
ReportTemplate rt = new ReportTemplate (15550190);
print(rt.ViewUrl);///CatglobeInABox/#Cross/15550190
print(rt.ResourceId);//15550190
print(rt.Name);//Antest1