Exception error when using parameters in frxFDComponents query

I have several reports using FireDACQuery for data access, where I use four parameters from a dialog box (two dates for range and two float values for filter). Just showing two of the parameters here...

The TfrxFDQuery has the following parameters defined:
p1     Date     dtFrom.Date
p2     Date     dtEnd.Date

The SQL bit using the parameters looks like this:
declare @dtStart date;
declare @dtSlut  date;

set @dtStart = :p1 ;
set @dtSlut  = :p2 ;
IF @dtStart IS NULL                     
   SET @dtStart = getdate()-7;
IF @dtSlut IS NULL                     
   SET @dtSlut = getdate();

This generates an exception in TfrxReport.Calc at line 10107 both when exiting the SQL editing and closing the parameters dialog. Sometime I get an error from fsGetLanguage at line 97 and also in fs_iilparser!

If I comment out the use of :p1 and :p2, setting the @dtStart/dtEnd in sql, no exception occurs. Also, if I set DesignTimeExpr to FALSE, the errors are not shown in the designer or when run, but then of course, I can't see the fields from the query in the designer, rendering it useless for our end-users!

Am I missing something obvious here? Going gray haired on this soon...

Comments

  • edited 11:42PM
    Hi,

    Exact same issue for me Johan.

    The Language error was here a long time ago with DesignTimeExpr to TRUE. So i passed it to False back in time on FastReport VCL4 on XE6 and all worked good.

    Until last month where i migrate to XE8 and so passed to FastReport VCL5. I have now the same convertion error when we used query parameters with variable with other type that string...


    I support ticket has been create, and after reproduce the problem the reponse was :

    Den Zubov:
    "Hello,
    I this moment we don't have any information for you.
    This issue can be related with changes in FireDac component in Delphi XE8, so we need future investigation of this issue."

    Now answer for now when i ask for a period for this investigation and for the resolution of this issue.


    If you have any solution please share [img]style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> Best regards, Nicolas.[/img]
  • edited 11:42PM
    After some initial tests, it seems like update 5.3.14 solved the problem for me!

    Hope it solves your problem too!

    Cheers,
    Johan
  • edited 11:42PM
    Hi Johan and thank's for your answer.


    This is weird because i have installed the last version 5.3.14 and i have the same errors.

    If DesignTimeExpr to FALSE we have the conversion error (if we use parameters link to not string variable) and we don't see the result of the querys on the Datatree on the right.

    If DesignTimeExpr to TRUE we have the "Language not found" Error (if we use parameter on query) when we try to view or edit a FDQuery.


    You have not one of this two error anymore with the 5.3.14 Johan?


    Thank's for your help (We can't count on the Fastreport Support they never help us even if we pay a Professionnal team license... so thank's to the community)

    Nicolas.
  • edited 11:42PM
    Hi Johan,

    Good news, after open 2 supports Tickets and 2 months of waiting/pushing the new version 5.4.3 solved my issue.

    In first this version solved the new problem when DesignTimeExpr is to False (Result on FDQuery on Datatree aren't visible when parameters are used) but after a few test i can see that she also solved the language error when DesignTimeExpr is to true.

    Hope this is helpfull for your case too.

    Bye.

    Nicolas.

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.