Does this occur Even with the unmodified Sample report ? - (Make sure that your custom report has the same Record selection criteria as shown on the sample report in Crystal - otherwise it could include inappropriate/all docs in each file )
For example,. the record selection criteria should look something like this: Start by copying this exactly, it is what you should use 99% of the time unless you have special requirements.
In Crystal, choose Report->Selection Formulas -> Record , and paste in the following formula - replacing the existing.
(
if ({?SOP Type} <> 0 AND {?SOP Number} <> "") then
(
{SOP50200.SOPTYPE} = {?SOP Type} AND
{SOP50200.SOPNUMBE} = {?SOP Number} AND
{SOP50200.DOCTYPE} = {?Document Type} and
{SOP50200.SEQNUMBR} = {?Sequence Number} and
{SOP50200.USERID} = {?User ID} and
(
({?Location Code} = "1" and {SOP50200.LOCNCODE} = {SOP10200.LOCNCODE})
or
({?Location Code} = "0")
)
)
else
(
{SOP50200.DOCTYPE} = {?Document Type} and
{SOP50200.SEQNUMBR} = {?Sequence Number} and
{SOP50200.USERID} = {?User ID} and
(
({?Location Code} = "1" and {SOP50200.LOCNCODE} = {SOP10200.LOCNCODE})
or
({?Location Code} = "0")
)
)
)
You will also need to update the Record selection Formula on the Statement report, Start by using the same formula used in the Sample Template report found in the Forms Printer subfolder of the GP folder.
For example on the sample crystal report template for statements, the record selection formula is: (make sure it includes Customer Number conditionally as shown, and Sequence number
(
if {?Customer Number} = "" then
(
{ASI12304.USERID} = {?User ID} and {ASI12304.SEQNUMBR} = {?Sequence Number}
)
else
(
{ASI12304.CUSTNMBR} = {?Customer Number} and
{ASI12304.USERID} = {?User ID} and {ASI12304.SEQNUMBR} = {?Sequence Number}
)
)
The example Record selection Formulas above are for Crystal Reports, If using SSRS reports, you should use the WHERE clause as shown on the Sample Template Report Data Sets to insure only the Correct Customer Record is selected when a document is delivered.