Hi,
I have a few reports that require me to call my own assemblies to format some data. For example, I have an extension Method that translates an enumeration to some resource string:
= MyClass.GetEnumResource(Fields.ItemStatus)
Aditionally, I also need to make comparisons with my own types for formatting purposes. Something like:
= IIF(Fields.OrderStatus = MyEnumeration.Refused, " n/a", Fields.OrderPrice)
Problem is, any reference to an external assembly or type generates the dreaded "The expression contains object 'xxxx' that is not defined in the current context". I've also tried to Assembly.Load("MyAssembly") in the report construtor, but to no avail...
I'm aware that there is a solution for the standalone report designer, which involves configuring it's XML config file, but I'm running my reports with Report processor. Something like this:
Is it possible to tell the ReportProcessor where to find my assemblies?
Thanks!
I have a few reports that require me to call my own assemblies to format some data. For example, I have an extension Method that translates an enumeration to some resource string:
= MyClass.GetEnumResource(Fields.ItemStatus)
Aditionally, I also need to make comparisons with my own types for formatting purposes. Something like:
= IIF(Fields.OrderStatus = MyEnumeration.Refused, " n/a", Fields.OrderPrice)
Problem is, any reference to an external assembly or type generates the dreaded "The expression contains object 'xxxx' that is not defined in the current context". I've also tried to Assembly.Load("MyAssembly") in the report construtor, but to no avail...
I'm aware that there is a solution for the standalone report designer, which involves configuring it's XML config file, but I'm running my reports with Report processor. Something like this:
MyReport report =
new
MyReport ();
report.DataSource = myModelData;
ReportProcessor reportProcessor =
new
ReportProcessor();
InstanceReportSource instanceReportSource =
new
Telerik.Reporting.InstanceReportSource();
instanceReportSource.ReportDocument = report ;
RenderingResult result = reportProcessor.RenderReport(
"PDF"
, instanceReportSource,
null
);
return
result.DocumentBytes;
Is it possible to tell the ReportProcessor where to find my assemblies?
Thanks!