I have a Crystal Report which the user wants to the able to dynamically sort based on the Field Heading in the report. I have some VBA code which iterates throught the Field Headings on the page heading section of the report and displays them in a combobox to allow the user to select one. The code looks something like:
I was then going to pass this name to the report on loading to sort the data using something like:
objCRRpt.RecordSortFields.Add objCRRpt.Database.Tables(1).Fields(3), crAscendingOrder
The problem is that the customer wanted the field headings renamed to more meaningful names (to them) than the actual Database Field Names.
This means the field heading names in the report and data base field names no longer "match up". Is there a way to cross reference one against the other in code so the I can display the Field Headings as shown on the report while under the bonnet passing the actual database field name this Field Heading refers to?
Thanks in advance.