No report display in asp.net mvc using rdlc

Supermode

I am trying to display the report using the following code unfortunately nothing display or get download.

public ActionResult DetailsReport()
        {

            LocalReport localReport = new LocalReport();
            localReport.ReportPath = Server.MapPath("~/Content/Reports/Data.rdlc");
            ReportDataSource reportDataSource = new ReportDataSource("dsData", GetAllData());

            localReport.DataSources.Add(reportDataSource);
            string reportType = "PDF";
            string mimeType;
            string encoding;
            string fileNameExtension;

            //The DeviceInfo settings should be changed based on the reportType
            string deviceInfo =
            "<DeviceInfo>" +
            "  <OutputFormat>PDF</OutputFormat>" +
            "  <PageWidth>8.5in</PageWidth>" +
            "  <PageHeight>11in</PageHeight>" +
            "  <MarginTop>0.5in</MarginTop>" +
            "  <MarginLeft>1in</MarginLeft>" +
            "  <MarginRight>1in</MarginRight>" +
            "  <MarginBottom>0.5in</MarginBottom>" +
            "</DeviceInfo>";

            Warning[] warnings;
            string[] streams;
            byte[] renderedBytes;

            //Render the report
            renderedBytes = localReport.Render(
                reportType,
                deviceInfo,
                out mimeType,
                out encoding,
                out fileNameExtension,
                out streams,
                out warnings);
            Response.AddHeader("content-disposition", "attachment; filename=Data." + fileNameExtension);
            return File(renderedBytes, mimeType);


        }

 public static List<vwDataReport> GetAllData()
        {
            var entities = new DataEntities();
            var x = from c in entities.vwDataReport
                    select c;
            return x.ToList();
        }
Bappi Datta

Just Comment the following line, then rebuild the project.

Response.AddHeader("content-disposition", "attachment; filename=Data." + fileNameExtension);

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

xsd dataset not showing for rdlc report ASP.Net

From Dev

asp.net C# Rdlc Report Sum #Error in column

From Dev

Arabic language in RDLC Reports asp.net mvc

From Dev

Display image using FileStreamResult from ASP.Net MVC

From Dev

Crystal Report doesnt display in ASP.net webpage which is build by using VS 2013

From Dev

how to create RDLC report using multiple sql columns with same values to count in vb.net

From Dev

Report using RDLC can't load dataset

From Dev

Local RDLC report using spatial data

From Dev

RDLC / SSRS report using external image with "#" in filename

From Dev

How to display table from SQL Server using ASP NET MVC5 without using Entity Framework?

From Dev

asp.net mvc viewdata display in a viewpage

From Dev

Asp.net mvc display name attribute with @

From Dev

Asp.Net MVC Getting Display Names

From Dev

Display uploaded image asp.net mvc

From Dev

asp.net mvc viewdata display in a viewpage

From Dev

asp.net MVC display encoding character

From Dev

How can I use RDLC reports with the ReportViewer Control in ASP.Net MVC?

From Dev

How to display SSRS report in asp.net application

From Dev

Microsoft Report wizard cannot integrate in ASP.NET mvc project

From Dev

javascript code for loading crystal report in asp.net mvc

From Dev

StimulSoft Report For ASP.NET MVC5.2

From Dev

How to display error on the client when using ASP.NET MVC AJAX

From Dev

Create custom display attribute using or inherits DisplayAttribute in ASP.NET MVC

From Dev

Is there any way to display a toggle button in asp.net MVC using CheckBoxFor and Bootstrap

From Dev

asp.net mvc , raw sql : Display data in Views generated using aggregate function

From Dev

Display Time with Date in Gantt Chart using Syncfusion in asp.net Mvc

From Dev

How to display error on the client when using ASP.NET MVC AJAX

From Dev

Display Count or Total for each user in ASP.Net MVC table using View Model (vb)

From Dev

ASP.NET MVC 4 Display data From 2 Model using EF

Related Related

  1. 1

    xsd dataset not showing for rdlc report ASP.Net

  2. 2

    asp.net C# Rdlc Report Sum #Error in column

  3. 3

    Arabic language in RDLC Reports asp.net mvc

  4. 4

    Display image using FileStreamResult from ASP.Net MVC

  5. 5

    Crystal Report doesnt display in ASP.net webpage which is build by using VS 2013

  6. 6

    how to create RDLC report using multiple sql columns with same values to count in vb.net

  7. 7

    Report using RDLC can't load dataset

  8. 8

    Local RDLC report using spatial data

  9. 9

    RDLC / SSRS report using external image with "#" in filename

  10. 10

    How to display table from SQL Server using ASP NET MVC5 without using Entity Framework?

  11. 11

    asp.net mvc viewdata display in a viewpage

  12. 12

    Asp.net mvc display name attribute with @

  13. 13

    Asp.Net MVC Getting Display Names

  14. 14

    Display uploaded image asp.net mvc

  15. 15

    asp.net mvc viewdata display in a viewpage

  16. 16

    asp.net MVC display encoding character

  17. 17

    How can I use RDLC reports with the ReportViewer Control in ASP.Net MVC?

  18. 18

    How to display SSRS report in asp.net application

  19. 19

    Microsoft Report wizard cannot integrate in ASP.NET mvc project

  20. 20

    javascript code for loading crystal report in asp.net mvc

  21. 21

    StimulSoft Report For ASP.NET MVC5.2

  22. 22

    How to display error on the client when using ASP.NET MVC AJAX

  23. 23

    Create custom display attribute using or inherits DisplayAttribute in ASP.NET MVC

  24. 24

    Is there any way to display a toggle button in asp.net MVC using CheckBoxFor and Bootstrap

  25. 25

    asp.net mvc , raw sql : Display data in Views generated using aggregate function

  26. 26

    Display Time with Date in Gantt Chart using Syncfusion in asp.net Mvc

  27. 27

    How to display error on the client when using ASP.NET MVC AJAX

  28. 28

    Display Count or Total for each user in ASP.Net MVC table using View Model (vb)

  29. 29

    ASP.NET MVC 4 Display data From 2 Model using EF

HotTag

Archive