DateTime parameter problem

edited 12:52PM in FastReport .NET
Hi,

when I create DateTime query parameter in table designer, the database query fails (I get ADO message "Failed to convert parameter value from a variant to a DateTime"). Same with type like Timestamp, Int ... . Datatype text, char or varchar is working correctly. Is there any solution?

Thanks





Comments

  • edited 12:52PM
    Hello,

    Which data provider do you use? It's a MS SQL or something else?
  • edited 12:52PM
    AlexTZ wrote: »
    Hello,

    Which data provider do you use? It's a MS SQL or something else?
    Yeah it's MSSQLDataConnection


  • edited 12:52PM
    Did you tested it on a new FR.Net version? It works well for me. Please describe steps how to reproduce this error.
  • edited 12:52PM
    I have FR.NET build 196.? 

    my description:

    - in designer create New DataSource (MSSQL -> select table -> Finish)

    - right-click on new table -> edit

    - in tab Define Parameters create New -> set Datatype and Expression(same type as parameter) -> Finish

    - right-click on new table -> View data and I get this message: "Failed to convert parameter value from a variant to a DateTime"

  • edited 12:52PM
    You have to set up the DefaultValue property of the parameter. This property is used when you trying to view table data. The Expression property can't be calculated when you in the report designer.
  • edited 12:52PM
    Thanks for your help. I had no idea that parameter DefaultValue have to be set (especially when I set up parameter value in code before I tried evaluate table). Now it works in designer and code also

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.