hi there i have written a program in C# . i have a problem in crystal report . i wanna sort data in a report by clicking on a link in header . is it possible in crystal report?
please help thanks...
hi there i have written a program in C# . i have a problem in crystal report . i wanna sort data in a report by clicking on a link in header . is it possible in crystal report?
please help thanks...
Kinda.
If you distribute your reports with BusinesObjects Enterprise (BOE), you could:
If you don't use BOE, you could roll your own Url scheme to do something similar.
Example:
Assumptions
Implementation
Create two parameter fields:
AscSortedField - String; default value: CustomerName DescSortedField - String; default value: Ignored
Create two formula fields:
AscSortedField
//AscSortedField
//If the parameter's value isn't found, a NULL is returned (a good thing)
SELECT {?AscSortedField}
CASE "CustomerName": {Customer.Customer Name}
CASE "Region": {Customer.Region}
DescSortedField
//DescSortedField
//If the parameter's value isn't found, a NULL is returned (a good thing)
SELECT {?DescSortedField}
CASE "CustomerName": {Customer.Customer Name}
CASE "Region": {Customer.Region}
Open the report's Record Sort Expert. Add {@AscSortedField}; ensure that its Sort Direction is set 'Ascending'. Add {@DescSortedField}; ensure that its Sort Direction is set to 'Descending'.
Usage
If you want to sort the report by Customer Name in ascending order, set the AscSortedField parameter's value to 'CustomerName' and set the DescSortedField parameter's value to a dummy value (e.g. 'Ignored').
If you want to sort the report by Region in descending order, set the AscSortedField parameter's value to 'Ignored' and set the DescSortedField parameter's value to 'Region'.
I dont know exactly how that can be done in Crystal, look at how it can be done in FastReport.Net.And then Just repeat the same procedure in crystal.Hope you will get the idea, The principal is Data Sorting, then try to get the hints from it.