on 08-15-2014 10:02 PM
Using Crystal Reports for Visual Studio 2010...
I am using the same report file for a Win form and web form version of the same utility program. The report was built bases on a view to the database, and both programs populate the report based on a dataset which has the same columns with restrictive where clauses, based on user input prior to populating the report.
On the Win Form version, when the user clicks a group on the Group Tree, the report nicely navigates to the appropriate section of the report. However... on the Web version, the ReportViewer makes a return trip to the database, refreshing the data with the entire view, overwriting the original content. In other words, out of lets say 50,000 possible records, if I ask for 50, they are displayed as I want, but in the web report, if I try and navigate to any of the 50, I get all 50,000 (an no navigation), an unwanted return to the database.
I am perplexed, as it is the same report file used by both versions.
I tried hiding the Group Tree panel (I don't need it), per instructions (CrystalReportViewer1.ToolPanelView = ToolPanelViewType.None;)
But that only closes the panel, and it is still available to the user to open (icon remaining). Is it possible to really make the Group Tree unavailable?
thanks,
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you, that will do the trick. Now to implement Ludek's answer, as I can't even get to page 2 of a report without a database error; and I shouldn't be returning to the database!
Failed to retrieve data from the database.
Details: [Database Vendor Code: 942 ] Failed to retrieve data from the database. Error in File FY_YTDbyCharge {56AAD9E2-04BF-4707-A2A3-3C0A4D3B24CE}.rpt:
Failed to retrieve data from the database.
Details: [Database Vendor Code: 942 ]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mark
The only time a report will prompt for database login if you are passing it a dataset is if the dataset does not match what it is expecting. I normally recommend the wiki Troubleshooting Issues with VS .NET Datasets and Crystal Reports as a good starting point, so please have a look at that, see if it helps point you towards a resolution.
- Ludek
Sorry Mark, the report is in session? Any action on the CR viewer causes a postback. This includes paging, zooming, drilling, etc., etc. From the behavior it looks like there is a postback occurring and of course the connection to the dataset is lost, so the report prompts for the last desperate thing to get the data.
- Ludek
Ludek,
What I wish to do is follow the instructions for placing the report in a session, per your suggestions above:
Place the report in session. See
OK, since I'm new at this, where does the code go? I can't seem to resolve RAPPBasePage, and I admit that without more specific directions on the linked page, I'm more than a bit lost with this.
Thanks,
Mark
------------------------
public partial class Reports : RAPPBasePage
{
private ReportDocument crReportDocument;
protected override void Page_Init(object sender, EventArgs e)
{
//connect method to master event
base.Page_Init(sender, e);
}
[. . .]
Place the report in session. See
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow us on Twitter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.