Using the ASPOSE words for .NET Linq Reporting Engine.
I’m trying to access the main object method that was created under a loop in the template.
Sample Class:
public class MainObject {
public List<ChildObject> Children { get; set; }
public ChildObject GetSomeEntry(string someParam)
{
return new ChildObject();
}
}
public class ChildObject {
public string Property1 { get; set; }
}
In the Templae
<<foreach [in Children.OrderByDescending(i => i.Property1)]>>
<<var [var1= Property1]>>
<<var [entry = GetSomeEntry(Property1)]>>
<</foreach>>
You will end up with an error like:
Can not resolve method ‘GetSomeEntry’ on type 'MainObject.ChildObject ’
Can someone help propose a solution? Or is there some syntax to get at the main object passed in when you are in a loop?