Passing Query Sort Fields from Workflow
I have a form where users are able to select sorting fields for a query used to generate a report. I'd hoped that the order of the features in the report would match that query's results, but I lose that order when executing the secondary query in the Report using the input feature IDs.
Has anyone scripted a solution to this? I'm sure it's doable but am having trouble digging through the DevExpress API documentation to fish this out. Or is there a better way for me to pass features to the report?
-
In the report there you can define Sort Fields on a Detail Band, but I do not know if you can change this dynamically.
https://docs.vertigisstudio.com/reporting/latest/help/Default.htm#shr/help/detail-band.htm
1 -
For future users (of which I am now one): I got this working but got tripped up on trying to set the sorting using the Detail_Discrepancy_BeforePrint() function; do not do this. Use Report_BeforePrint().
Something like:
private void Report_BeforePrint(object sender, System.ComponentModel.CancelEventArgs e) { var detailBand = Report.Bands[BandKind.Detail] as DetailBand; var inputSortFields = Report.Parameters["sortField"].Value.ToString(); var sortField = new GroupField(inputSortField, XRColumnSortOrder.Ascending); detailBand.SortFields.Add(sortField); }0
Vous devez vous connecter pour laisser un commentaire.
Commentaires
3 commentaires