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

Crystal Reports - help with a custom function

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:

BCSPDF417EncodeCR({@barcode},'1')

-- 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.sex}+"|"+{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.

Thoughts?

Thanks
0
robthomas09
Asked:
robthomas09
  • 2
2 Solutions
 
Lee SavidgeCommented:
Replace this:

BCSPDF417EncodeCR({@barcode},'1')

with this:


BCSPDF417EncodeCR({@barcode}, 1, 0, 0, 0, 0, 0)
0
 
mlmccCommented:
Here is some documentation

http://www.barcodesoft.com/pdf417Crystalreports.aspx

mlmcc
0
 
robthomas09Author Commented:
Thanks both of you!
0
 
Lee SavidgeCommented:
You're welcome :)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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