Problems with parameters (bool)


03-05-2010, 2:56 AM

I have a problem that I get in my ActiveReports.
I get into parameters <%BuyerType%>   false instead  0. That SQL don't suport and that why  I get error "Invalid column name 'false'."

EXAMPLE: when (TRUE = 1) then DealerPriceWOTax  -> THAT IS WORNG
                    when (1 = 1) then DealerPriceWOTax  -> THAT IS RIGHT



That hapens ON MY NEW SERVER (Windows server 2003 R2)
I have tested on diferents  servers (computers) and the two of one works ,but the third  don't work?

Is maybe SOMETHING wrong something in Framework???

PLease help me.

SELECT  DocumentPos.ArticleID,  ArticlePartList.PartID,
                 Articles.Title,
                 Articles.SupplierArticleID,
                 Articles.MeasureUnitID,
                 ArticlePartList.Quantity,
                 DocumentPos.PrintPartList as Prikazi
                  ,case when (<%BuyerType%> = 0) then CustomerPriceWOTax
                when (<%BuyerType%> = 1) then DealerPriceWOTax
            Else ''
            END as CenaBrezDDV,
           
           case when (<%BuyerType%> = 0) then CustomerPriceWTax
                when (<%BuyerType%> = 1 ) then DealerPriceWTax
            Else ''
            END as CenaZDDV      

Re: Problems with parameters (bool)


03-07-2010, 9:53 PM
If I understood your issue correctly then you are getting the value of “BuyerType” as Boolean instead of number/integer i.e True instead of 1 and False instead of 0.
Could you please let me know the data type of “BuyerType” in the database?
Are you getting the type difference in other machines also?

Regards,
Ankit Nigam

Re: Problems with parameters (bool)


03-07-2010, 11:16 PM
Hi,

I get this error only on one maschine.
The BuyerType is String and I did even try as bolean, but doesn't work.

I get this error only in one maschine.

Re: Problems with parameters (bool)


03-07-2010, 11:36 PM
Hello,

I would suggest you to use the following parameter syntax in the SQL query
‘<%BuyerType | PromptString | DefaultValue | S%>’ = ‘0’

Regards,
Ankit Nigam

Re: Problems with parameters (bool)


03-08-2010, 1:17 AM
Thax for that Info.

That works.

Thanx