lancerxe
asked on
Crystal Report Selection Criteria
Hello experts:
I have a request from a client who wants a report that shows cash transactions
over 10,000 but if there's at least one transaction over 10,000 she wants
to see all cash transactions regardles of amount.
I have started with this but I'm stuck on the 2nd part of the request.
Any help would be greatlty appreciated.
LANCE
(if ($ToNumber({HISTORY.Cashin }) >= $10000) then($ToNumber({HISTORY.Ca shin}) > $0))
With the code above, all I get is 10000 amounts
I have a request from a client who wants a report that shows cash transactions
over 10,000 but if there's at least one transaction over 10,000 she wants
to see all cash transactions regardles of amount.
I have started with this but I'm stuck on the 2nd part of the request.
Any help would be greatlty appreciated.
LANCE
(if ($ToNumber({HISTORY.Cashin
With the code above, all I get is 10000 amounts
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You would do that in the database and the method depends on the database.
mlmcc
mlmcc
Kurt could a COMMAND do this?
mlmcc
mlmcc
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Created a SQL Expression called %10k
(
SELECT
COUNT(AccountNumber)
FROM
HISTORY
WHERE
cast (CashInAmountInSplitDeposi t as money) > 9999.99
)
Added this code
if ({%10k} > 1)
then($ToNumber({HISTORY.Ca shinamount insplitdep osit}) > $0))
Got an error message:
%10k field is unknown
(
SELECT
COUNT(AccountNumber)
FROM
HISTORY
WHERE
cast (CashInAmountInSplitDeposi
)
Added this code
if ({%10k} > 1)
then($ToNumber({HISTORY.Ca
Got an error message:
%10k field is unknown
ASKER
mlmcc:
When I tried this:
if ($ToNumber(Maximum({HISTOR Y.Cashin}) ) >= $10000) then
FALSE
Else
$ToNumber({HISTORY.Cashin} ) < $10000)
got this error message:
This fucntion cannpt be used because it must be evaluated later
((Maximum({HISTORY.Cashin} ) is highlighted)
thanks
When I tried this:
if ($ToNumber(Maximum({HISTOR
FALSE
Else
$ToNumber({HISTORY.Cashin}
got this error message:
This fucntion cannpt be used because it must be evaluated later
((Maximum({HISTORY.Cashin}
thanks
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
HISTORY.Cashinamountinspli tdeposit or HISTORY.Cashin are the same field.
they are varchar.
Thanks for all your input. I will try all sugestions today.
One thing I noticed is that when I suppressed a section it was on the report as a blank line, so I would get 5 pages of blanks and then a good detail line, then 3 blank pages and another good detail line.
I'm wondering if the reason I get tons of blank line is because I'm using a group selection so if the group has no detials it still prints the group name folowed by a bunch of blank lines.
thanks again
they are varchar.
Thanks for all your input. I will try all sugestions today.
One thing I noticed is that when I suppressed a section it was on the report as a blank line, so I would get 5 pages of blanks and then a good detail line, then 3 blank pages and another good detail line.
I'm wondering if the reason I get tons of blank line is because I'm using a group selection so if the group has no detials it still prints the group name folowed by a bunch of blank lines.
thanks again
I don't know if you've solved the blank line issue that you mentioned, but if you're using group selection (not suppression), the groups that aren't selected won't be visible at all on the report. Not the group header or footer, or the details in the group.
OTOH, if you're suppressing a section (you mentioned suppressing a section _and_ group selection), that section won't show up on the report as a blank line. However, if, for example, you suppress the group header and footer sections, but not the detail section, you'll still get the detail lines. Or, if you suppress the group header section and the detail section, but not the group footer section, you'll still get the group footers. So, it sounds like you were suppressing some sections, but not everything that you needed to.
James
OTOH, if you're suppressing a section (you mentioned suppressing a section _and_ group selection), that section won't show up on the report as a blank line. However, if, for example, you suppress the group header and footer sections, but not the detail section, you'll still get the detail lines. Or, if you suppress the group header section and the detail section, but not the group footer section, you'll still get the group footers. So, it sounds like you were suppressing some sections, but not everything that you needed to.
James
ASKER
mlmcc : You mentioned a stored procedure.
How would I go about creating a stored procedure for this.
thanks