Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
147427 | May 7,2018 06:30 AM UTC | Mar 3,2020 01:02 PM UTC | JavaScript - EJ 2 | 13 |
![]() |
Tags: Grid |
[EnableCors(origins: "*", headers: "*", methods: "*")]
public class AssetSummaryController : ApiController, IReportController
{
[System.Web.Http.ActionName("GetResource")]
[AcceptVerbs("GET")]
public object GetResource(string key, string resourceType, bool isPrinting)
{
//Returns the report resource for the requested key.
return ReportHelper.GetResource(key, resourceType, isPrinting);
}
public void OnInitReportOptions(ReportViewerOptions reportOptions)
{
reportOptions.ReportModel.ReportServerCredential = new System.Net.NetworkCredential("ssrs", "RDLReport1");
reportOptions.ReportModel.DataSourceCredentials.Add(new DataSourceCredentials("AdventureWorks", "ssrs1", "RDLReport1"));
}
public void OnReportLoaded(ReportViewerOptions reportOptions)
{
}
[HttpPost]
public object PostReportAction(Dictionary<string, object> jsonData)
{
//Processes the report request and returns the result.
return ReportHelper.ProcessReport(jsonData, this);
}
public string GetText()
{
return "WebAPI working";
}
} |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.