MySQL + Parameters
Posted: Wed Dec 01, 2010 8:29 am
I am new to this forum and I'm trying the version for Flex (2010.3), reading the posts I was able to solve the problems of Security Violation
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:
In Datasource I also defined a parameter: Name = param1, size = 0, Type = ?
In Flex Builder I have this code:
Result: Report is empty
Can anyone help me or post an example?
Thanks
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