but I found nothing that explains how to pass parameters of a query at run-time.
In Report Designer I've defined a connection to MySQL and a datasource "Contacts" with this query:
Code: Select all
select * from contacts where name like @param1
In Flex Builder I have this code:
Code: Select all
private function onLoadComplete(event: Event): void
{
var loader: URLLoader = event.target as URLLoader;
reportString = loader.data as String;
var report: StiReport = new StiReport();
report.loadReportFromString(reportString);
report.dictionary.dataSources.getByName("Contacts").parameters.getByName("param1").value = "a%";
report.show();
}
Can anyone help me or post an example?
Thanks