I need to transition my Crystal Reports formulas into my SQL select statement because we are diong away with the report. I am having difficulties making the transition into the SQL select statment.
In Crystal I pull the following statement
SELECT "PatientRefund"."INVOICE", "PatientRefund"."TRANS_NBR", "PatientRefund"."CHECK_DATE", "PatientRefund"."TO_BASE_AMT", "PatientRefund"."SEQ_NBR" FROM "PROD90"."dbo"."PatientRefund" "PatientRefund"
and then I have 2 formulas in Crystal for the Invoice#.
//used to trim out unneeded numbers
Formula 1 MidInvoice: Mid({PatientRefund.INVOICE}, 1,8)
//used to add spaces before number - this is the formula that prints in the report
Formula 2 PrintInvoice: if length({@MidInvoice}) < 11 then space(11 - length({@MidInvoice}) )+ totext({@MidInvoice}) else {@MidInvoice}