Solved

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

Posted on 2011-03-15
14
3,256 Views
Last Modified: 2012-06-27
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
Comment
Question by:kmc10314
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
14 Comments
 
LVL 4

Expert Comment

by:LeDaouk
ID: 35137888
wht is the error?
0
 
LVL 77

Expert Comment

by:peter57r
ID: 35138227
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
 

Author Comment

by:kmc10314
ID: 35138445
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
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 35138515
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
 

Author Comment

by:kmc10314
ID: 35138942
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
 
LVL 100

Expert Comment

by:mlmcc
ID: 35139159
What is highlighted by the error?

mlmcc
0
 

Author Comment

by:kmc10314
ID: 35139314
"You have to come her by "
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 35139408
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
 

Author Comment

by:kmc10314
ID: 35139588
I get an error like this now...
) is missing
I know i don't have a parenthesis missing
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 35140643
Can you paste the actual formula into a comment?

mlmcc
0
 

Author Comment

by:kmc10314
ID: 35141574
"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
 
LVL 100

Expert Comment

by:mlmcc
ID: 35143503
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
 

Author Comment

by:kmc10314
ID: 35147909
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
 

Author Comment

by:kmc10314
ID: 35148051
Hmm... it works as you suggested.
Thanks
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Crystal Report GH Suppress Formula not acting as expected 10 39
Crystal report highlighting 5 53
Supress a section of a field 6 29
Cant attach a pdf to a crystal report 3 33
Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question