TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sagar Bandkar
1.4k
347
48.7k
How to increase hight and width of rdlc report in mvc 5
Mar 24 2017 1:35 AM
Controller:
public ActionResult ReportHome()
{
ReportViewer reportViewer = new ReportViewer();
reportViewer.ProcessingMode = ProcessingMode.Local;
reportViewer.SizeToReportContent = true;
//reportViewer.Width = Unit.Percentage(100);
//reportViewer.Height = Unit.Percentage(100);
reportViewer.Width = Unit.Pixel(1600);
reportViewer.Height = Unit.Pixel(1600);
var connectionString = ConfigurationManager.ConnectionStrings["HrPlusWebConnectionString"].ConnectionString;
SqlConnection conx = new SqlConnection(connectionString); SqlDataAdapter adp = new SqlDataAdapter("SELECT * FROM tblMstCity_CTY", conx);
adp.Fill(ds, ds.tblMstCity_CTY.TableName);
reportViewer.LocalReport.ReportPath = Request.MapPath(Request.ApplicationPath) + @"Reports\EmpReport.rdlc";
reportViewer.LocalReport.DataSources.Add(new ReportDataSource("HrPlusWebDataSet1", ds.Tables["tblMstCity_CTY"]));
ViewBag.ReportViewer = reportViewer;
return View();
}
View-
@using ReportViewerForMvc;
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<body>
@Html.ReportViewer(ViewBag.ReportViewer as Microsoft.Reporting.WebForms.ReportViewer)
</body>
</html>
Reply
Answers (
0
)
Exiting a console app from deep in the code
How Log function name using Log4Net?