Use all the steps of https://www.c-sharpcorner.com/article/install-rdlc-extensions-in-visual-studio-2017
but also use following steps to see reportviewer
1) Add ProcessingMode="Local" to rsweb:ReportViewer
<rsweb:ReportViewer ID="ReportViewer2" runat="server" Font-Names="Verdana" Font-Size="8pt" WaitMessageFont-Names="Verdana" WaitMessageFont-Size="14pt" ProcessingMode="Local" Visible="false">
2) Add ReportPath="Report2.rdlc" to localreport tag and Name should be same as DataSet name given in Report2.rdlc design and datasourceid is objectdatasour ceor sqldatasource that you have created
<LocalReport ReportEmbeddedResource="WebApplication12.Report2.rdlc" ReportPath="Report2.rdlc" Name="DataSet1" DataSourceId="objDataSourceBook" >
or in c# you can use
ReportDataSource datasource = new ReportDataSource("DataSet2", objDataSourceBook); ReportViewer1.LocalReport.DataSources.Clear();
ReportViewer1.LocalReport.DataSources.Add(datasource);
3) Right click on Report2.rdlc and click on properties> Set property "Copy to output directory" to "copy if newer"
4) Click on ObjectDataSource in design view and click on configure data source and select xsd dataset that you have created. and next and finish.
or use below link for server side coding of Report viewer
https://aspdotnet-kishore.blogspot.com/2014/04/how-to-create-rdlc-report-using-aspnet.html
==================================================
> Click on Tools>Nuget Package manager
> In Nuget package manager Type (Install-Package Microsoft.ReportingServices.ReportViewerControl.WebForms -Version 150.1484.0)
Reference (https://www.nuget.org/packages/Microsoft.ReportingServices.ReportViewerControl.WebForms/)
>Now click on 'Toolbox'.
>Right Click on it.
>Click on Add tab
>Right click and click on choose items.
>Click on browse and select "Microsoft.ReportViewer.WebDesign.dll"
>Click on OK
Reference(https://www.c-sharpcorner.com/article/install-rdlc-extensions-in-visual-studio-2017/)
>Click on Tools
>Click on "Nuget Package manager"
>Click on "Manage Nuget packages for solution"
>Type "Microsoft.ReportViewer.webforms" or "Microsoft.ReportViewer.webforms.2010" and install it.
>At last relaunch visual studio.
>Write the below code
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<rsweb:ReportViewer ID="ReportViewer1" runat="server"></rsweb:ReportViewer>
</div>
> use the below reference for full code.
or
>Open visual studio
> Go to 'Extensions'
> In search box type 'report viewer'
>Click on 'Microsoft RDLC Report Designer' and click on download
(Now Report and report wizard will display)
or
Go to tools >Click on 'Get tools and features'
> Do the below steps
https://stackoverflow.com/questions/42084161/how-to-open-an-rdl-file-in-visual-studio
https://learn.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt?view=sql-server-ver16
No comments:
Post a Comment