0
Good afternoon, I am with a very strange error, I have a report in Crystal Reports that the same shows the data of a table (there is no form or parameter in the report it only shows the data of a single table), the error is as follows, I am in the Crystal Reports editor and F5 tightening it updates the table normally, let’s assume that this table has 3 lines and inside the editor they appear correctly, but when I am in the C# code and run the program with the following code:
Reportdocument cryRpt = new Reportdocument();
cryRpt.Load(@"Reports Stock.rpt");
cryRpt.Datasourceconnections[0]. Integratedsecurity = false;
cryRpt.Datasourceconnections[0]. Setconnection(Sqlcontroller.Server, Sqlcontroller.Database, Sqlcontroller.Userid, Sqlcontroller.Pass);
crystalReportViewer1.Reportsource = cryRpt;
crystalReportViewer1.Refresh();
It turns out that the same only shows the information that was presented when I saved the report there in the editor of Crystal Reports. This table is generated by another system, that is, it is dynamic. When I created the report and at that moment the table had 3 lines when I will do for the code it only appears the 3 lines, but if I go in the table (there in SQL Server) she at that time had 10 lines the report only will show 3, ai when I go in the CR editor and F5 tightening it shows the 10 lines if I save the report and go to C# and at that moment the table is with 7 lines the same will only show the information with 10 lines that was the last time it was saved in the CR editor, that is the report is not updating, what should I do?
You have an option in Crystal Reports. File -> Options -> Generating Report -> Save Data with Report. Uncheck this option.
– Bruno Warmling