Olap - DataEngineWebpi

Posted by: mhillar on 14 March 2019, 7:54 am EST

  • Posted 14 March 2019, 7:54 am EST

    HI,
    In tootorial to create dataengineWebApi is hardcoded definision in startup.cs this,
        app.UseDataEngineProviders()
    .AddDataEngine("complex10", () =>
    {
    return ProductData.GetData(100000);
    });


    It is possible to create dynamic this,
    I would like use prcedure to generate Engine like this and sent some params to controller where should be recreate(remove and create new dataEngine)

    using (var con = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString))
    {
    using (var cmd = new SqlCommand("Get_OLAP_DATA_proc", con))
    {

    cmd.Parameters.Add(new SqlParameter("@p_FormID", "CCT"));
    cmd.Parameters.Add(new SqlParameter("@p_UserId", "SA"));
    cmd.Parameters.Add(new SqlParameter("@p_Params", 1));
    cmd.CommandType = CommandType.StoredProcedure;

    con.Open();

    // var object1 = RunTimeClass.CreateNewObject(table);

    app.UseDataEngineProviders()
    .AddDataEngine("complex10", cmd);

    //.AddDataSource("dataset10", () => ProductData.GetData(100000).ToList())
    // .AddCube("cube",
    // @"Data Surce=http://ssrs.componentone.com/OLAP/msmdpump.dll;Provider=msolap;Initial Catalog=AdventureWorksDW2012Multidimensional",
    // "Adventure Works");


    }
    }


    It is possible can you give me some advance?

    thx,
    Maciej
  • Replied 14 March 2019, 3:56 pm EST

    Hello,
    We are sorry for the inconvenience.
    Please refer to the following documentation for information regards the Managing Data Source.
    http://help.grapecity.com/componentone/NetHelp/c1webapi/webframe.html#DataSourceManager.html

    Please refer to the following sample link and download which shows how the Data can be fetched directly from SQL server.
    https://www.grapecity.com/en/samples/asp-net-web-api-sales-analysis

    Hope it helps!

    Regards,
    Manish Gupta
Need extra support?

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

Learn More

Forum Channels