Pushing data to subreport which is in group footer on the main report

Takamasa
Takamasa used Ask the Experts™
on
Hi

I have a main report which shows list of accounts that a client holds. It is grouped by account id. And under that group (in group footer) I placed a subreport, which shows details of the accounts (taking account id as linked parameter from the main report).

It works fine when I am designing the report and previewing it (Pull method).
But now I need to use Push method with C#.

I know I need to do .OpenSubreport("SubreportName") and .SetDataSrouce(dsSubreportData) to push the dataset to subreport. But when I pass the dataset containing all data to the subreport at once, the grouping does not work and all data get displayed under each account repeatedly.

Is there a solution to this ?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
Hi,
You can create 2 crystal report.
Both crystal report will contains its Stored procedure or sql syntax.

Lets it be Rpt A and Rpt B.
from Rpt A, you can insert a new sub report, which is Rpt B that u create.

You might need to pass a parameters to Rpt B to inform rpt B to show the related information.

by using this method, you can call 2 reports together, and it wouldn't make the grouping got problem.

Hope its help.

Mike McCrackenSenior Consultant
Most Valuable Expert 2011
Top Expert 2013

Commented:
Hoew did you link the subreport to the main report?

mlmcc

Author

Commented:
hi mlmcc

Thank you for your comment.

In the design mode in Crystal XI, I did "Change Subreport Links..." and set the parameter to subreport.
Because the subreport is placed in group footer in main report, the subreport gets generated each time, showing relevant data.

I want to do the same thing using Push method but not sure how...
Senior Consultant
Most Valuable Expert 2011
Top Expert 2013
Commented:
How you provide the data shouldn't change the linking.  You can "open" the subreport in code and provide the data to it in a similar manner

http://www.emoreau.com/Entries/Articles/2006/09/Feeding-Crystal-Reports-from-your-application.aspx

mlmcc
Mike McCrackenSenior Consultant
Most Valuable Expert 2011
Top Expert 2013

Commented:
This question has been classified as abandoned and is being closed as part of the Cleanup Program.  See my comment at the end of the question for more details.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial