question

BonAboard avatar image
BonAboard asked

Transitioning Crystal formulas/variables to SQL statement

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}

t-sqlselect
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.