简体   繁体   中英

DevExpress error is missing a using directive or an assembly reference

I am working with mvc and DevExpress trying to force a download of a report that I already have created

I have the following error:

The type or name of the 'Reports' namespace does not exist in the 'BLL.Reportes' namespace (missing any assembly reference?)

My code C#

public ActionResult Test()
    {

        var report = new BLL.Reportes.SolicitudReporte(); <--- error
        var stream = new MemoryStream();
        report.ExportToPdf(stream);
        var cd = new System.Net.Mime.ContentDisposition
        {
            FileName = "ReportTest.pdf",
            Inline = false,
        };
        Response.AppendHeader("Content-Disposition", cd.ToString());
        return File(stream.ToArray(), "application/pdf");
    }

If I am using my reference to my project called "BLL"....

在此处输入图片说明 在此处输入图片说明

Try to remove the reference and add it again with the visual studio function: 在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM