This is a migrated thread and some comments may be shown as answers.

Master/Detail Report

1 Answer 238 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Fachmann
Top achievements
Rank 1
Fachmann asked on 18 Jul 2008, 08:23 AM

Hi all.

I have a problem with Telerik Reporting and I need an advice.
I’m trying to do a master/detail report with subreports, using LINQ and NeedDataSource event.
Now I have a report and a subreport in it, and want to retrieve data in a master/detail order. I tried to add a new subreport constructor with a parameter that is transmitted to the Data source of the subreport, but it just retrieves the first registry from the database and repeats it for each element in the main report. I tried to add a new propriety and assign a value to it in the main report, but the result was the same. I think that’s because NeedDataSource is fired once at the subreport initiation.

Is there any solution the problem? How could such a master/detail report be build?

Thanks in advance.

Fachmann.

1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 21 Jul 2008, 11:33 AM
Hello Fachmann,

We've already answered your inquiry in your support ticket. Here is the answer in case somebody else from the community is having similar problems/questions:
" As you know the NeedDataSource event is fired for a Report / SubReport item only if there is no DataSource set  in the definition of the report. As a consequence of that, when on the first entering in the NeedDataSource handler of a subreport you set a data source like this.DataSource = ... (to the definition) for the following detail of the master report, the event will not be fired. So probably that is what is happening in your report. Instead you need to set the data source of the processing instance of the subreport.
Please examine the sample from this forum thread where you will find implementation on what you are trying to accomplish. Also you will find useful reading this forum thread."

Please avoid opening multiple threads for the same question/issue. If the inquiry is urgent it would be best to open a support ticket as they are reviewed with higher priority and have faster turn around time.

Kind regards,
Steve
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
General Discussions
Asked by
Fachmann
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or