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!

Record Selection Formula Help

Status
Not open for further replies.

MusicMan123

Programmer
Mar 10, 2021
1
US
Hello, I am trying to edit a sub report for a report I am working on. The purpose of the sub report is to display a tenant's monthly charges effective on the date I specify. The date that I specify could have charges that are labeled as "future" or "current". Therefore I am trying to sort the sub report so that if the future rate applies in this case it does not print the current rate otherwise print the current rate. Below is what I have tried to do and currently if the future rate exists it prints it but then if it does not it always prints the current rate. I am not sure how to edit this appropriately.

This is this sub report as a reference.

Subreport_x8l22e.jpg


This is the result of the sub report.

In this picture the "current" rate is $4,093 and the "future" rate is $4,175

Rates_sdr5rv.jpg


This is the formula I am currently trying to use for sorting. I have highlighted what the issue portion of the formula is.

{PML_LEASE__LEASE_RECURRING_CHARGE.Frequency} <> "Annually" and
{PML_LEASE__LEASE_RECURRING_CHARGE.Revision_Num} = {?Pm-PML_LEASE__LEASE.Revision_Num} and
{PML_LEASE__LEASE_RECURRING_CHARGE.Lease} = {?Pm-PML_LEASE__LEASE.Lease} and
[highlight #FCE94F](If ({PML_LEASE__LEASE_RECURRING_CHG_LOG.Status} = "Future" and
{PML_LEASE__LEASE_RECURRING_CHG_LOG.Effective_Date} = {?Start Date for New Rates}) Then
{PML_LEASE__LEASE_RECURRING_CHG_LOG.Status} in ["Future"] Else
{PML_LEASE__LEASE_RECURRING_CHG_LOG.Status} in ["Current"])
[/highlight]

Thank you for any help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top