MySQL Data Source Parameter Issue
I have added a bit more info...
I am setting up a datasource and have entered a query.
When the where clause is
where
<fieldname> = '{D15B35A9-3A38-4E41-B2C6-6C6DF23A2061}'
and <fieldname2> = '{7DED468D-6506-4CA3-B711-1105C4532A23}'
and <fieldname3> = '{FECD00C7-8C16-4D49-AC6A-DE5D5698219A}'
selecting view data in the data pane works fine and gives me the expected results.
but when its set up as
where
<fieldname> = @p1
and <fieldname2> = @p2
and <fieldname3> = @p3
and parameters are set up as
then selecting view data returns nothing.
Not sure what the problem is but suspect it may be the expression is not set but I don't know what the expression should be.
Database is mysql
So I read the manual a bit more and further defined the parameters in the query and added 3 parameters in the data bain . Which you can see in the screen shot and added them in the Query Wizard Parameters screen/
Still no happiness in getting the query to populated the defaults so something is still missing
This is the property of the first parameter.
What am I missing to get the default to load into the query when I preview the report ? I suspect it is the expression in the parameter definition...
Again any help is appreciated.
I am setting up a datasource and have entered a query.
When the where clause is
where
<fieldname> = '{D15B35A9-3A38-4E41-B2C6-6C6DF23A2061}'
and <fieldname2> = '{7DED468D-6506-4CA3-B711-1105C4532A23}'
and <fieldname3> = '{FECD00C7-8C16-4D49-AC6A-DE5D5698219A}'
selecting view data in the data pane works fine and gives me the expected results.
but when its set up as
where
<fieldname> = @p1
and <fieldname2> = @p2
and <fieldname3> = @p3
and parameters are set up as
then selecting view data returns nothing.
Not sure what the problem is but suspect it may be the expression is not set but I don't know what the expression should be.
Database is mysql
So I read the manual a bit more and further defined the parameters in the query and added 3 parameters in the data bain . Which you can see in the screen shot and added them in the Query Wizard Parameters screen/
Still no happiness in getting the query to populated the defaults so something is still missing
This is the property of the first parameter.
What am I missing to get the default to load into the query when I preview the report ? I suspect it is the expression in the parameter definition...
Again any help is appreciated.
Comments
https://stackoverflow.com/questions/1265739...arch-for-a-guid
Works fine for you. Not for me. That's a problem. I noticed that your select is fieldname = @p1 and then in the parameter definition you define it as @p1 not simply as p1. That's not what the manual seems to say...
Anyway this is definitely a problem for me. Is there anyway to debug this ?
I get this message.
Notes:
1. attach database sakila to mysql server
2. register FastReport.MySQL.dll to fastreport designer plugin (dependency: MySql.Data.dll)
3. MySql.Data.dll is mysql-connector-net-6.10.6
4. resolve sakila db connection in untitled.frx and copy it to folder 'compiledprogram' (i didnt use odbc [img]style_emoticons/<#EMO_DIR#>/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /> ) 5. run WindowsFormsApplication1.exe[/img]
I finally got back. I built the fastreport.mysql.dll plug in as instructed by help desk. It still did not work. I looked at your example and tweaked a few things and then it started to work. Thanks for your help. I will now try to get this working in my web server and see what happens.
Thank you for your help.