I think this what I am missing. Can you please provide an example of this?
Thanks
Code: Select all
StiFunctions.AddFunction
Code: Select all
const string DIC_VAR_NAME = "custom_dictionary";
public string GetDictionaryValue(string key)
{
// get current report instance
var currentReportObject = ??? (don't know how to get the object, must be of type StiReport or probably it's descendant)
// get dictionary from report
if (!dictionaryObject.IsVariableExist(DIC_VAR_NAME)) return "";
var dictionaryObject = currentReportObject.Variables[DIC_VAR_NAME];
var dictionary = dictionaryObject as IDictionary<string, string>();
if (dictionary == null) return "";
return dictionary[key];
}