Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Crystal Reports "The request could not be submitted for background processing."

Posted on 2008-10-02
7
995 Views
Last Modified: 2013-11-05
We have our own application that has over 250 canned reports in it. They are all .rpt's using stored procedures to return the data. The application is logging in to the database, executing the proc, then pushing the data to the rpt. We have ONE report that is getting the dreaded background processing error, only if it is run twice in a row. The first time it is run, it displays, prints and closes without issue. The second time it errors out.

It is not happening on all machines either. XP or Vista.

It did work before but all of a sudden on some machines this is happening.

0
Comment
Question by:ScottSut
  • 4
  • 3
7 Comments
 

Author Comment

by:ScottSut
ID: 22633246
This must be a Crystal bug.
The report contained a simple subreport. We removed the subreport and now the error is gone.
We have about a hundred other reports that contain a subreport or multiple subreports, and they all work.

If anyone can explain this that would be great ... otherwise we can close this question.

0
 
LVL 17

Expert Comment

by:MIKE
ID: 22637497
Post the SQL from the Stored Proc here.....let's have a look to see what the problem may be....???

Does this stored proc contain ANY variations in command structure from a Stored Proc that is WORKING currently? Does it use specialized TABLES ......or tables from a SOURE System..???

M
0
 

Author Comment

by:ScottSut
ID: 22650185
Thanks ...
Attached in code window and as file ...

All the stored procs follow the same model. They accept parameters from the submission screen.
They use temporary tables to build the report data.


USE [CMS_DEV]
GO
/****** Object:  StoredProcedure [dbo].[RptCompSumAP]    Script Date: 10/06/2008 10:09:36 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
 
 
 
ALTER PROCEDURE [dbo].[RptCompSumAP]
	@Lang		int,
	@CurrUserID	char(10),
	@Country	char(2),
	@ClaimID		int = 0,
	@InvoiceID		int = 0,	-- 0=ignore, else print compsum for this invoice id
	@PrintAll		bit = 0,
	@StartMajNo		int = -1,
	@EndMajNo		int = -1,
	@StartInvDate		datetime = NULL,	-- not sent from report menu anymore
	@EndInvDate		datetime = NULL,	-- not sent from report menu anymore
	@BranchID		char(10) = NULL,
	@BillToID		char(8) = NULL,		-- not sent from report menu anymore
	@PrintedOverride	int = 2,		-- 0=select only unprinted, 1=disregard invoice print date, 2= disregard inv print date and was called from Report menu
	@ExchangeRate	money = 1,
	@MasterBillID		int = 0,
	@Currency		char(3),
	@InvLang		char(2) = null
 
-- from menu: MUST supply 1) claimid or 2) branchid and MajNo range within limit specified in sysdef.
-- from menu: CANNOT specify 1) BillToID 2) Date range 3) InvoiceID 4) PrintAll=1
AS 
PRINT 'SP: RptCompSumAP'
 
--------------------------------------------------------------------
--Corrections of Dates and Times
DECLARE @TempStartDate 	datetime,
	@TempEndDate 	datetime,
	@IsHealthcare 	bit
 
EXEC @IsHealthcare = _isHealthcare @Lang, @CurrUserID, @BranchID
-- if healthcare execute the HC one
IF @IsHealthcare = 1
BEGIN
	EXEC _RptCompSumHC @Lang,@CurrUserID,@Country,
		@ClaimID,
		@InvoiceID,
		@PrintAll,
		@StartMajNo,
		@EndMajNo,
		@StartInvDate,
		@EndInvDate,
		@BranchID,
		@BillToID,
		@PrintedOverride,
		@MasterBillID,
		@Currency,
		@InvLang
	RETURN 0
END
 
SELECT @TempStartDate = CONVERT(varchar (2), datepart(month, @StartInvDate )) + '/'
             	 + CONVERT(varchar (2), datepart(day, @StartInvDate ))  + '/'
		 + CONVERT(varchar (4), datepart(year, @StartInvDate ))
 
SELECT @TempEndDate = CONVERT(varchar (2), datepart(month, @EndInvDate )) + '/'
             	 + CONVERT(varchar (2), datepart(day, @EndInvDate ))  + '/'
		 + CONVERT(varchar (4), datepart(year, @EndInvDate ))
 
 
SELECT @StartInvDate = CASE WHEN @TempStartDate < '01/01/1920' THEN NULL ELSE @TempStartDate + ' 00:00:00.00' END
SELECT @EndInvDate = CASE WHEN @TempEndDate < '01/01/1920' THEN NULL WHEN @TempEndDate = '12/31/2100' THEN NULL ELSE @TempEndDate + ' 23:59:59.99' END
 
--------------------------------------------------------------------------
SELECT @BranchID = NULL WHERE @BranchID = '%' OR @BranchID = 'ALL'
SELECT @BillToID = NULL WHERE @BillToID = '%' OR @BillToID = 'ALL'
-----------------------------------------------------------------------
DECLARE @InvMajNo		int,
	@retstat		bit,
	@CalledFromReportMenu 	bit
-----------------------------------------------------------------------
CREATE TABLE #Invoice (	MajorNo		int,
			ClaimID		int,
			CompSumReq	bit)
-----------------------------------------------------------------------
SELECT @CalledFromReportMenu = CASE WHEN @PrintedOverride = 2 THEN 1 ELSE 0 END
SELECT @PrintedOverride = 1 WHERE @PrintedOverride = 2
-----------------------------------------------------------------------
SELECT @StartMajNo = 0 WHERE @StartMajNo = -1 AND @EndMajNo > 0
SELECT @EndMajNo = 999999999 WHERE @EndMajNo = -1 AND @StartMajNo > 0
-----------------------------------------------------------------------
DECLARE	@isHO	int
EXEC @isHO = _isHO @Lang, @CurrUserID
 
-- Create list of invoices to be comp summed
IF @InvoiceID <> 0
BEGIN	
	-- SELECT specified invoice
	INSERT	#Invoice
	SELECT	i.MajorNumber, i.ClaimID, 1		-- set CompSumReq flag to true
	FROM	Invoice i
	WHERE	i.ID = @InvoiceID
	
END
ELSE IF @MasterBillID <> 0
BEGIN
	-- SELECT the invoice that belong to the Master Bill
	INSERT	#Invoice
	SELECT	DISTINCT i.MajorNumber, i.ClaimID, 1		-- set CompSumReq flag to true
	FROM	Invoice i
	WHERE	i.MasterBillID = @MasterBillID
END
ELSE	-- @InvoiceID = 0 and @MasterBillID = 0
BEGIN
	IF @CalledFromReportMenu = 0
	BEGIN -- called from invoice
		IF @isHO = 1
		BEGIN --isho
			-- print all unprinted for specified parameters where ApproveHOID <> AUTO
			IF @PrintAll = 1
			BEGIN
 
				INSERT	#Invoice
				SELECT	DISTINCT i.MajorNumber, i.ClaimID, 1
				FROM	Invoice i
				WHERE	i.PrintDate IS NULL
					--AND i.UserID <> 'AUTO'
					AND i.MasterBilled = 0
				ORDER BY i.MajorNumber
			END
			ELSE	-- @PrintAll = 0
			BEGIN
				IF @StartMajNo <> -1 AND @EndMajNo <> -1
				BEGIN
					IF @StartInvDate IS NOT NULL AND @EndInvDate IS NOT NULL
					BEGIN
						IF @BillToID IS NOT NULL
						BEGIN
							IF @BranchID IS NOT NULL							
							BEGIN
								INSERT	#Invoice
								SELECT	DISTINCT i.MajorNumber, i.ClaimID, 1
								FROM	Invoice i
								WHERE	i.MajorNumber >= @StartMajNo
									AND i.MajorNumber <= @EndMajNo
									AND i.InvoiceDate >= @StartInvDate
									AND i.InvoiceDate <= @EndInvDate
									AND i.BillToID = @BillToID
									AND i.BranchID = @BranchID
									--AND i.UserID <> 'AUTO'
									AND i.MasterBilled = 0
								ORDER BY i.MajorNumber
							END
							ELSE	-- no branch id specified
							BEGIN
								INSERT	#Invoice
								SELECT	DISTINCT i.MajorNumber, i.ClaimID, 1
								FROM	Invoice i
								WHERE	i.MajorNumber >= @StartMajNo
									AND i.MajorNumber <= @EndMajNo
									AND i.InvoiceDate >= @StartInvDate
									AND i.InvoiceDate <= @EndInvDate
									AND i.BillToID = @BillToID
									--AND i.UserID <> 'AUTO'
									AND i.MasterBilled = 0
								ORDER BY i.MajorNumber
 
 
							END
						END						
						ELSE	-- no bill to id specified
						BEGIN
							IF @BranchID IS NOT NULL
								INSERT	#Invoice
								SELECT	DISTINCT i.MajorNumber, i.ClaimID, 1
								FROM	Invoice i
								WHERE	i.MajorNumber >= @StartMajNo
									AND i.MajorNumber <= @EndMajNo
									AND i.InvoiceDate >= @StartInvDate
									AND i.InvoiceDate <= @EndInvDate
									AND i.BranchID = @BranchID
									--AND i.UserID <> 'AUTO'
									AND i.MasterBilled = 0
								ORDER BY i.MajorNumber
							ELSE	-- no branch id specified
								INSERT	#Invoice
								SELECT	DISTINCT i.MajorNumber, i.ClaimID, 1
								FROM	Invoice i
								WHERE	i.MajorNumber >= @StartMajNo
									AND i.MajorNumber <= @EndMajNo
									AND i.InvoiceDate >= @StartInvDate
									AND i.InvoiceDate <= @EndInvDate
									--AND i.UserID <> 'AUTO'
									AND i.MasterBilled = 0
								ORDER BY i.MajorNumber
						END
					END
					ELSE	-- no date range specified
					BEGIN
						IF @BillToID IS NOT NULL
						BEGIN
							IF @BranchID IS NOT NULL
								INSERT	#Invoice
								SELECT	DISTINCT i.MajorNumber, i.ClaimID, 1
								FROM	Invoice i
								WHERE	i.MajorNumber >= @StartMajNo
									AND i.MajorNumber <= @EndMajNo
									AND i.BillToID = @BillToID
									AND i.BranchID = @BranchID
									--AND i.UserID <> 'AUTO'
									AND i.MasterBilled = 0
								ORDER BY i.MajorNumber
							ELSE	-- no branch id specified
								INSERT	#Invoice
								SELECT	DISTINCT i.MajorNumber, i.ClaimID, 1
								FROM	Invoice i
								WHERE	i.MajorNumber >= @StartMajNo
									AND i.MajorNumber <= @EndMajNo
									AND i.BillToID = @BillToID
									--AND i.UserID <> 'AUTO'
									AND i.MasterBilled = 0
								ORDER BY i.MajorNumber
						END
						ELSE	-- no bill to id specified
						BEGIN
							IF @BranchID IS NOT NULL
								INSERT	#Invoice
								SELECT	DISTINCT i.MajorNumber, i.ClaimID, 1
								FROM	Invoice i
								WHERE	i.MajorNumber >= @StartMajNo
									AND i.MajorNumber <= @EndMajNo
									AND i.BranchID = @BranchID
									--AND i.UserID <> 'AUTO'
									AND i.MasterBilled = 0
								ORDER BY i.MajorNumber
							ELSE	-- no branch id specified
								INSERT	#Invoice
								SELECT	DISTINCT i.MajorNumber, i.ClaimID, 1
								FROM	Invoice i
								WHERE	i.MajorNumber >= @StartMajNo
									AND i.MajorNumber <= @EndMajNo
									--AND i.UserID <> 'AUTO'
									AND i.MasterBilled = 0
								ORDER BY i.MajorNumber
						END
					END
				END
				ELSE	-- no invoice major number range specified
				BEGIN
 
					IF @StartInvDate IS NOT NULL AND @EndInvDate IS NOT NULL
					BEGIN
						IF @BillToID IS NOT NULL
						BEGIN
							IF @BranchID IS NOT NULL
								INSERT	#Invoice
								SELECT	DISTINCT i.MajorNumber, i.ClaimID, 1
								FROM	Invoice i
								WHERE	i.InvoiceDate >= @StartInvDate
									AND i.InvoiceDate <= @EndInvDate
									AND i.BillToID = @BillToID
									AND i.BranchID = @BranchID
									--AND i.UserID <> 'AUTO'
									AND i.MasterBilled = 0
								ORDER BY i.MajorNumber
							ELSE	-- no branch id specified
								INSERT	#Invoice
								SELECT	DISTINCT i.MajorNumber, i.ClaimID, 1
								FROM	Invoice i
								WHERE	i.InvoiceDate >= @StartInvDate
									AND i.InvoiceDate <= @EndInvDate
									AND i.BillToID = @BillToID
									--AND i.UserID <> 'AUTO'
									AND i.MasterBilled = 0
								ORDER BY i.MajorNumber
						END
						ELSE	-- no bill to id specified
						BEGIN
							IF @BranchID IS NOT NULL
								INSERT	#Invoice
								SELECT	DISTINCT i.MajorNumber, i.ClaimID, 1
								FROM	Invoice i
								WHERE	i.InvoiceDate >= @StartInvDate
									AND i.InvoiceDate <= @EndInvDate
									AND i.BranchID = @BranchID
									--AND i.UserID <> 'AUTO'
									AND i.MasterBilled = 0
								ORDER BY i.MajorNumber
							ELSE	-- no branch id specified
								INSERT	#Invoice
								SELECT	DISTINCT i.MajorNumber, i.ClaimID, 1
 
								FROM	Invoice i
								WHERE	i.InvoiceDate >= @StartInvDate
									AND i.InvoiceDate <= @EndInvDate
									--AND i.UserID <> 'AUTO'
									AND i.MasterBilled = 0
								ORDER BY i.MajorNumber
						END
					END
					ELSE	-- no date range specified
					BEGIN
						IF @BillToID IS NOT NULL
						BEGIN
							IF @BranchID IS NOT NULL
								INSERT	#Invoice
								SELECT	DISTINCT i.MajorNumber, i.ClaimID, 1
								FROM	Invoice i
								WHERE	i.BillToID = @BillToID
									AND i.BranchID = @BranchID
									--AND i.UserID <> 'AUTO'
									AND i.MasterBilled = 0
								ORDER BY i.MajorNumber
							ELSE	-- no branch id specified
								INSERT	#Invoice
								SELECT	DISTINCT i.MajorNumber, i.ClaimID, 1
								FROM	Invoice i
								WHERE	i.BillToID = @BillToID
									--AND i.UserID <> 'AUTO'
									AND i.MasterBilled = 0
								ORDER BY i.MajorNumber
						END
						ELSE	-- no bill to id specified
						BEGIN
							IF @BranchID IS NOT NULL
								INSERT	#Invoice
								SELECT	DISTINCT i.MajorNumber, i.ClaimID, 1
								FROM	Invoice i
								WHERE	i.BranchID = @BranchID
									--AND i.UserID <> 'AUTO'
									AND i.MasterBilled = 0
								ORDER BY i.MajorNumber
							ELSE	-- no branch id specified
								INSERT	#Invoice
								SELECT	DISTINCT i.MajorNumber, i.ClaimID, 1
								FROM	Invoice i
								WHERE	--i.UserID <> 'AUTO'
									i.MasterBilled = 0
								ORDER BY i.MajorNumber
						END
					END
				END
			END
		END	--isho
		ELSE	-- @isHO = 0
		BEGIN	--isho
			IF @StartMajNo <> -1 AND @EndMajNo <> -1
			BEGIN
				IF @StartInvDate IS NOT NULL AND @EndInvDate IS NOT NULL
				BEGIN
					IF @BillToID IS NOT NULL
					BEGIN
						INSERT	#Invoice
						SELECT	DISTINCT i.MajorNumber, i.ClaimID, 1
						FROM	Invoice i
						WHERE	i.MajorNumber >= @StartMajNo
							AND i.MajorNumber <= @EndMajNo
							AND i.InvoiceDate >= @StartInvDate
							AND i.InvoiceDate <= @EndInvDate
							AND i.BillToID = @BillToID
							AND i.BranchID = @BranchID
							--AND i.UserID = 'AUTO'
							AND i.MasterBilled = 0
						ORDER BY i.MajorNumber
					END
					ELSE	-- no bill to id specified
					BEGIN
						INSERT	#Invoice
						SELECT	DISTINCT i.MajorNumber, i.ClaimID, 1
						FROM	Invoice i
						WHERE	i.MajorNumber >= @StartMajNo
							AND i.MajorNumber <= @EndMajNo
							AND i.InvoiceDate >= @StartInvDate
							AND i.InvoiceDate <= @EndInvDate
							AND i.BranchID = @BranchID
							--AND i.UserID = 'AUTO'
							AND i.MasterBilled = 0
						ORDER BY i.MajorNumber
					END
				END
				ELSE	-- no date range specified
				BEGIN
					IF @BillToID IS NOT NULL
					BEGIN
						INSERT	#Invoice
						SELECT	DISTINCT i.MajorNumber, i.ClaimID, 1
						FROM	Invoice i
						WHERE	i.MajorNumber >= @StartMajNo
							AND i.MajorNumber <= @EndMajNo
							AND i.BillToID = @BillToID
							AND i.BranchID = @BranchID
							--AND i.UserID = 'AUTO'
							AND i.MasterBilled = 0
						ORDER BY i.MajorNumber
					END
					ELSE	-- no bill to id specified
					BEGIN
						INSERT	#Invoice
						SELECT	DISTINCT i.MajorNumber, i.ClaimID, 1
						FROM	Invoice i
						WHERE	i.MajorNumber >= @StartMajNo
							AND i.MajorNumber <= @EndMajNo
							AND i.BranchID = @BranchID
							--AND i.UserID = 'AUTO'
							AND i.MasterBilled = 0
						ORDER BY i.MajorNumber
					END
				END
 
			END
			ELSE	-- no invoice major number range specified
			BEGIN
				IF @StartInvDate IS NOT NULL AND @EndInvDate IS NOT NULL
				BEGIN
					IF @BillToID IS NOT NULL
					BEGIN
						INSERT	#Invoice
						SELECT	DISTINCT i.MajorNumber, i.ClaimID, 1
						FROM	Invoice i
						WHERE	i.InvoiceDate >= @StartInvDate
							AND i.InvoiceDate <= @EndInvDate
							AND i.BillToID = @BillToID
							AND i.BranchID = @BranchID
							--AND i.UserID = 'AUTO'
							AND i.MasterBilled = 0
						ORDER BY i.MajorNumber
					END
					ELSE	-- no bill to id specified
					BEGIN
						INSERT	#Invoice
						SELECT	DISTINCT i.MajorNumber, i.ClaimID, 1
						FROM	Invoice i, Claim c
						WHERE	i.InvoiceDate >= @StartInvDate
							AND i.InvoiceDate <= @EndInvDate
							AND i.BranchID = @BranchID
							--AND i.UserID = 'AUTO'
							AND i.MasterBilled = 0
						ORDER BY i.MajorNumber
					END
				END
				ELSE	-- no date range specified
				BEGIN
					IF @BillToID IS NOT NULL
					BEGIN
						INSERT	#Invoice
						SELECT	DISTINCT i.MajorNumber, i.ClaimID, 1
						FROM	Invoice i
						WHERE	i.BillToID = @BillToID
							AND i.BranchID = @BranchID
							--AND i.UserID = 'AUTO'
							AND i.MasterBilled = 0
						ORDER BY i.MajorNumber
					END
					ELSE	-- no bill to id specified
					BEGIN
						INSERT	#Invoice
						SELECT	DISTINCT i.MajorNumber, i.ClaimID, 1
						FROM	Invoice i
						WHERE	i.BranchID = @BranchID
							--AND i.UserID = 'AUTO'
							AND i.MasterBilled = 0
						ORDER BY i.MajorNumber
					END
				END
			END
		END	--isho
		-- Set CompSumReq based on PrintOverride flag
		IF @PrintedOverride = 0
		BEGIN
			DELETE 	t
			FROM	Invoice i, #Invoice t
			WHERE	i.MajorNumber = t.MajorNo
				AND i.MinorNumber = 1
				AND i.PrintDate IS NOT NULL
		END
	END	--calledfrominvoice
	ELSE	-- @CalledFromReportMenu = 1
	BEGIN	--called from menu
		IF @ClaimID <> 0
		BEGIN
			INSERT	#Invoice
			SELECT	DISTINCT MajorNumber, ClaimID, 1
			FROM	Invoice i
			WHERE	i.ClaimID = @ClaimID
				--AND i.MasterBilled = 0
			ORDER BY i.MajorNumber
		END
		ELSE	-- no ClaimID specified
		BEGIN
			-- no claim specified therefore branch and majno range must be specified
			INSERT	#Invoice
			SELECT	DISTINCT MajorNumber, ClaimID, 1
			FROM	Invoice i
			WHERE	i.MajorNumber >= @StartMajNo
				AND i.MajorNumber <= @EndMajNo
				AND i.BranchID = @BranchID
				--AND i.MasterBilled = 0
			ORDER BY i.MajorNumber
		END
	END
END
 
IF @CalledFromReportMenu = 0
BEGIN
	-- Set CompSumReq based on rules
	IF @InvoiceID <= 0 OR @MasterBillID <> 0
	BEGIN
		DECLARE cr CURSOR READ_ONLY
		FOR SELECT MajorNo FROM #Invoice WHERE CompSumReq = 1 ORDER BY MajorNo ASC
		
		OPEN cr
		FETCH NEXT FROM cr INTO @InvMajNo
		WHILE (@@fetch_status <> -1)
		BEGIN
			IF (@@fetch_status <> -2)
			BEGIN
				EXEC @retstat = _isCompSumRequired @Lang, @CurrUserID, @InvMajNo
				IF @retstat = 0
					UPDATE #Invoice SET CompSumReq = 0 WHERE MajorNo = @InvMajNo
				ELSE
					UPDATE #Invoice SET CompSumReq = 1 WHERE MajorNo = @InvMajNo
			END
			FETCH NEXT FROM cr INTO @InvMajNo
		END
		CLOSE cr
		DEALLOCATE cr
	END
END
-- delete all rows where compsum not required
DELETE #Invoice WHERE CompSumReq = 0
 
--********************** SUBREPORT ************************************
DECLARE @cr_ClaimID	int,
	@cr_InvMajNo	int
 
-----------------------------------------------------------------------
CREATE TABLE #InvSubreport (	InvoiceMajorNo		int,
				ClaimID			int,
				ID			int,
				Date			datetime,
				AdjusterID		char(10),
				TimeCode		char(4),
				TimeCodeDesc		varchar(50), 
				TimeUnits		numeric(5,2),
				Language		int,
				Country			char(2))
-----------------------------------------------------------------------
 
-- Deallocate the cursor incase it already exists
if (cursor_status('global','Invoice_CURSOR') <> -3)
	DEALLOCATE Invoice_CURSOR
 
DECLARE Invoice_CURSOR CURSOR FOR SELECT ClaimID, MajorNo FROM #Invoice ORDER BY ClaimID
OPEN Invoice_CURSOR
FETCH NEXT FROM Invoice_CURSOR INTO @cr_ClaimID, @cr_InvMajNo
WHILE (@@fetch_status <> -1)
BEGIN 
	IF (@@fetch_status <> -2)
	BEGIN
		print convert(varchar(10),@cr_ClaimID) + ', ' +  convert(varchar(10),@cr_InvMajNo)
		INSERT #InvSubreport
		exec _RptCompSumUnbilled @Lang, @CurrUserID, @cr_ClaimID, @cr_InvMajNo
	END
	FETCH NEXT FROM Invoice_CURSOR INTO @cr_ClaimID, @cr_InvMajNo
END
 
DEALLOCATE Invoice_CURSOR
--******************************************************************************
 
-- ***** Print compsums for select Invoices *****
	SELECT	d.ClaimID,
		i.MajorNo 'InvoiceMajorNo',
		b.Name,
		i2.BillToID,
		i2.CoClaimNumber,
		i2.SubscriptionPercentage 'Percentage',
		d.Date,
		d.AdjusterID,
		d.TimeCode,
		CASE 	WHEN	d.TimeCodeDescription is Not null THEN d.TimeCodeDescription
		 	WHEN	@Lang = 1 THEN	t.FrenchDescription 
			ELSE	t.Description
		END 'TimeCodeDesc',
		/*CASE 	WHEN	@Lang = 0 
			THEN	t.Description
			ELSE	t.FrenchDescription
		END 'TimeCodeDesc', */
		d.TimeUnits,
		d.ExpenseCode,
		CASE	WHEN	d.ExpenseCodeDescription IS NOT NULL THEN d.ExpenseCodeDescription
		 	WHEN	@Lang = 0 THEN e.Description
			ELSE	e.FrenchDescription
		END 'ExpCodeDesc',/*
		CASE 	WHEN	@Lang = 0 
			THEN	e.Description
			ELSE	e.FrenchDescription
		END 'ExpCodeDesc',*/
		c.ClaimTypeCode,
		c.InsuredName,
		@Lang 'Language',
		@Country 'Country',
		c.Period,
		e.FlatFee,
		e.BlendedFee,
		CASE 	WHEN	EXISTS (SELECT * FROM InvoiceServiceDescription WHERE InvoiceID = i2.ID)
			THEN	(SELECT ServiceDescription FROM InvoiceServiceDescription WHERE InvoiceID = i2.ID)
			WHEN	EXISTS (SELECT * FROM Claim WHERE ID = i2.ClaimID AND ServiceDescriptionCode IS NOT NULL)
			THEN	'N/A'
			ELSE	NULL
		END 'ServiceDescriptionCode',  
		isnull((select top 1 (dbo.fn_NameFormat (cl.FirstName,cl.Name,null)) from Claimant cl where cl.ClaimID = c.id order by ID asc),'') 'ClaimantName',
		1 'Billed'
	--INTO 	#OUTPUT
	FROM	Docket d,
		Branch b,
		Claim c,
		ExpenseCode e,
		TimeCode t,
		#Invoice i,
		Invoice i2
	WHERE	d.BranchID = b.ID
		AND d.ClaimID = c.ID
		AND d.ExpenseCode *= e.Code
		AND d.TimeCode *= t.Code
		AND d.InvoiceMajorNo = i.MajorNo
		AND i.ClaimID = c.ID
		AND i2.MajorNumber = i.MajorNo
		AND i2.MinorNumber = 1
 
-- ***** Print the subreport part for select Invoices *****
	SELECT * FROM #InvSubreport
RETURN 0

Open in new window

sample.txt
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 

Author Comment

by:ScottSut
ID: 22682516
We applied Crystal Service Pack 4 to the engine and the issue is resolved.
I don't know what changed environmentally to cause this but SP4 resolved.
0
 
LVL 17

Accepted Solution

by:
MIKE earned 500 total points
ID: 22682523
Glad to hear it!

M
0
 

Author Closing Comment

by:ScottSut
ID: 31502566
Thanks M for your assistance ...
0
 
LVL 17

Expert Comment

by:MIKE
ID: 22682572



     : )

Thanks
M
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

840 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