asp.net mvc - i want to make data as image type in rdlc reports(pdf) -


i want make data image rather text user can't copy text pdf in rdlc reports.

 public fileresult downloadarticle(int id)     {         signalrdatacontext srcontext = new signalrdatacontext();         localreport localreport = new localreport();         localreport.reportpath = server.mappath("~/report/report1.rdlc");         reportdatasource reportdatasource = new reportdatasource();         localreport.enableexternalimages = true;         reportdatasource.name = "dataset1";         reportdatasource.value = srcontext.articles.where(x => x.articleid == id).select(x => new { x.code, x.article_name }).tolist();         localreport.datasources.add(reportdatasource);         string reporttype = "pdf";         string mimetype;         string encoding;         string filenameextension = "pdf";         warning[] warnings;         string[] streams;         byte[] renderedbytes;         renderedbytes = localreport.render(reporttype, "", out mimetype, out encoding, out filenameextension, out streams, out warnings);         response.addheader("content-disposition", "attachment;filename=membership." + filenameextension);         return file(renderedbytes, filenameextension);     } 

try changing report type , extension tiff. sql server reporting services supports reports using tiff format.

public fileresult downloadarticle(int id) {     ...     string reporttype = "tiff";     ...     string filenameextension = "tiff";     ... } 

Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -