Can UseEmbeddedTemplates be used with multiple Assemblies

Posted by: jim.garrison on 28 April 2025, 11:21 am EST

    • Post Options:
    • Link

    Posted 28 April 2025, 11:21 am EST

    Can UseEmbeddedTemplates be used to retrieve reports from different assemblies with different resource prefixes? The code below only allows access to the last assembly assigned.

    app.UseReportViewer(settings =>
    {
        foreach (var assembly in assemblies())
        {
            var type = assembly.GetType("ResourcePrefix");
            if (type != null)
            {
                object? instance = Activator.CreateInstance(type);
                settings.UseEmbeddedTemplates(instance?.ToString(), assembly);
            }
        }  
    });

  • Posted 1 May 2025, 2:33 am EST

    Hi Jim,

    Unfortunately, It is not possible to add multiple assemblies in the settings.UseEmbeddedTemplates function. You may only add reports to a single assembly.

    Regards,

    Akshay

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels