Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
615
IGR files
posted

Hi,

Is it possible now to save and load IGR reports into/from database reports in v12.1 ?

 

regards

Parents Reply
  • 740
    posted in reply to Sebastian

    The Resolve method is invoked automatically when declaring a ReportUriResolver as explained Here.

    As a reference:

     

    [ReportUriResolverExport]

    public class DatabaseUriResolver : IReportUriResolver

     {

     const string ResolverPrefix = "http://MyDomain/MyDatabase/";

     

     

     

     public void Resolve(Uri reportUri, Action<UriResolverData> result)

       {

         // Recognize Desired Path

        if (reportUri.ToString().StartsWith(ResolverPrefix))

        {

          // Retrieve Report igr from DB

             }

       }

    }

     

     

     

     

    I suggested this mechanism (i.e. ReportUriResolver) since it gives you full control on how to define and map uris as well as how reports are loaded.

    For instance, you can define a certain prefix to know which reports should be retrieved from the DB and/or parse the uri to create the corresponding query that will load the report from the DB.

    e.g. 

     $(function() {

       $("#viewer").igReportViewer({

          renderSettings: {

          definitionUri: "http://MyDomain/MyDatabase/MyReportsTable/MyReportId ",

                serviceEndpointUri: serviceEndpoint},

       });

    });

     

    Following the steps indicated in How to Customize Uri Resolution should get you going to implement this. You can also check out this link to see a running sample, Please let me know if you need further instructions.

    Regards,

    Miguel.

Children