-1

I'm using following Codes typing the parameters.....

var invdata = SaleInvCode.GetbyId(invID);
var invdat = (from a in db.invDetails where a.InvDetailID == invID select new { a.SaleInv, a.ProName, a.Discription, a.SaleQTY, a.SalePrice, a.SaleAmount }).ToList();
//var invdetai = from a in db.invHeaders select a;
/////////////////////////
invHeader.DataSource = invdata;
reportViewer1.LocalReport.DataSources.Add(new ReportDataSource(reportViewer1.LocalReport.GetDataSourceNames()[0], invHeader));
reportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Local;

error

Error:: The source of the report definition has not been specified

I'm creating Report parameter.....

Mike Zboray
  • 39,828
  • 3
  • 90
  • 122
Hassan Abbas
  • 467
  • 2
  • 8
  • 28
  • Please have a look at [I'm getting “The report definition for report 'xxxx.rdlc' has not been specified” in my RDLC report](http://stackoverflow.com/questions/8505700/im-getting-the-report-definition-for-report-xxxx-rdlc-has-not-been-specified/34435136#34435136). – Murat Yıldız Dec 23 '15 at 11:55

1 Answers1

1

You need to tell the report viewer which local report to use before you can assign any parameters.

Thorsten Dittmar
  • 55,956
  • 8
  • 91
  • 139