asp.net - Crystal report display no data although the DataSet is set using push method -


i'm new crystal report. i'm facing issue report show no data although dataset showed did have data during debugging. noticed went wrong after line " m_rptviewreport.setdatasource(ds); ", show "hasrecords = function evaluation disabled because previous function evaluation timed out. must continue execution reenable function evaluation crystal reports" basically, i'm trying export data xls file using push method. i'm using vs2015 , crystal report assembly version 13.0.3500.0

pls take @ code

    public bool exporttofile(dataset ds,string filetype)      {          try          {              object obj = null;              char[] split ={ '.' };              crystaldecisions.crystalreports.engine.reportdocument m_rptviewreport = null;                    if (file.exists(request.physicalapplicationpath + "\\" + this.reportfile))                  {                     try {                       m_rptviewreport = new crystaldecisions.crystalreports.engine.reportdocument();                      m_rptviewreport.load(request.physicalapplicationpath + "\\" + this.reportfile);                          ds.writexml("d:\\testfile.xml", xmlwritemode.writeschema); //the output xml file have data                         m_rptviewreport.setdatasource(ds);//something went wrong after line                     }                     catch (exception ex) //nothing happened here                     {                         throw ex;                     }                  }                  else                      this.settexttitle(resources.getlanguage("msgnofile") + " " + this.reportfile);               if (m_rptviewreport.hasrecords){ //i added line later , founded value not true              if (m_rptviewreport != null)              {                 setreportparametervalue(m_rptviewreport);                          response.contenttype = "application/vnd.ms-excel";                          try {                             m_rptviewreport.exporttohttpresponse(crystaldecisions.shared.exportformattype.excel, response, true, this.reportcode);                          }                         catch (system.threading.threadabortexception ex1)                         {                             //throw ex1;                         }               }             }             return true;          }          catch(exception ex)          {             return false;          }      } 

any appreciated.

<cr:crystalreportviewer id="crystalreportviewer1" runat="server" autodatabind="true" grouptreeimagesfolderurl="" height="1202px" toolbarimagesfolderurl="" toolpanelwidth="200px" width="1104px" />            

can please try removing datasource of report ui, donot specify report datasource in crystal report viewer.

use above sample code , remove reportdatasource etc, , try now.


Comments

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -