public async Task <ActionResult> EmbedReport(string username, string roles) { var embedResult = await m_embedService.EmbedReport(username, roles, "9ea04759-91ed-4ebe-98bf-149a0e1b26c3", "5528de06-a650-4fe7-81fc-022a6f54fb61"); if (embedResult) { return(View(m_embedService.EmbedConfig)); } else { return(View(m_embedService.EmbedConfig)); } }
public async Task <ActionResult> PruebaMapa(string id, string id2) { var embedResult = await m_embedService.EmbedReport(null, null, id, id2); if (embedResult) { return(View(m_embedService.EmbedConfig)); } else { return(View(m_embedService.EmbedConfig)); } }
//public async Task<ActionResult> EmbedReport(string username, string roles) public async Task <ActionResult> EmbedReport() { //string t1 = username; //string t2 = roles; var embedResult = await m_embedService.EmbedReport(null, null, "c91b25db-feea-4299-a065-329d736254cb", "eef10812-422e-46b2-b828-e6ab4e4a56ff"); if (embedResult) { //m_embedService.EmbedConfig.EmbedUrl = "https://app.powerbi.com/reportEmbed?reportId=8f96cbcd-dcd2-4cc6-9cf5-b4897758069f&autoAuth=true&ctid=8fbaa5bf-2ecc-4dc8-b56b-8f92e307f076&config=eyJjbHVzdGVyVXJsIjoiaHR0cHM6Ly93YWJpLXNvdXRoLWNlbnRyYWwtdXMtcmVkaXJlY3QuYW5hbHlzaXMud2luZG93cy5uZXQvIn0%3D"; return(View(m_embedService.EmbedConfig)); } else { return(View(m_embedService.EmbedConfig)); } }
public async Task OnGet() { // await _embedService.EmbedReport("*****@*****.**", "User_Read"); await _embedService.EmbedReport("89bc4df8-0d2b-4f78-ad55-e4a0e200a5d0", "User_Read"); // await _embedService.EmbedReport("", ""); EmbedConfig = _embedService.EmbedConfig; }
public async Task <ActionResult> EmbedReport(int id) { ViewBag.codcom = id; ViewBag.columna = "Codcom"; ViewBag.tabla = "Medio_Ambiente"; var embedResult = await m_embedService.EmbedReport(null, null, "264e7426-a930-49cf-a552-a0ab387df342"); //var embedResult = await m_embedService.EmbedReport(null, null, "f9eafdc6-98a1-4aa9-a525-66b9a2136e0d"); //var embedResult = await m_embedService.EmbedReport(null, null, "5c435e01-ed69-4d55-a996-6dc6871b4174"); if (embedResult) { //m_embedService.EmbedConfig.EmbedUrl = "https://app.powerbi.com/reportEmbed?reportId=8f96cbcd-dcd2-4cc6-9cf5-b4897758069f&autoAuth=true&ctid=8fbaa5bf-2ecc-4dc8-b56b-8f92e307f076&config=eyJjbHVzdGVyVXJsIjoiaHR0cHM6Ly93YWJpLXNvdXRoLWNlbnRyYWwtdXMtcmVkaXJlY3QuYW5hbHlzaXMud2luZG93cy5uZXQvIn0%3D"; return(View(m_embedService.EmbedConfig)); } else { return(View(m_embedService.EmbedConfig)); } }
public async Task <ActionResult> EmbedReport(string id, string id1) { // --- If we don't have a workspace ID and a Report ID then we need to go back to the index. if (string.IsNullOrEmpty(id) || string.IsNullOrEmpty(id1)) { return(RedirectToAction("Index")); } var embedResult = await m_embedService.EmbedReport(id, id1); return(View(m_embedService.EmbedConfig)); }
public async Task <ActionResult> EmbedReport(string username, string roles) { var embedResult = await m_embedService.EmbedReport(username, roles); if (embedResult) { return(View(m_embedService.EmbedConfig)); } else { return(View(m_embedService.EmbedConfig)); } }
public async Task<ActionResult> EmbedReport(string GroupId, string ReportId) { var embedResult = await m_embedService.EmbedReport(null, null, GroupId, ReportId); if (embedResult) { //return View(m_embedService.EmbedConfig); return Json(new { EmbedToken = m_embedService.EmbedConfig.EmbedToken.Token, EmbedUrl = m_embedService.EmbedConfig.EmbedUrl, Id = m_embedService.EmbedConfig.EmbedToken.TokenId, ErrorMessage = "Token Received Successful.", StatusCode = 200 }, JsonRequestBehavior.AllowGet); } else { return Json(new { EmbedToken = "", EmbedUrl = "", Id = "", ErrorMessage = "Authentication Failed.", StatusCode = 400 }, JsonRequestBehavior.AllowGet); } }
//public ActionResult Reporting(string username, string roles) public async Task <ActionResult> Reporting(string username, string roles) { ViewBag.Message = "BI test page."; //return View(); var embedResult = await m_embedService.EmbedReport(username, roles); if (embedResult) { return(View(m_embedService.EmbedConfig)); } else { return(View(m_embedService.EmbedConfig)); } }
public async Task <ActionResult> Index() { string username = string.Empty, roles = string.Empty, customdata = string.Empty; m_embedService.EmbedConfig.Trace(this, "Index - GetUserDetailsFromSharePoint()..."); GetUserdetailsFromSharePoint(ref username, ref roles, ref customdata); m_embedService.EmbedConfig.Trace(this, "Index - EmbedReport()..."); var embedResult = await m_embedService.EmbedReport(username, roles, customdata); if (embedResult) { return(View(m_embedService.EmbedConfig)); } else { return(View(m_embedService.EmbedConfig)); } }
protected async void Page_Load(object sender, EventArgs e) { try { var embedResult = await m_embedService.EmbedReport(null, null); if (embedResult) { accessTokenText.Value = m_embedService.EmbedConfig.EmbedToken.Token; embedUrlText.Value = m_embedService.EmbedConfig.EmbedUrl; embedReportIdText.Value = m_embedService.EmbedConfig.Id; } else { } } catch (Exception exp) { throw exp; } }
public async Task <ActionResult> EmbedReport(string id = "Colón") { //byte[] bytes = Encoding.Default.GetBytes(id); //id = Encoding.UTF8.GetString(bytes); ViewBag.codcom = id; ViewBag.columna = "Departamento"; ViewBag.tabla = "Localiza_HN"; //var embedResult = await m_embedService.EmbedReport(null, null, "77f365eb-0cbf-4c0b-8bf9-66d87b47ab60", "f9eafdc6-98a1-4aa9-a525-66b9a2136e0d"); var embedResult = await m_embedService.EmbedReport(null, null, "90461ecc-1682-492c-af3f-41b2063619b9", "f9eafdc6-98a1-4aa9-a525-66b9a2136e0d"); //var embedResult = await m_embedService.EmbedReport(null, null, "f9eafdc6-98a1-4aa9-a525-66b9a2136e0d"); //var embedResult = await m_embedService.EmbedReport(null, null, "5c435e01-ed69-4d55-a996-6dc6871b4174"); if (embedResult) { return(View(m_embedService.EmbedConfig)); } else { return(View(m_embedService.EmbedConfig)); } }
public async Task <ActionResult> EmbedReport(string username, string roles) { var embedResult = false; var reportName = Request.QueryString["name"].ToString(); var deviceType = Request.QueryString["d"].ToString(); if (deviceType == "m") { if (reportName.ToLower() == "quick stats") { embedResult = await m_QuickStat_Mobile.EmbedReport(username, roles); } else if (reportName.ToLower() == "quick stats lfl") { embedResult = await m_QuickStatLFL_Mobile.EmbedReport(username, roles); } else if (reportName.ToLower() == "operations") { embedResult = await m_DailyLabour_Mobile.EmbedReport(username, roles); } else { embedResult = await m_SCSummary_Mobile.EmbedReport(username, roles); } if (embedResult) { if (reportName.ToLower() == "quick stats") { return(View(m_QuickStat_Mobile.EmbedConfig)); } else if (reportName.ToLower() == "quick stats lfl") { return(View(m_QuickStatLFL_Mobile.EmbedConfig)); } else if (reportName.ToLower() == "operations") { return(View(m_DailyLabour_Mobile.EmbedConfig)); } else { return(View(m_SCSummary_Mobile.EmbedConfig)); } } else { return(View(m_embedService.EmbedConfig)); } } // else { //Note: QuickStats All Report if (reportName.ToLower() == "quick stats") { embedResult = await m_embedService.EmbedReport(username, roles); } else if (reportName.ToLower() == "quick stats lfl") { embedResult = await m_LFLembedService.EmbedReport(username, roles); } //Note: Finance all the view else if (reportName.ToLower() == "pl fy view") { embedResult = await m_FinanceFYview.EmbedReport(username, roles); } else if (reportName.ToLower() == "pl head office view") { embedResult = await m_FinanceHOview.EmbedReport(username, roles); } else if (reportName.ToLower() == "pl multi location view") { embedResult = await m_FinanceMLview.EmbedReport(username, roles); } //Note: Operational All Report else if (reportName.ToLower() == "operational insights") { embedResult = await m_OpInsights.EmbedReport(username, roles); } else if (reportName.ToLower() == "daily labour analysis") { embedResult = await m_OpDailyLabourAnalysis.EmbedReport(username, roles); } else if (reportName.ToLower() == "actual projected labour") { embedResult = await m_OpActualProjectLabour.EmbedReport(username, roles); } else if (reportName.ToLower() == "sales by product hierarchy") { embedResult = await m_OpSalesByProductHierarchy.EmbedReport(username, roles); } else if (reportName.ToLower() == "mystery shopper qar") { embedResult = await m_OpMysteryShopperQAR.EmbedReport(username, roles); } else if (reportName.ToLower() == "sales by sales channel") { embedResult = await m_HOMAAUES.EmbedReport(username, roles); } else if (reportName.ToLower() == "sales by promotions") { embedResult = await m_OPsalesByPromotions.EmbedReport(username, roles); } else if (reportName.ToLower() == "daily corp stats store view") { embedResult = await m_OPdailyCropStoreView.EmbedReport(username, roles); } //Note: Head Office All Report else if (reportName.ToLower() == "finance") { embedResult = await m_FinanceReport.EmbedReport(username, roles); } else if (reportName.ToLower() == "marketing") { embedResult = await m_MarketingReport.EmbedReport(username, roles); } //Note: Head Office Finance All Report else if (reportName.ToLower() == "hofinance") { var sName = Request.QueryString["sname"].ToString(); if (sName == "fr1") { embedResult = await m_HOFDCSSR.EmbedReport(username, roles); } else if (sName == "fr2") { embedResult = await m_HOFSBDBMT.EmbedReport(username, roles); } else if (sName == "fr3") { embedResult = await m_HOFSSFW.EmbedReport(username, roles); } else if (sName == "fr4") { embedResult = await m_HOFGCS.EmbedReport(username, roles); } else if (sName == "fr5") { embedResult = await m_HOFSSFMY.EmbedReport(username, roles); } else if (sName == "fr6") { embedResult = await m_HOFLSSFY.EmbedReport(username, roles); } else if (sName == "fr7") { embedResult = await m_HOFLSSF.EmbedReport(username, roles); } else if (sName == "fr9") { embedResult = await m_HOFRSD.EmbedReport(username, roles); } else if (sName == "fr10") { embedResult = await m_HOFSBS.EmbedReport(username, roles); } else { embedResult = await m_HOFBST.EmbedReport(username, roles); } } //Note: Head Office Marketing All Report Service else if (reportName.ToLower() == "homarketing") { var sName = Request.QueryString["sname"].ToString(); /*if (sName == "mr1") * { * embedResult = await m_HOMAAUES.EmbedReport(username, roles); * }*/ if (sName == "mr2") { embedResult = await m_HOMBSR.EmbedReport(username, roles); } else if (sName == "mr3") { embedResult = await m_HOMMAATV.EmbedReport(username, roles); } else if (sName == "mr4") { embedResult = await m_HOMMR.EmbedReport(username, roles); } else if (sName == "mr5") { embedResult = await m_HOMPSC.EmbedReport(username, roles); } else if (sName == "mr6") { embedResult = await m_HOMSBTR.EmbedReport(username, roles); } else if (sName == "mr7") { embedResult = await m_HOMTTMRBS.EmbedReport(username, roles); } else if (sName == "mr8") { embedResult = await m_HOMWR.EmbedReport(username, roles); } else { embedResult = await m_HOMBST.EmbedReport(username, roles); } } //Note: Help Report Service else if (reportName.ToLower() == "dashboard help") { embedResult = await m_HelpReport.EmbedReport(username, roles); } //Note: Scorecard All Report else if (reportName.ToLower() == "scorecard summary") { embedResult = await m_SCSummary.EmbedReport(username, roles); } else if (reportName.ToLower() == "aggregated view") { embedResult = await m_SCAggView.EmbedReport(username, roles); } else if (reportName.ToLower() == "network comparison") { embedResult = await m_NetworkComparison.EmbedReport(username, roles); } else { //For monthly run rate embedResult = await m_SCMonthlyRunRate.EmbedReport(username, roles); } if (embedResult) { //Note: Quick Stat Report View if (reportName.ToLower() == "quick stats") { return(View(m_embedService.EmbedConfig)); } else if (reportName.ToLower() == "quick stats lfl") { return(View(m_LFLembedService.EmbedConfig)); } //Note: Finance Report View else if (reportName.ToLower() == "pl fy view") { return(View(m_FinanceFYview.EmbedConfig)); } else if (reportName.ToLower() == "pl head office view") { return(View(m_FinanceHOview.EmbedConfig)); } else if (reportName.ToLower() == "pl multi location view") { return(View(m_FinanceMLview.EmbedConfig)); } //Note: Operational Report View else if (reportName.ToLower() == "operational insights") { return(View(m_OpInsights.EmbedConfig)); } else if (reportName.ToLower() == "daily labour analysis") { return(View(m_OpDailyLabourAnalysis.EmbedConfig)); } else if (reportName.ToLower() == "actual projected labour") { return(View(m_OpActualProjectLabour.EmbedConfig)); } else if (reportName.ToLower() == "sales by product hierarchy") { return(View(m_OpSalesByProductHierarchy.EmbedConfig)); } else if (reportName.ToLower() == "mystery shopper qar") { return(View(m_OpMysteryShopperQAR.EmbedConfig)); } else if (reportName.ToLower() == "sales by sales channel") { return(View(m_HOMAAUES.EmbedConfig)); } else if (reportName.ToLower() == "sales by promotions") { return(View(m_OPsalesByPromotions.EmbedConfig)); } else if (reportName.ToLower() == "daily corp stats store view") { return(View(m_OPdailyCropStoreView.EmbedConfig)); } //Note: Head Office All Report else if (reportName.ToLower() == "finance") { return(View(m_FinanceReport.EmbedConfig)); } else if (reportName.ToLower() == "marketing") { return(View(m_MarketingReport.EmbedConfig)); } //Note: Head Office Finance Report View //Note: Head Office Finance All Report else if (reportName.ToLower() == "hofinance") { var sName = Request.QueryString["sname"].ToString(); if (sName == "fr1") { return(View(m_HOFDCSSR.EmbedConfig)); } else if (sName == "fr2") { //embedResult = await m_HOFSBDBMT.EmbedReport(username, roles); return(View(m_HOFSBDBMT.EmbedConfig)); } else if (sName == "fr3") { //embedResult = await m_HOFSSFW.EmbedReport(username, roles); return(View(m_HOFSSFW.EmbedConfig)); } else if (sName == "fr4") { //embedResult = await m_HOFGCS.EmbedReport(username, roles); return(View(m_HOFGCS.EmbedConfig)); } else if (sName == "fr5") { //embedResult = await m_HOFSSFMY.EmbedReport(username, roles); return(View(m_HOFSSFMY.EmbedConfig)); } else if (sName == "fr6") { //embedResult = await m_HOFLSSFY.EmbedReport(username, roles); return(View(m_HOFLSSFY.EmbedConfig)); } else if (sName == "fr7") { //embedResult = await m_HOFLSSF.EmbedReport(username, roles); return(View(m_HOFLSSF.EmbedConfig)); } else if (sName == "fr9") { // embedResult = await m_HOFLSSFY.EmbedReport(username, roles); return(View(m_HOFRSD.EmbedConfig)); } else if (sName == "fr10") { //embedResult = await m_HOFSBS.EmbedReport(username, roles); return(View(m_HOFSBS.EmbedConfig)); } else { //embedResult = await m_HOFBST.EmbedReport(username, roles); return(View(m_HOFBST.EmbedConfig)); } } //Note: Head Office Marketig Report View else if (reportName.ToLower() == "homarketing") { var sName = Request.QueryString["sname"].ToString(); /*if (sName == "mr1") * { * return View(m_HOMAAUES.EmbedConfig); * }*/ if (sName == "mr2") { return(View(m_HOMBSR.EmbedConfig)); } else if (sName == "mr3") { return(View(m_HOMMAATV.EmbedConfig)); } else if (sName == "mr4") { return(View(m_HOMMR.EmbedConfig)); } else if (sName == "mr5") { return(View(m_HOMPSC.EmbedConfig)); } else if (sName == "mr6") { return(View(m_HOMSBTR.EmbedConfig)); } else if (sName == "mr7") { return(View(m_HOMTTMRBS.EmbedConfig)); } else if (sName == "mr8") { return(View(m_HOMWR.EmbedConfig)); } else { return(View(m_HOMBST.EmbedConfig)); } } //Note: Help Report View else if (reportName.ToLower() == "dashboard help") { return(View(m_HelpReport.EmbedConfig)); } //Note: Scorecard Report View else if (reportName.ToLower() == "scorecard summary") { return(View(m_SCSummary.EmbedConfig)); } else if (reportName.ToLower() == "network comparison") { return(View(m_NetworkComparison.EmbedConfig)); } else if (reportName.ToLower() == "aggregated view") { return(View(m_SCAggView.EmbedConfig)); } else { return(View(m_SCMonthlyRunRate.EmbedConfig)); } } else { return(View(m_embedService.EmbedConfig)); } } }