Link to home
Start Free TrialLog in
Avatar of BlakeMcKenna
BlakeMcKennaFlag for United States of America

asked on

Is it possible to debug a Crystal Report while running?

I have a Crystal Report 10 that is running under a VB.Net application. The report will work for some criteria and not work for other criteria. The RecordSelectionFormula is very simple and I can actually view the values via the .Net app. However, once it goes into the CR, I can't track the data. Does CR have any kind of debug mode?

Thanks,
Blake
Avatar of Mike McCracken
Mike McCracken

Nothing that I know of.

What SQL is used?

What selection criteria?

mlmcc
Avatar of BlakeMcKenna

ASKER

I'm using SQL Server 2005.

crDOC.RecordSelectionFormula = "{tblBatchDetail.rowID} = " & mRowID

The mRowID has a valid value to. It only happens on a specific record.
What is the selection statement?  is this multiple tables that ar joined?

mlmcc
Yes, I have multiple tables. As far as the selection statement...I assume you mean the SQL Query that CR creates automatically. Here it is:

SELECT "tblBatchDetail"."supplier2", "tblBatchDetail"."terminalName", "tblBatchDetail"."terminalNumber", "tblBatchDetail"."splcCode", "tblBatchDetail"."carrierName", "tblBatchDetail"."carrierSCAC", "tblBatchDetail"."fein", "tblBatchDetail"."destCity", "tblBatchDetail"."destState", "tblBatchDetail"."bolNumber", "tblBatchDetail"."poNumber", "tblBatchDetail"."startLoadDateTime", "tblBatchDetail"."endLoadDateTime", "tblBatchDetail"."productDesc", "tblBatchDetail"."prodCode", "tblBatchDetail"."grossGallons", "tblBatchDetail"."netGallons", "tblBatchHeader"."batchDateTime", "tblConsignees"."AdventCustomerID", "tblConsignees"."AdventCustLocNumber", "tblConsignees"."AdventPricingVendor", "tblCarriers"."AdventCarrierCD", "tblConsignees"."consignee", "tblConsignees"."AdventInvSiteID", "tblConsignees"."AdventVendorLocationID", "tblProducts"."AdventProductCD"
 FROM   ((("VendorReports"."dbo"."tblConsignees" "tblConsignees" INNER JOIN "VendorReports"."dbo"."tblBatchDetail" "tblBatchDetail" ON "tblConsignees"."consignee"="tblBatchDetail"."destCustNumber") INNER JOIN "VendorReports"."dbo"."tblBatchHeader" "tblBatchHeader" ON (("tblConsignees"."supplier"="tblBatchHeader"."supplier") AND ("tblConsignees"."terminal"="tblBatchHeader"."terminal")) AND ("tblBatchDetail"."rowID"="tblBatchHeader"."rowID")) INNER JOIN "VendorReports"."dbo"."tblCarriers" "tblCarriers" ON (("tblBatchHeader"."supplier"="tblCarriers"."supplier") AND ("tblBatchHeader"."terminal"="tblCarriers"."terminal")) AND ("tblBatchDetail"."carrierName"="tblCarriers"."carrierCD")) INNER JOIN "VendorReports"."dbo"."tblProducts" "tblProducts" ON ("tblBatchHeader"."supplier"="tblProducts"."supplier") AND ("tblBatchHeader"."terminal"="tblProducts"."terminal")

If you run the report with no selection statement added do you get the records you are missing?

Since you use INNER JOINs corresponding records must exist in all tables.

mlmcc
I'm not real good with SQL especially INNER, OUTER, LEFT, and RIGHT joins. I have 3 lookup (cross-reference) tables that are joined by key fields and I'm not real sure if they are what's causing the problem.
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

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
Glad i could help

mlmcc