MySQL Data Source Parameter Issue

edited March 2018 in FastReport .NET
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

v3AQlkd.png

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/

DS9ToPM.png
2DI6yYd.png
hwfkAvf.png

Still no happiness in getting the query to populated the defaults so something is still missing

This is the property of the first parameter.
e36YUV6.png

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

  • edited 2:19AM
    I updated the original post to reflect changes
  • edited 2:19AM
    what is your column/field type in your db?

    https://stackoverflow.com/questions/1265739...arch-for-a-guid
  • edited 2:19AM
    ipong wrote: »
    what is your column/field type in your db?

    https://stackoverflow.com/questions/1265739...arch-for-a-guid
    the data type is varchar(38) for all parameter fields.
  • edited 2:19AM
    i cannot reproduce your problem, works fine >>
    1.png 44.5K
    2.png 14.6K
    3.png 16.6K
    4.png 16.3K
    5.png 18.9K
    6.png 9.8K
  • edited 2:19AM
    ipong wrote: »
    i cannot reproduce your problem, works fine >>

    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 ?
  • edited March 2018
    attach your frx file
  • edited 2:19AM
    ipong wrote: »
    attach your frx file
    well now it does not work at all.


    I get this message.

    kAcBvmK.png
  • edited 2:19AM
    Tried to upload the frx file ... upload failed.
  • edited March 2018
    fully functional demo of fastreport with mysql db, https://mega.nz/#!w00lXSCL!H8uuUmMJ...Frz5jRbQ8JWrKBc

    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]
  • edited 2:19AM
    ipong wrote: »
    fully functional demo of fastreport with mysql db, https://mega.nz/#!w00lXSCL!H8uuUmMJ...Frz5jRbQ8JWrKBc

    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.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.