c# - Data not fetch in to Excel from rdlc -


i have rdlc file generate report in excel/pdf format. when check stored procedure, data working fine. when export in button click, doesn't bring data. missing fields data, show in blank column have data when check stored procedure. can me this?

public actionresult exportlist(int ptid, int fyid, int itid)         {             localreport lr = new localreport();             reportparameter rp = new reportparameter("ptid", ptid.tostring());             reportparameter rp1 = new reportparameter("fyid", fyid.tostring());             reportparameter rp2 = new reportparameter("itid", itid.tostring());             lr.datasources.clear();             string path = path.combine(server.mappath("~/report"), "exportlist.rdlc");             if (system.io.file.exists(path))             {                 lr.reportpath = path;             }             else             {                 return view("index");             }             lr.setparameters(new reportparameter[] { rp });             lr.setparameters(new reportparameter[] { rp1 });             lr.setparameters(new reportparameter[] { rp2 });             reportdatasource rd = new reportdatasource("exportds", _atmanager.exports(ptid, fyid, itid));             lr.datasources.add(rd);             lr.refresh();             string reporttype = "excel";             string mimetype;             string encoding;             string filenameextension;              string deviceinfo =              "<deviceinfo>" +             "  <outputformat>" + "excel" + "</outputformat>" +             "  <pagewidth>12.5in</pagewidth>" +             "  <pageheight>11in</pageheight>" +             "  <margintop>0.5in</margintop>" +             "  <marginleft>2in</marginleft>" +             "  <marginright>1.5in</marginright>" +             "  <marginbottom>0.5in</marginbottom>" +             "</deviceinfo>";              warning[] warnings;             string[] streams;             byte[] renderedbytes;               renderedbytes = lr.render(                 reporttype,                 deviceinfo,                 out mimetype,                 out encoding,                 out filenameextension,                 out streams,                 out warnings);               return file(renderedbytes, mimetype);                     } 

the sample data following : x y z 0 0 1
0 0 1
0 0 1
while, correct data fields contains data. in advance..


Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -