Problem accessing data within a Crystal Report
we are using the crystalreportviewer model and a call of the form "ReportSource.Rows[x].Rows.DataRowView\['yyyyy'\]" to access the customer data within a report from a .NET C# application. x stands for the row number and yyyy is a name of a field present in the report. The report was designed with a single group (customer data like name, address etc.) and a detail area (phone numbers of the customers. For one customer may exist more than 1 phone number). These two areas are set to overlap. The data are fetched using the built-in query of the report (i.e. the query was created within the crystal report designer and it is not overwritten in our code. Going through the report rows works in most cases without a problem but for certain data rows I get an "out of index" exception for the "ReportSource.Rows[x].Rows" statement (looks like the group details are just empty).
I have checked the rows the code works for and the rows for which the exception is thrown and could not really identify any differences that may be causing the problem. If you have any suggestions on this, I would be most grateful!
PS: No grouping operators are applied on the customer data but I guess this is not necessary since all rows fetched from the database within a group contain the same values for all customer attributes (except from the phone numbers)
select customer.name,customer.id,customer.address,telefon.number from customer,telefon where telefon.Id=customer.Id;
Group 1 (Group by customer.name + customer.Id): Customer.Name, Customer.Address ...
Details : Telefon.Number
Edited by: Efstratios Karaivazoglou on Sep 17, 2008 11:00 PM