CrystalReports, c# - The string is non-numeric problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mike

    #1

    CrystalReports, c# - The string is non-numeric problem

    I use MS SQL EXPRESS DB
    VS 2005, c#
    Win Application

    I have problem "The string is non-numeric"

    with formula

    CDbl({pr_DajPon udu;1.Kolicinsk iPopust})/100 * {@NajamProstora }

    File KolicinskiPopus t is carChar(25) within MS SQLEXPRESS DB

    I found description error and possible solution:
    The string is non-numeric.
    The argument to the ToNumber function must be a number stored as a
    string
    (for example, a customer number, an ID number, and so on). The string
    may
    be preceded by a minus sign and may contain leading and trailing
    blanks. You
    have used an argument that is non-numeric and therefore cannot be
    converted to a number. Change the argument to numeric and recheck.

    How I can reslove that?

    Thanks
  • Nicholas Paldino [.NET/C# MVP]

    #2
    Re: CrystalReports, c# - The string is non-numeric problem

    Well, what is actually in this field? The report is seeing a
    non-numeric value.

    Are you sure that there are no non-numeric values being passed to this?


    --
    - Nicholas Paldino [.NET/C# MVP]
    - mvp@spam.guard. caspershouse.co m

    "Mike" <ablyplus@yahoo .comwrote in message
    news:b9qvl31h1q ab3c2hd6c23tis9 kp3o3gsq6@4ax.c om...
    >I use MS SQL EXPRESS DB
    VS 2005, c#
    Win Application
    >
    I have problem "The string is non-numeric"
    >
    with formula
    >
    CDbl({pr_DajPon udu;1.Kolicinsk iPopust})/100 * {@NajamProstora }
    >
    File KolicinskiPopus t is carChar(25) within MS SQLEXPRESS DB
    >
    I found description error and possible solution:
    The string is non-numeric.
    The argument to the ToNumber function must be a number stored as a
    string
    (for example, a customer number, an ID number, and so on). The string
    may
    be preceded by a minus sign and may contain leading and trailing
    blanks. You
    have used an argument that is non-numeric and therefore cannot be
    converted to a number. Change the argument to numeric and recheck.
    >
    How I can reslove that?
    >
    Thanks

    Comment

    • Mike

      #3
      Re: CrystalReports, c# - The string is non-numeric problem

      Within DB "pr_DajPonudu;1 .KolicinskiPopu st" is VChar(25) and
      @NajamProstora is int

      CDbl({pr_DajPon udu;1.Kolicinsk iPopust})/100 * {@NajamProstora }

      Mirko



      On Wed, 12 Dec 2007 11:14:59 -0500, "Nicholas Paldino [.NET/C# MVP]"
      <mvp@spam.guard .caspershouse.c omwrote:
      >CDbl({pr_DajPo nudu;1.Kolicins kiPopust})/100 * {@NajamProstora }
      >>
      >File KolicinskiPopus t is carChar(25) within MS SQLEXPRESS DB

      Comment

      • Nicholas Paldino [.NET/C# MVP]

        #4
        Re: CrystalReports, c# - The string is non-numeric problem

        No, I meant, what are all the values for that field. If you don't have
        a lexical representation of a number, you won't be able to convert it, and
        get the error message you are getting.


        --
        - Nicholas Paldino [.NET/C# MVP]
        - mvp@spam.guard. caspershouse.co m

        "Mike" <ablyplus@yahoo .comwrote in message
        news:mi50m39h07 5quraphkkte4cnl 9nc2qrr3d@4ax.c om...
        Within DB "pr_DajPonudu;1 .KolicinskiPopu st" is VChar(25) and
        @NajamProstora is int
        >
        CDbl({pr_DajPon udu;1.Kolicinsk iPopust})/100 * {@NajamProstora }
        >
        Mirko
        >
        >
        >
        On Wed, 12 Dec 2007 11:14:59 -0500, "Nicholas Paldino [.NET/C# MVP]"
        <mvp@spam.guard .caspershouse.c omwrote:
        >
        >>CDbl({pr_DajP onudu;1.Kolicin skiPopust})/100 * {@NajamProstora }
        >>>
        >>File KolicinskiPopus t is carChar(25) within MS SQLEXPRESS DB

        Comment

        • Mike

          #5
          Re: CrystalReports, c# - The string is non-numeric problem

          All values are numbers from 0-100


          On Wed, 12 Dec 2007 14:09:46 -0500, "Nicholas Paldino [.NET/C# MVP]"
          <mvp@spam.guard .caspershouse.c omwrote:
          No, I meant, what are all the values for that field. If you don't have
          >a lexical representation of a number, you won't be able to convert it, and
          >get the error message you are getting.

          Comment

          • Nicholas Paldino [.NET/C# MVP]

            #6
            Re: CrystalReports, c# - The string is non-numeric problem

            That's the thing, they aren't, or crystal reports doesn't see it that
            way. Either that, or the binding is incorrect.

            I've also seen bindings on crystal reports (in earlier versions) just
            get messed up, and map the wrong fields to the wrong bindings. If you
            verify the data for the report (or outright change the data source and then
            change it back) do you still get this?


            --
            - Nicholas Paldino [.NET/C# MVP]
            - mvp@spam.guard. caspershouse.co m

            "Mike" <ablyplus@yahoo .comwrote in message
            news:oru1m3lcat pjtsfhmcppt5gj1 rjmnc6tbr@4ax.c om...
            All values are numbers from 0-100
            >
            >
            On Wed, 12 Dec 2007 14:09:46 -0500, "Nicholas Paldino [.NET/C# MVP]"
            <mvp@spam.guard .caspershouse.c omwrote:
            >
            > No, I meant, what are all the values for that field. If you don't
            >have
            >>a lexical representation of a number, you won't be able to convert it, and
            >>get the error message you are getting.

            Comment

            Working...