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

Max Tran Paid Date versus Paid Date

Status
Not open for further replies.

piazzab

Instructor
Oct 22, 2001
14
US
Why would this note work:

if {Combined.Type} = "P" then
( if Maximum ({@Tran Date}, {@Service Number}) <=
{@paid date} and Maximum ({@paid date}, {@Service Number}) >= {@paid date}
then
{@Payment})
else 0

The value of Maximum (@Tran Date},{Service Number} is 4/30/2000
The value of {@paid date} is 10/26/2000
The value of Maximum {@paid date}, {@service number} is 10/31/2000.

I keep getting the value to appear in every row. I want the value to appear in the row for April through October.
 
How about:

if {Combined.Type} = &quot;P&quot; then
( if Maximum ({@Tran Date}, {@Service Number}) <=
{@paid date} and Maximum ({@paid date}, {@Service Number}) >= {@paid date}
then
{@Payment}
else 0)
else 0

Naith
 
Can't you do something simpler like:

if {Combined.Type} = &quot;P&quot; and
{@paid date} in
Maximum ({@Tran Date}, {@Service Number}) to
Maximum ({@paid date}, {@Service Number})
then {@Payment})
else 0 Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
I finally resolved the problem with the following. I appreciate your help.


if {Combined.Type} = &quot;I&quot; then
{@Feb00TypeI}
else

IF ({Combined.Type} = &quot;P&quot; and Maximum ({@paid date}, {@Service Number})
>= date(2000,02,01) and
{@paid date} <= date(2000,02,28) and
{@paid date} <= Maximum ({@paid date}, {@Service Number}) )then {@payment}

else (if ({Combined.Type}) = &quot;A&quot; and Maximum ({@Adj Date}, {@Service Number})
>= date(2000,02,01) and {@adj date} <= date(2000,02,28) and
{@adj date} <= Maximum ({@Adj Date}, {@Service Number}) then {Combined.Amount})
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top