Print Page | Close Window

Problem with my report

Printed From: Crystal Reports Book
Category: Crystal Reports .NET 2003
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=10185
Printed Date: 06 May 2024 at 10:12am


Topic: Problem with my report
Posted By: Carol
Subject: Problem with my report
Date Posted: 04 Jun 2010 at 4:15am
i have a report that uses 5 tables
table 1 - employee
table 2 - active dm labor
table 3 - active ad labor
table 4 - history dm labor
table 5 - history ad labor
 
I have the main report as the employee and set up 4 subreports to get the labor information from each of the other tables. I have setup a date parameter for a week. What I am getting is
 
employee subreport 1 - all dates within the parameter
                subreport 2 - all dates within the parameter
                subreport 3 - all dates within the parameter
                subreport 4 - all dates within the parameter
 
what I want is
 
employee date 1 - subreport 1
                              subreport 2
                              subreport 3
                              subreport 4
                date 2 - subreport 1
and so on.
 
A person may only have labor records from 1 labor file but on the other hand they could have records in all.
 
Does anyone have any ideas how I can accomplish this?
 
Thanks
 
 



Replies:
Posted By: jkwrpc
Date Posted: 04 Jun 2010 at 4:38am
Perhaps you could do it using a Group section with Group 1 being based on the date, then add multiple detail fields each on holding a separate subreport. You can suppress the sections as needed.
 
Hope this may be of some help
 
Regards,
 
John W.
http://www.CustomReportWriters.net - www.CustomReportWriters.net


Posted By: Carol
Date Posted: 04 Jun 2010 at 5:17am

Which date do I use? Each labor file has its own date

 
Thanks,
Carol


Posted By: jkwrpc
Date Posted: 04 Jun 2010 at 6:54am
Perhaps I dont understand, but I thought there a single date field you wanted the information captured by. If true that would be the field to group by, then as that date changes the grouping starts over.
 
It might look something like this ...
Group Header 1  group by {labor date field}
Detail a - subreport 1
Detail b - subreport 2
...and so on
 
You would want to make sure your subreport  linking and data selection deals with the date, but that should not be very difficult.
 
Hope this helps.
 
Regards,
 
John W.
http://www.CustomReportWriters.net - www.CustomReportWriters.net
 


Posted By: Carol
Date Posted: 04 Jun 2010 at 7:38am
I'm looking to run the report for a range of dates. Each table has a its own date in it. And none of the tables have all the dates in it.


Posted By: Carol
Date Posted: 04 Jun 2010 at 7:39am

That is why I'm having so much trouble with this.

Let me know if you have any ideas.
 
Thanks,
 
Carol
 


Posted By: jkwrpc
Date Posted: 04 Jun 2010 at 11:23am
You will have create a design to deal with dates. You can take a main table and then it to reference the dates in all the other tables. At this point it seems like it is more of problem relating the data than the report design. Without knowing your data I am afraid I will likely not be able to help. Perhaps someone else can offer some advice

Regards

John W.
www.CustomReportWriters.net


Posted By: lockwelle
Date Posted: 08 Jun 2010 at 3:18am
The challenge is to create a table of all the users and all the dates desired, then this table can be the driver supplying the name for the main report and the date/name to each of the subreports.
 
The trick it would seem is getting the dates.  Is this completely ad hoc or will be used to report on information that is a set number of days old...say a month or a week?  If so, you can probably create a Command object that uses unions to create all the users and dates for a set period of time and then further refine those in the record selection of the report based on dates the user entered.
 
I am sure that there is a slicker method of creating dates (we have a table of just dates, but not everyone does).
 
HTH


Posted By: Carol
Date Posted: 08 Jun 2010 at 3:22am
Thank you everyone for all your help. I was able to create the union and it works great now.
 
Thanks again



Print Page | Close Window