Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

AutoSearchSettings.SearchExpression datatype error

edited June 2009 in General
Hi,
I use D2007 and RB11.04

I have a paramter mamed 'ppParameter1' with:
ppParameter1.DataType = dtDateTime
ppParameter1.AutoSearchSettings.SearchOperator = soBetween
ppParameter1.AutoSearchSettings.SearchExpression = '01/01/2008 10:10,
10/10/2008 11:20'

and if I change SearchExpression with event-handler below:

procedure TmyEndUserSolution.ppReport1BeforeAutoSearchDialogCreate(
Sender: TObject);
var i:integer;
begin
ppReport1.Parameters.Items
['ppParameter1'].AutoSearchSettings.SearchExpression := '02/02/2008 10:10,
10/10/2008 11:20';
end;

I have error 'EVariantTypeCastError'
"Impossible to convert type (String) in type (Date)"

J-Pierre

Comments

  • edited June 2009

    Thanks for reporting this. (I had to modify my Windows Regional settings to
    recreate the error and then was able to fix it).

    There is now a patch available that fixes this issue. Registered users of RB
    11.04 can send a request to support@digital-metaphors.com and request the
    patch.



    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.