Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

searching for time range???

Status
Not open for further replies.

PQTIII

IS-IT--Management
Sep 21, 2004
110
I'm running a report that picks out one certain time that an event (evnt1) happens. Then I want to run a sub report that looks at a diffent file to pick all of the transactions that happened 30 minutes before and 30 minutes after the event (evnt1) in the main report. How do I set up the sub reports link to only get the events with the the 30/30 time range.

Thanks
Paul
CR9
 
You can link via the datetime ot time field and then go into the subreports and manually edit the Report->Selection Formulas->Record to use a > and <.

Not sure why you need subreports at all, just pull all of the data into the main report.

-k
 
Hi,
You could set up 2 formulas in the Main report for
evnt1 - 30minutes and evnt1 + 30 Minutes..

Use the formulas in the selection criteria of the sub report..
( First use them as links to evnt1 in the sub, but edit the subreport to modify the selection criteria to use the range)



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Hi,
Well this happens every now and then...guess we both were active at the same time ( I also agree with synapse that a sub seems not to be needed)



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
-k

The main report pulls info by date and truck from a status file that contains data on truck downs, delays, and standby events. Then I set filters to only show the time each truck was delayed for fueling for each day. I want to link it to (subreport) a load file that contains all of the load transactions for that day, but only show the loads that happened 30 minutes before the fueling delay and 30 minutes after the fueling delay.

Thanks
paul
 
You could make comparisons using DateDiff("n", {fueling.delay}, {load}). This gives you the difference in minutes.

Right-click on the detail display, suppress formula, number of minues more than 30 or less than -30.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top