Crystal Reports - help with a custom function

Posted on 2011-10-21
Last Modified: 2012-05-12
Hello experts,

I've inherited a crystal report for a lab requisition, and it has a barcode on it that is generated by a software I bought and installed PDF417Font.  The barcode is built by a function that passes in a string of variables and it creates a barcode.  I am getting an error message when I preview the report that says "Not enough arguments have been given to this function" and then it pullsup the formula editor and highlights the following, which is the only code:


-- The @barcode formula is pasted below:

stringVar barcode :=UpperCase("~"+{@client_id}+"|"+{lab_nor.ufo_num}+"|"+(if isnull({person.middle_name}) or {person.middle_name}=""
then {person.last_name}+","+{person.first_name} else{person.last_name}+","+{person.first_name}+" "+{person.middle_name})+"|"+
(if IsNull({person_payer.payer_name}) or {person_payer.payer_name}<>"Medicare NGS" then "P" else "MC")
+"|"+{}+"|"+{person.date_of_birth}[5 to 6]+"/"+{person.date_of_birth}[7 to 8]+"/"+{person.date_of_birth}[1 to 4]+"|||"+
(totext(tonumber({patient.med_rec_nbr}),0,""))+"||"+{provider_mstr.last_name} + "," + {provider_mstr.first_name}+"|"+
(if {Lab_nor.order_priority}="S" then "STAT "else if {Lab_nor.order_priority}="R" then "")+"|"+" "+" "+(IF ISNULL({lab_nor.general_comment}) or {lab_nor.general_comment}="" then "" else {lab_nor.general_comment})+"|@"
+shared stringvar tests+"|"+{person.ssn}+"|||")+chr(13);

I have g one through this pipe-delimited code and it appears I am passing in the correct amount of values.  I have attached the spec here:  OrderEntryPrintPDF-2D-Barcode.txt

Anyway, the error leads me to believe that the function itself BCSPDF417EncodeCR({@barcode},'1') is not being passed enough parameters, but I cannot find where this function is defined.


Question by:robthomas09
    LVL 25

    Accepted Solution

    Replace this:


    with this:

    BCSPDF417EncodeCR({@barcode}, 1, 0, 0, 0, 0, 0)
    LVL 100

    Assisted Solution

    Here is some documentation


    Author Closing Comment

    Thanks both of you!
    LVL 25

    Expert Comment

    by:Lee Savidge
    You're welcome :)

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    Suggested Solutions

    'Between' is such a common word we rarely think about it but in SQL it has a very specific definition we should be aware of. While most database vendors will have their own unique phrases to describe it (see references at end) the concept in common …
    Confronted with some SQL you don't know can be a daunting task. It can be even more daunting if that SQL carries some of the old secret codes used in the Ye Olde query syntax, such as: (+)     as used in Oracle;     *=     =*    as used in Sybase …
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    This video discusses moving either the default database or any database to a new volume.

    754 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

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now