Add custom function inside template
Posted: Tue Feb 11, 2014 12:26 am
Hello
I have 2 questions:
1) How could we write a custom function to be used in a template? It can't be added to an assembly. The user can add her own function inside a template.
for example:
2) How could we add custom code like the one above to StiReport? That would be the same for all reports, but the functions wouldn't exist in any compiled assembly.
TIA
I have 2 questions:
1) How could we write a custom function to be used in a template? It can't be added to an assembly. The user can add her own function inside a template.
for example:
Code: Select all
public string MyFunc()
{
return "XYZ";
}
Code: Select all
StiReport report = new StiReport();
report.CustomCode = "public string MyFunc() {return "XYZ";}";
report.Render();