cancel
Showing results for 
Search instead for 
Did you mean: 

command based report, not recognizing the field COMMAND.SDID(1) in selection formula

11-19-2021 3:01 PM
385 views 2 comments Go to solution
0 Likes
SAP Managed Tags
Subscribe

Hi,

Currently we are using CR.NET 13 SP30 Version. And we upgrading from legacy CR11.5.

For the Selection Formula, we are using following code in CR.NET:

TestReport.DataDefinition.RecordSelectionFormula ="{DOCUMENT.SDID} = {ORDERS.SDID}";

since we have changed the report from multi-tables report to command-based report, setting the selection formula gives error while previewing the report.

Scenario:

Selection formula with multi-table report:

{DOCUMENT.SDID} = {ORDERS.SDID

After converting to command based report, Selection formula with Command-based report:

{COMMAND.SDID} = {COMMAND.SDID(1)}

since DOCUMENT and ORDERS have same field, field name SDID, converted command based report created two fields SDID and SDID(1)

Problem:

while setting the selection formula using command based report, while preview it is not recognizing COMMAND.SDID(1)

Please provide your solution.

Thanks,

Samson

0 Likes

Accepted Solutions (1)

Accepted Solutions (1)

DellSC
Active Contributor

You need to give the field that's coming in as SDID(1) an alias - Crystal doesn't recognize field names that include parentheses.

-Dell

Answers (1)

Answers (1)

0 Likes

First upgrade to SP 31, SP 30 has a lot of Viewer issues.

Also, update your Report, CR 11.5 and later versions had odd logic when using Commands. At one point, I don't recall the exact version, CR would append the (1) onto Commands and fields.

Also, your 10000000000000000 is too large, CR 2016 and lower is a 32 bit app so the largest value you can use is 15 digits plus one for the sign of the value.

Using larger number can have odd behaviour, it could wrap the value with a negative result or it could be the result of 15 digits -

10000000000000000 - 100000000000000 = 100.