Report Design
 Crystal Reports Forum : Crystal Reports .NET 2003 : Report Design
Message Icon Topic: Problem with my report Post Reply Post New Topic
Author Message
Carol
Newbie
Newbie


Joined: 01 Jun 2010
Online Status: Offline
Posts: 14
Quote Carol Replybullet Topic: Problem with my report
    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
 
 
IP IP Logged
jkwrpc
Senior Member
Senior Member


Joined: 19 Jun 2007
Location: United States
Online Status: Offline
Posts: 432
Quote jkwrpc Replybullet 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.
IP IP Logged
Carol
Newbie
Newbie


Joined: 01 Jun 2010
Online Status: Offline
Posts: 14
Quote Carol Replybullet Posted: 04 Jun 2010 at 5:17am

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

 
Thanks,
Carol
IP IP Logged
jkwrpc
Senior Member
Senior Member


Joined: 19 Jun 2007
Location: United States
Online Status: Offline
Posts: 432
Quote jkwrpc Replybullet 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.
 
IP IP Logged
Carol
Newbie
Newbie


Joined: 01 Jun 2010
Online Status: Offline
Posts: 14
Quote Carol Replybullet 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.
IP IP Logged
Carol
Newbie
Newbie


Joined: 01 Jun 2010
Online Status: Offline
Posts: 14
Quote Carol Replybullet 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
 
IP IP Logged
jkwrpc
Senior Member
Senior Member


Joined: 19 Jun 2007
Location: United States
Online Status: Offline
Posts: 432
Quote jkwrpc Replybullet 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


Edited by jkwrpc - 04 Jun 2010 at 11:24am
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet 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
IP IP Logged
Carol
Newbie
Newbie


Joined: 01 Jun 2010
Online Status: Offline
Posts: 14
Quote Carol Replybullet 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
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.078 seconds.