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!

LasatFullMonth

Status
Not open for further replies.

localgirl3l

Technical User
Feb 13, 2007
5
US
don't laugh at this question... but, can someone explain why LastFullMonth does not work during January??? Feb - Dec works fine, pulling data for the prior month... but when a new year rolls in, reports pulled during January will return no info for December (i.e. a sum or count will return a 'zero", etc). i've given up on trying to create a formula using other "functions" and "opereators".
 
Post precisely what you tried and where you placed the code. Why would you decide to just chat about a formula instead of showiing it? Also, please post your Crystal version.

It works here just fine using CR XI.

In the record selection I used:

{Testing.F2} in lastfullmonth

The resultant SQL is:

...`Testing`.`F2`<#2007-01-01 00:00:00#)

-k
 
Hi SV

this is the simple formula being used, which works for the months of February thru December.

If {ltmaster.stage} in 60 to 65 and
{ltmaster.fund-dt} in LastFullMonth and
{ltpricing.promo-cd} <> 13 and
{ltmaster.app-source} <> 7 then {ltmaster.tot-ln-amt} else 0
....(i have a running total doing a 'sum' on this formula)...

sorry, but all the trial formulas i've created also returned zeros so i got rid of them.

Crystal v. 9.2.2.634
 
Place this in the Report->Selection Formula->Record:

{ltmaster.fund-dt} in LastFullMonth

Now check the Database->Show SQL Query, does it show the right SQL?

If so, then tweak your formula to just test the date field and see if it hits, I suspect it's something else.

btw, rather than have this formula, place this in the evaluate->use a formula part of the running total:

{ltmaster.stage} in 60 to 65
and
{ltmaster.fund-dt} in LastFullMonth
and
{ltpricing.promo-cd} <> 13
and
{ltmaster.app-source} <> 7

and sum the {ltmaster.tot-ln-amt} field.

-k

 
i've tried the suggestions, it still returns no data. your suggestion to put a formula in the running total is a great idea that i had forgotten about, so I'll continue to tweak the running total details and see what happens.

THANK YOU FOR YOUR RESPONSE.
 
You managed to breeze right over my questions with "returns no data". The report has no data, or are you trying to say that the value returned by the formula is still 0?

You also didn't share the record selection/SQL Query aspect.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top