Link to home
Start Free TrialLog in
Avatar of TBSupport
TBSupport

asked on

Crystal Reports: Formulas Showing Blanks

Hello:

Attached is my Crystal 8.5 report, and below is the SQL view that most of the fields are based on.  One of those fields is "Sales".  The name of this VIEW is "CARBON".

Also attached is a simple Word document that I call "Crystal Problem".  As you can see, from the last two columns of the data that I pasted from the report, Total Expenses and Net Profit are showing blank instead of $0.00.  The expenses in the columns (other than the "Sales" column of course) are showing at $0.00.  That's the problem.  The total for Total Expenses should be $0.00 instead of blank.  Likewise, Net Profit should be showing the same amount as Sales, since Sales - $0.00 (for expenses) = Sales.

Underneath the data in this "Crystal Problem" document are the Crystal formulas for Totals Expenses and Net Profit.  How can I modify those formulas to show $0.00, instead of blanks?

Thank you!

TBSupport

SELECT     ME97705.ME_Job_ID AS [Project], ME97705.ME_User_Defined AS [Editor], ME97705.DOCDATE AS [DocumentDate], ME97708.ME_Work_Scope AS [Product], ME97702.DSCRIPTN AS [Company],
                      CASE WHEN ME97705.ME_Breakdown_Code = 'SALES' THEN ME97705.TRXAMNT ELSE 0 END AS [Sales], GL00105.ACTNUMBR_1 AS [Account], CASE WHEN GL00105.ACTNUMBR_1 NOT IN ('4001',
                       '9150') THEN ME97705.TRXAMNT END AS [TransAmt],
                      /*COALESCE(ME97708.ME_Job_Close_Date, '') AS [Close Date],*/ CASE WHEN ME97708.ME_Job_Close_Date <> '1900-01-01 00:00:00.000' THEN ME97708.ME_Job_Close_Date ELSE NULL
                      END AS [CloseDate], CASE WHEN ME97708.ME_Job_Close_Date = '1900-01-01 00:00:00.000' THEN 'OPEN' ELSE 'CLOSED' END AS [Status]
FROM         ME97705 INNER JOIN
                      ME97708 ON ME97705.ME_Job_ID = ME97708.ME_Job_ID INNER JOIN
                      GL00105 ON ME97705.ACTINDX = GL00105.ACTINDX INNER JOIN
                      ME97702 ON ME97708.CUSTNMBR = ME97702.MEuserdefined3
/*where ME97708.CUSTNMBR = 'BCFB'*/ UNION ALL
SELECT     ME97704.ME_Job_ID AS [Project], ME97704.ME_User_Defined AS [Editor], ME97704.DOCDATE AS [DocumentDate], ME97707.ME_Work_Scope AS [Product], ME97702.DSCRIPTN AS [Company],
                      CASE WHEN ME97704.ME_Breakdown_Code = 'SALES' THEN ME97704.TRXAMNT ELSE 0 END AS [Sales], GL00105.ACTNUMBR_1 AS [Account], CASE WHEN GL00105.ACTNUMBR_1 NOT IN ('4001',
                       '9150') THEN ME97704.TRXAMNT END AS [TransAmt],
                      /*COALESCE(ME97707.ME_Job_Close_Date, '') As [CloseDate],*/ CASE WHEN ME97707.ME_Job_Close_Date <> '1900-01-01 00:00:00.000' THEN ME97707.ME_Job_Close_Date ELSE NULL
                      END AS [Close Date], CASE WHEN ME97707.ME_Job_Close_Date = '1900-01-01 00:00:00.000' THEN 'OPEN' ELSE 'CLOSED' END AS [Status]
FROM         ME97704 INNER JOIN
                      ME97707 ON ME97704.ME_Job_ID = ME97707.ME_Job_ID INNER JOIN
                      GL00105 ON ME97704.ACTINDX = GL00105.ACTINDX INNER JOIN
                      ME97702 ON ME97707.CUSTNMBR = ME97702.MEuserdefined3
Crystal-Problem.docx
CARBON-COMMISSION.rpt
Avatar of Mike McCracken
Mike McCracken

Have you tried formatting the field to show 0 instead of NULL?

mlmcc
ASKER CERTIFIED SOLUTION
Avatar of James0628
James0628

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial