Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
141012 | Nov 19,2018 04:54 AM UTC | Nov 19,2018 05:47 AM UTC | PHP | 1 |
![]() |
Tags: ReportViewer |
<?php
$reportviewer = new EJ\ReportViewer('territorysales_reportViewer');
echo $reportviewer->reportServiceUrl("http://localhost:62610/api/ReportApi" )->processingMode("Local")->reportPath("~/App_Data/Region.rdlc")->render();
?> |
public class ReportApiController : ApiController,IReportController
{
//Post action for processing the rdl/rdlc report
public object PostReportAction(Dictionary < string, object > jsonResult)
{
return ReportHelper.ProcessReport(jsonResult, this);
}
//Get action for getting resources from the report
[System.Web.Http.ActionName("GetResource")]
[AcceptVerbs("GET")]
public object GetResource(string key, string resourcetype, bool isPrint)
{
return ReportHelper.GetResource(key, resourcetype, isPrint);
}
//Method will be called when initialize the report options before start processing the report
public void OnInitReportOptions(ReportViewerOptions reportOption)
{
}
//Method will be called when reported is loaded
public void OnReportLoaded(ReportViewerOptions reportOption)
{
reportOption.ReportModel.DataSources.Clear();
reportOption.ReportModel.DataSources.Add(new ReportDataSource { Name = "StoreSales", Value = StoreSales.GetData() });
} |
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.