Dynamically Show & Fill a Single or Multiple Tables depending on Condition or Collection Items | C# LINQ Reporting
I am trying to do the same above thing, but examples ZIP file blocked by error message “Sorry, this file is private. Only visible to topic owner and staff members.” Could you please post the solution here in the thread, that it is accessible for everybody?
Thank you!
public class Person
{
public string Name { get; set; }
public List<Person> Children { get; set; }
}
private static List<Person> GetPersons()
{
return new List<Person>
{
new Person
{
Name = "Jane Doe",
Children = new List<Person>
{
new Person { Name = "Ann Doe" },
new Person { Name = "John Doe" }
}
},
new Person
{
Name = "John Smith",
Children = new List<Person>
{
new Person { Name = "Tom Smith" }
}
}
};
}
public void DynamicallyShowAndFillTableDependingOnCondition()
{
Document document = new Document(MyDir + "DynamicallyShowAndFillTableDependingOnCondition.docx");
ReportingEngine engine = new ReportingEngine();
engine.Options |= ReportBuildOptions.RemoveEmptyParagraphs;
engine.BuildReport(document, GetPersons(), "persons");
document.Save(MyDir + "DynamicallyShowAndFillTableDependingOnCondition Out.docx");
}
public void DynamicallyFillMultipleTablesDependingOnCollectionItems()
{
Document document = new Document(MyDir + "DynamicallyFillMultipleTablesDependingOnCollectionItems.docx");
ReportingEngine engine = new ReportingEngine();
engine.Options |= ReportBuildOptions.RemoveEmptyParagraphs;
engine.BuildReport(document, GetPersons(), "persons");
document.Save(MyDir + "DynamicallyFillMultipleTablesDependingOnCollectionItems Out.docx");
}
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.