srpeterson
MIS
I am currently using Crystal Reports version 8.5 with an OLEDB connection to a SQL2000 database. The report I am building has a parameter option that will allow the user to pick which software product they would like to report on. Based on the parameter the corresponding customer information will display on the report of customers who currently have licensed that module of software. The problem that has arisen is that depending on the software chosen I need to have the sort order change.
If {?Product Identifier} = "VA/PO" then sort order needs to be Core Software Name, City, State.
If {?Product Identifier} = "VALMI" then sort order needs to be Product Vendor.
I created a formula named Sort that has the following code. I just wanted to test this out and if it worked I plan to add onto the If-Then statement for all of my other parameter options.
if {PRODUCT.ACTUALID} in ["VA/PO","BVA/PO"] then
({C_ACCOUNT.CORE_SFW_NAME};
{ADDRESS.CITY};
{ADDRESS.STATE}
)
else
{ACCOUNT.ACCOUNT};
When VA/PO is selected as my parameter with the Sort formula field chosen in the Report>Sort Records dialog box I end up getting the following results returned. I have also eliminated a couple of the fields in the formula to see if I cannot just get it to sort on, for instance City,State and I end up getting the same results returned.
CoreSoftwareName City State
Vision Ash Flat AR
Vision Clarendon AR
Vision Parkdale AR
Vision Rogers AR
Vision Jonesboro AR
Vision Paragould AR
BAIS Anamosa IA
It appears as though State is the only field that it is sorting by. Is it possible to accomplish what I am attempting in Crystal? If anyone can give me some insight as to what I need to do in order to sort multiple columns using a formula field that would be great. I hope I have included enough information for you.
If {?Product Identifier} = "VA/PO" then sort order needs to be Core Software Name, City, State.
If {?Product Identifier} = "VALMI" then sort order needs to be Product Vendor.
I created a formula named Sort that has the following code. I just wanted to test this out and if it worked I plan to add onto the If-Then statement for all of my other parameter options.
if {PRODUCT.ACTUALID} in ["VA/PO","BVA/PO"] then
({C_ACCOUNT.CORE_SFW_NAME};
{ADDRESS.CITY};
{ADDRESS.STATE}
)
else
{ACCOUNT.ACCOUNT};
When VA/PO is selected as my parameter with the Sort formula field chosen in the Report>Sort Records dialog box I end up getting the following results returned. I have also eliminated a couple of the fields in the formula to see if I cannot just get it to sort on, for instance City,State and I end up getting the same results returned.
CoreSoftwareName City State
Vision Ash Flat AR
Vision Clarendon AR
Vision Parkdale AR
Vision Rogers AR
Vision Jonesboro AR
Vision Paragould AR
BAIS Anamosa IA
It appears as though State is the only field that it is sorting by. Is it possible to accomplish what I am attempting in Crystal? If anyone can give me some insight as to what I need to do in order to sort multiple columns using a formula field that would be great. I hope I have included enough information for you.