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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help with a formula

Status
Not open for further replies.

choochoowinn2009

Technical User
Feb 24, 2010
34
US
Hi,

Would someone help me write this formula?

Here's my data:
ID Service Beg Date End Date
1234 H1111 8/18/2010 8/20/2010
1234 A148 12/16/2010 1/16/2011
1234 B1498 8/16/2010 9/15/2010
1234 H1111 8/11/2010 8/12/2010
1234 98104 8/18/2010 9/15/2010
1234 H2011 5/16/2010 9/30/2010

I have a date parameter with service code of H1111.
My criteria is that if I put in date parameter of beg date = 08/11/2010 with service code of H1111,
then my results will show any other service codes with beg date < beg date of service code H1111 and other service code end date > beg date of service code H1111 of 08/11/2010
In other words, my result would only show service code H2011 beg date 05/16/2010 and end date 09/30/2010
Also, if I enter date parameter of 08/18/2010 and service code of H1111,
then my results will also happen to be other service code H2011 with beg date of 05/16/2010 and end date of 09/30/2010.

Thank you for your help,
C

 
Hi,
What is your current selection formula?

If you want to only get those records that match the beg date and service code entered, try:

Code:
{Table.BegDate} = {?Param_Beg_Date} 
AND
{Table.ServiceCode} = "H1111"

[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
The easiest way will be to use a subreport.

Main report only bring back data relating to H1111 for the date specified.

Subreport is then linked to main report based on date of the H1111.

When you link SR it will only allow subreportdate = Main report date. But once in you can go into SR select formula and change to

SREnddate > mainreport link date

Ian
 
This is very similar to your request in thread767-1665659 where you WERE using a subreport. Why did you choose not to stick with that approach?

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top