Report Design
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Report Design
Message Icon Topic: subreport data not showing from stored procedure Post Reply Post New Topic
Author Message
praveenhotha
Newbie
Newbie


Joined: 17 Jan 2012
Location: India
Online Status: Offline
Posts: 2
Quote praveenhotha Replybullet Topic: subreport data not showing from stored procedure
    Posted: 18 Jan 2012 at 12:08am
I have a crystal report with multiple sub reports, the data to the subreports is being passed from a stored procedure which returns to datasets.
I need to group the data based on a parameter in the main report.
When I try to group the data in the sub report based on same parameter. It gives me a invalid grouping error. Can anyone please refer me to a link which has some explanation about such problem.
I am able to view the report in preview mode, but when I fire the report, it throws me the above error.

I am assigning the datasets to the sub reports as shown below.

doc.SetDataSource(dstReport.Tables[0]);
                        doc.Subreports[0].SetDataSource(dstReport.Tables[0]);
                        doc.Subreports[1].SetDataSource(dstReport.Tables[0]);
                        doc.Subreports[2].SetDataSource(dstReport.Tables[1]);
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 18 Jan 2012 at 3:27am
the only thing that comes to mind is if the field that you are grouping on is in the dataTable that you are setting the subreport to....or if the name is changed in your dataTable that is pushed to the report vs the one that the report was designed against.
 
As I am sure you know, since you are pushing the data, vs pulling the data back from the database it is harder to keep the fields in sync.  A verify database command may return OK, but it may be against old test data and not the latest schema (which is your live data)...so I guess that is where I would start, making sure that the schemas match.
 
HTH
IP IP Logged
praveenhotha
Newbie
Newbie


Joined: 17 Jan 2012
Location: India
Online Status: Offline
Posts: 2
Quote praveenhotha Replybullet Posted: 18 Jan 2012 at 3:53am
Thanks for the reply. :)
It was my mistake. I was mapping the subreport and the data tables incorrectly :(
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.015 seconds.