Last post Dec 19, 2011 01:18 AM by Anurag Saklani
Dec 17, 2011 06:56 AM|Anurag Saklani|LINK
Using VS 2010 , Crystal Reports 13 :
DataTable dTable = fnGetReportData(); // this functions fills up data according to parameters passed eg: data from date // "1 Dec 2011" to "15 Dec 2011" from a view
ReportDocument rptDoc = new ReportDocument();
rptDoc.SetDatabaseLogon("username", "password", "server", "database");
CrystalReportViewer1.ReportSource = rptDoc ;
<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server"
HasCrystalLogo="False" ReuseParameterValuesOnRefresh="True" />
But when I run it, crystal report displays whole of the data present in source view.
Dec 17, 2011 09:09 AM|Careed|LINK
It may be that whatever datasource is defined in the actual report is overriding the SetDataSource method. Run this after commenting out your SetDataSource method call and see if you get the same result. If so, then you will need to reconfigure your report
to use an ADO.NET DataSet to make this work within your application.
Dec 19, 2011 01:18 AM|Anurag Saklani|LINK
Yes you were right, when i commented setdatasource method it still worked and in the same way. Now i created a new report and its working finr. Cant figure out what happened.
Can you suggest why or how the datasource overrides the setdatasource method?
Thanks for the solution :D