• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3424
  • Last Modified:

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:


0
kmc10314
Asked:
kmc10314
1 Solution
 
LeDaoukCommented:
wht is the error?
0
 
peter57rCommented:
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}?
0
 
kmc10314Author Commented:
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
0
Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

 
mlmccCommented:
crBold is a Crystal enumerated type value and is used in formulas that specify the font weight.

THere are 2 ways to do what you want.

1.  Using a text box with multiple fields
Insert a text box in the report
Add a formula to the report for the first part of  the line
   "You have to come her by "
Add another formula for the date
    ToText(Date({MyProcl;1 MyDate}))
Drag the formulas into the text box
You can then edit the textbox and format the pieces as desired.

2.  Use text interpretation on the display of the formula
Change the formula to
    "You have to come her by <b>" & ToText(Date({MyProcl;1 MyDate})) & "</b>"
Drag the formula to the rreport
Right click the formula
Click FORMAT FROMULA
On the COMMON TAB set the Text Interpretation to HTML

mlmcc

0
 
kmc10314Author Commented:
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"
0
 
mlmccCommented:
What is highlighted by the error?

mlmcc
0
 
kmc10314Author Commented:
"You have to come her by "
0
 
mlmccCommented:
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
0
 
kmc10314Author Commented:
I get an error like this now...
) is missing
I know i don't have a parenthesis missing
0
 
mlmccCommented:
Can you paste the actual formula into a comment?

mlmcc
0
 
kmc10314Author Commented:
"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}))
0
 
mlmccCommented:
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
0
 
kmc10314Author Commented:
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?

0
 
kmc10314Author Commented:
Hmm... it works as you suggested.
Thanks
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now