error when i modify sales report

Hi All

I try to modify my sales report to show tender typ on colmun

Begin Column FieldName = "Tendertotals.shift" DrillDownFieldName = "" DrillDownReportName = "" StoreIDFieldName = "" Title = "cash" VBDataType = vbCurrency Formula = "case when tender.id ='2' then tendertotals.shift else '0' end" ColHidden = False ColNotDisplayable = False FilterDisabled = False ColWidth = 1080 GroupMethod = groupmethodSum ColFormat = "" ColAlignment = flexAlignLeftTop End Column

Begin Column FieldName = "Tendertotals.shift" DrillDownFieldName = "" DrillDownReportName = "" StoreIDFieldName = "" Title = "VISA CARD" VBDataType = vbCurrency Formula = "case when tender.id ='3' then tendertotals.shift else '0' end" ColHidden = False ColNotDisplayable = False FilterDisabled = False ColWidth = 1080 GroupMethod = groupmethodSum ColFormat = "" ColAlignment = flexAlignLeftTop End Column

BUT it's give me follow erorr

Implicit conversion from data type vachar to mony is not allowed, Use convert fonction to run this query.

Can any one help me on this please?

Best Regards MOH.OWN

begin 666 CUSTOM - TENDER.qrp M+R\M+2T@4F5P;W)T(%-U;6UA

Reply to
MOH. OWN
Loading thread data ...

Hi Mohd, The problem coming because you are using this as wrong clause: Use: Formula = "case when tender.id ='2' then tendertotals.shift else '0' end"

Should be: Formula = "case when tender.id ='2' then cstr(tendertotals.shift) else '0' end" OR Should be: Formula = "case when tender.id ='2' then cstr(tendertotals.shift) else 0 end"

This is because > Hi All

Reply to
Akber Alwani

Try this: Formula = "case when tender.id =2 then tendertotals.shift else 0 end"

Same for the other Formulas - you were returning a varchar of '0' to a field you have defined as Currency... Also, the ID is a number not a varchar, so the quotes are not needed there either (this implicit conversion is allowed however, so it would not throw an error)

Glenn Adams Tiber Creek C> Hi All

Reply to
Glenn Adams [MVP - Retail Mgmt

Hi Mohd Yes my second clause is typo mistake

IT is Formula = "case when tender.id ='2' then tendertotals.shift else 0 end"

"Akber Alwani" wrote:

Reply to
Akber Alwani

Hi Akber

Thank you for help

I make that solution and sucsess wuithout error massage but Is LOAD all amount not with selecting date range. do you have any solution for this?

Best Regards moh.own

Reply to
MOH. OWN

Hi Mohd, I don't understand what you mean by "Is LOAD all amount not with selecting date range. do you have any solution for this?" Please explain clearly so I can help you out ASAP.

"MOH. OWN" wrote:

Reply to
Akber Alwani

HI Akber

now I have data from 1/1/2007 for e.g I generate report with yasterday date(on filter) on that report I got all sales from 1/1/2007 so its not take from whitch filter i select.

Best Regards

Reply to
MOH. OWN

Reply to
Akber Alwani

HI Akber

please check attaching report (TENDER) if you remove last faild

Begin Column FieldName = "Tendertotals.shift" DrillDownFieldName = "" DrillDownReportName = "" StoreIDFieldName = "" Title = "cash" VBDataType = vbCurrency Formula = "case when tender.id =2 then tendertotals.shift else 0 end" ColHidden = False ColNotDisplayable = False FilterDisabled = False ColWidth = 1080 GroupMethod = groupmethodSum ColFormat = "" ColAlignment = flexAlignLeftTop End Column

report will work proparly but when I add to report it's give me wrong report!!! I'm on Saudi Arabia but I'm from Sudan

Thanks and Best Regards

Reply to
MOH. OWN

begin 666 CUSTOM - TENDER.qrp M+R\M+2T@4F5P;W)T(%-U;6UA

Reply to
MOH. OWN

Hi Mohd, I couldn't get an attachement you said. send me at snipped-for-privacy@hotmail.com also you mean "field" instead of "failed" second are you using outlook express for newsgroup as I am also using but it is not working at all. I am getting this error may be you can help me in this Configuration: Account: msnews.microsoft.com Server: msnews.microsoft.com Protocol: NNTP Port: 119 Secure(SSL): 0 Code: 800ccc0f

"MOH. OWN" wrote:

Reply to
Akber Alwani

BeanSmart website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.