You must Sign In to post a response.
Category: LINQ
#758992
Hi Sim
Refer below links for generating rdlc with linq.
www.nullskull.com/q/10321767/report-using-linq.aspx
stackoverflow.com/questions/21551441/how-can-you-use-linq-result-with-rdlc-report
Regards
Sridhar.
DNS Member.
"Hope for the best.. prepare for the worst.."
Sridhar Thota.
Editor: DNS Forum.
Refer below links for generating rdlc with linq.
www.nullskull.com/q/10321767/report-using-linq.aspx
stackoverflow.com/questions/21551441/how-can-you-use-linq-result-with-rdlc-report
Regards
Sridhar.
DNS Member.
"Hope for the best.. prepare for the worst.."
Sridhar Thota.
Editor: DNS Forum.
#758993
Hello Sim,
Refer the below links to generate RDLC reports using Linq as data source:
http://www.codeproject.com/Questions/622188/RDLC-report-with-LINQ-datasource
http://stackoverflow.com/questions/4949205/how-do-i-use-linq-as-datasource-for-a-microsoft-report
http://www.nullskull.com/q/10321767/report-using-linq.aspx
Hope this will help you.
Regards,
Nirav Lalan
DNS Gold Member
"If you can dream it, you can do it."
Refer the below links to generate RDLC reports using Linq as data source:
http://www.codeproject.com/Questions/622188/RDLC-report-with-LINQ-datasource
http://stackoverflow.com/questions/4949205/how-do-i-use-linq-as-datasource-for-a-microsoft-report
http://www.nullskull.com/q/10321767/report-using-linq.aspx
Hope this will help you.
Regards,
Nirav Lalan
DNS Gold Member
"If you can dream it, you can do it."
#759014
You need to first design rdlc report, then as data source you can use either SQL or LINQ
first you need to Create a blank report and use Report Dataset Designer to add items to the dataset. and you need to Use Visual Studio Report Designer to design the layout of the report.
here is sample code for LINQ query
private void fnBuildDataSource(string v_strCountry)
{
NorthwindDataContext ctx = new NorthwindDataContext();
var datasource = from c in ctx.sp_LinqTest(v_strCountry)
orderby c.CustomerID
select c;
ReportParameter rpCountry = new ReportParameter("p_Country", v_strCountry);
this.rvNorthwind.LocalReport.SetParameters(new ReportParameter[] { rpCountry });
this.rvNorthwind.LocalReport.DataSources.Add(new ReportDataSource("sp_LinqTestResult", datasource.ToList()));
this.rvNorthwind.LocalReport.Refresh();
}
Thanks
Koolprasd2003
Editor, DotNetSpider MVM
Microsoft MVP 2014 [ASP.NET/IIS]
first you need to Create a blank report and use Report Dataset Designer to add items to the dataset. and you need to Use Visual Studio Report Designer to design the layout of the report.
here is sample code for LINQ query
private void fnBuildDataSource(string v_strCountry)
{
NorthwindDataContext ctx = new NorthwindDataContext();
var datasource = from c in ctx.sp_LinqTest(v_strCountry)
orderby c.CustomerID
select c;
ReportParameter rpCountry = new ReportParameter("p_Country", v_strCountry);
this.rvNorthwind.LocalReport.SetParameters(new ReportParameter[] { rpCountry });
this.rvNorthwind.LocalReport.DataSources.Add(new ReportDataSource("sp_LinqTestResult", datasource.ToList()));
this.rvNorthwind.LocalReport.Refresh();
}
Thanks
Koolprasd2003
Editor, DotNetSpider MVM
Microsoft MVP 2014 [ASP.NET/IIS]
#759146
hi, i mean generate report based on year and month that user key in inside the text box using linq to sql datasource, i currently is using asp.net, C# to develop the website.
Return to Return to Discussion Forum