Link to home
Start Free TrialLog in
Avatar of kmc10314
kmc10314

asked on

Crystal Reports "Too many arguments have been given to this function" error

I try to insert this as part of string =>
crBold(ToText(Date({MyProcl;1 MyDate})))

Something like
"You have to come her by " + crBold(ToText(Date({MyProcl;1 MyDate})))

When I do this.. I get en error like:


Avatar of LeDaouk
LeDaouk
Flag of Lebanon image

wht is the error?
Avatar of peter57r
1.  crBold is not a function so can't be used this way.

2.  Is this the syntax that crystal gives you when you select a field?
{MyProcl;1 MyDate}

I'm not familiar with the use of  ; as the separator.

3.  What is the datatype of {MyProcl;1 MyDate}?
Avatar of kmc10314
kmc10314

ASKER

1. How should I use crBold?
2. Yes, it's a field (Name of Stored Proc: Field in a Stored Proc)
3. It probably is DateTime, but I want to change it to Date
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I want to have it one formula instead of several textboxes because i actually have a lot of lines,
instead of just one.

So when i did second method I get an error like
"a statement is required here"
What is highlighted by the error?

mlmcc
"You have to come her by "
Are you using Crystal or Basic format?

If basic it has to be

Formula =  "You have to come her by <b>" & ToText(Date({MyProcl;1 MyDate})) & "</b>"

mlmcc
I get an error like this now...
) is missing
I know i don't have a parenthesis missing
Can you paste the actual formula into a comment?

mlmcc
"Make a payment" + {Payment;1.PaymentDate} + "and pay" + ToText(SUM({Payment;1.Total}) - SUM({Payment;1.Discount})) + CHR(13) +
"Discount: " + ToText(SUM({Payment;1.Discount})) + CHR(13) +
"By " + {Payment;1.DueDate} + " , it's " + ToText(SUM({Payment;1.Total}))
I pasted that into one of my reports and changed the fields so the sums would work and got no errors.

Is that the full formula?

Are you using Crystal or Basic syntax?

mlmcc
It is.
Right now i'm using Crystal syntax.
However, if I were to change it to HTML, would some work?

Can you show me what you did?

Hmm... it works as you suggested.
Thanks