Here is my code which produce “Value does not fall within the expected range” exception.
ReportDataSource objReportDataSource
= new ReportDataSource(“CategoryProduct”);
objReportDataSource.Name = “NewDataSet_CategoryProducts”;
// dsDataSet is DataSet object
objReportDataSource.Value = dsData;
After doing some try and error method I found that this exception is due to objReportDataSource.Value = dsData. You need to assign a DataTable to Value property instead of DataSet. Below is the code that is working fine.
ReportDataSource objReportDataSource
= new ReportDataSource(“CategoryProduct”);
objReportDataSource.Name = “NewDataSet_CategoryProducts”;
// dsDataSet is DataSet object
objReportDataSource.Value = dsData.Tables[0];
hi, i want to create .pdf file through coad in asp.net..i m success to download .doc file but not for .pdf file..pls tell me
Hetal,
Are you using Report Viewer or some custom code to generate PDF? Can you give me some brief description about this?
subject : Parent page is posted back..
I want solution that Parent form must not get refresh after open a pop-up
form…Here i have used link button to open a pop-up form…..
Language used in application:ASP.NET 2.0 With C#
Please replay solution on sandipsavaliya_e@yahoo.com
Your post helped me. A more succinct version would be new ReportDataSource(“NewDataSet_CategoryProducts”, dsData.Tables[0])
Thanks!
Thanks to this articke, I saved a lot of time 🙂
ooh yeah nice one, thanks! 🙂
Thank you.
Harish
Awesome. Thanks!
Dude you saved my life, along with some hair I was pulling out by the roots as well.
thanks a bunch
this was very nice article….thanks
Thnak You
Great!!!! Your post helped me a lot after an hour of fiddling and googling… Thanks