Tips and Tricks
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Tips and Tricks
Message Icon Topic: Run subreports for given date range Post Reply Post New Topic
Author Message
nluoma
Newbie
Newbie


Joined: 05 May 2009
Location: United States
Online Status: Offline
Posts: 3
Quote nluoma Replybullet Topic: Run subreports for given date range
    Posted: 01 Dec 2009 at 8:26am

I'm trying to create a time log report. The user enters the desired period for the report, and then I need to pull information from four separate subtables. I can do this by printing subreports, one for each table. This shows the data like this:

Work Orders   <--subreport 1
   day 1
   day 2
   day 3
Changes          <--subreport 2
  day 1
  day 2
  day 3
 
The user wants the data sorted by date
 
Day 1
  changes
  work orders
Day 2
   changes
   work orders
 
I set this up so that the main report runs off of the changes, and includes a subreport for work orders in the details field:
 
Day 1                 <--date of change entry
  changes           <--main report
  work orders     <--from subreport in details
Day 2
   changes
   work orders
Day 3
   changes
   work orders
 
The problem is that this only works if there is a record in the changes table for all dates between the selected start date and end date. If there is no entry for Day 2, it doesn't show that date and you don't see the hours logged for any of the subreports either.
 
So, if the user has time logged for work orders on Day 2, but there are no changes for Day 2,  you see this:
 
Day 1                 <--date of change entry
  changes           <--main report
  work orders     <--from subreport in details
Day 3
   changes
   work orders
 
Due to some limitations of the interface I'm delivering the reports through, I cannot use an SQL statement to pull the data into Crystal Reports, and I'm stumped on how to proceed.
 
Does anyone have an idea on how I can create this report so that it will show all days in the selected range?
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.031 seconds.