Dynamically Sorting
Dynamically Sorting
How do you dynamically set the sorting of databands? Some of my reports will need to be sorted depending on what the user sorts. Is it possible to set what the report databands sort by when loading the report in flex?
Dynamically Sorting
Hello,
This functionality is already implemented and will be available in the prerelease build on January 4. In the attached archive you can see an example with dynamic sorting of the report.
Thank you.
This functionality is already implemented and will be available in the prerelease build on January 4. In the attached archive you can see an example with dynamic sorting of the report.
Thank you.
- Attachments
-
- 762.Sample.zip
- (282.95 KiB) Downloaded 685 times
Dynamically Sorting
Thanks! I'll wait until tomorrow to mess around with it=)
Dynamically Sorting
We always glad to help you!
Thank you.
Thank you.
Dynamically Sorting
Hello,
Can someone tell me how to sort databands by multiple fields from code correctly?
I'm trying this, without success:
Thank you.
Can someone tell me how to sort databands by multiple fields from code correctly?
I'm trying this, without success:
Code: Select all
var banda:StiDataBand = reportButtons.report.getComponentByName("DataBand1") as StiDataBand;
//clear sorts
banda.sort = [];
if (condition) {
banda.sort.push(["ASC", "{dados.maskCodigo}"]);
banda.sort.push(["ASC", "{dados.numeroPedido}"]);
banda.sort.push(["ASC", "{dados.numeroEntrega}"]);
} else {
banda.sort.push(["ASC", "{dados.maskCodigo}"]);
banda.sort.push(["ASC", "{dados.lote}"]);
banda.sort.push(["ASC", "{dados.loteOrdem}"]);
}
Dynamically Sorting
Hello
I found C# solution on "Support Center » Knowledgebase » How to change data sorting?".
It works fine.
Thank you.
I found C# solution on "Support Center » Knowledgebase » How to change data sorting?".
It works fine.
Code: Select all
var banda:StiDataBand = reportButtons.report.getComponentByName("DataBand1") as StiDataBand;
banda.sort = new Array();
if (condition) {
banda.sort.push("ASC");
banda.sort.push("numeroPedido");
banda.sort.push("ASC");
banda.sort.push("numeroEntrega");
} else {
banda.sort.push("ASC");
banda.sort.push("lote");
banda.sort.push("ASC");
banda.sort.push("loteOrdem");
}
Dynamically Sorting
Hello,
You can simplify your code:
Let us know if you need any additional help.
Thank you.
You can simplify your code:
Code: Select all
var banda: StiDataBand = reportButtons.report.getComponentByName("DataBand1") as StiDataBand;
if (condition)
banda.sort = [
"ASC",
"numeroPedido",
"ASC",
"numeroEntrega"
];
else
banda.sort = [
"ASC",
"lote",
"ASC",
"loteOrdem"
];
Thank you.
-
- Posts: 18
- Joined: Tue Aug 09, 2011 10:35 am
Re: Dynamically Sorting
Ok, so I find the band, set the sort...and nothing happens....so either I have the sort wrong and that's why nothing happens, or something else must be done to apply the sort?
Re: Dynamically Sorting
Hello,
Then you need to re-build a report, for example:
Thank you.
Then you need to re-build a report, for example:
Code: Select all
...
report.isRendered = false;
report.render();
report.show();