CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2011
    Location
    Greece
    Posts
    26

    Problem with query and parameters

    Goodmorning
    I want to ask something. I want to create a crystal report witch will run with a database in sql express 2005.
    so i create to parameter fields for the user to put values, like this:
    131;Id@EDT@_Reception Code (number) 131 is my table
    131;Id@EDT@_Έως Κωδικό Κίνησης (number) 131 is my table

    So i write a simple query like this on selection group.


    {Emp131.Id} >= {?131;Id@EDT@_Reception Code} and
    {Emp131.Id} <= {?131;Id@EDT@_Until Reception Code}

    So my problem is that my field on database Id is a number, so when i put this code i dont get a box to insert value. If i change the value in parameters and put it string i can insert text but it brings me an error on query because it says need number. I used " or ' but its wrong and doesnt work. how i can solve that

  2. #2
    Join Date
    Jul 2005
    Posts
    1,083

    Re: Problem with query and parameters

    Say Crystal Reports version

    If the field you want to filter is numeric data type then the parameters should be numeric also.

    Check your parameters definition, they should be prompted
    JG


    ... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...

  3. #3
    Join Date
    Mar 2011
    Location
    Greece
    Posts
    26

    Re: Problem with query and parameters

    goodmorning.
    Yes i got this but how i will write the syntax with numberic. I mean the styntax with query. Also my crystal reports is version 11

  4. #4
    Join Date
    Jul 2005
    Posts
    1,083

    Re: Problem with query and parameters

    So my problem is that my field on database Id is a number, so when i put this code i dont get a box to insert value. If i change the value in parameters and put it string i can insert text but it brings me an error on query because it says need number. I used " or ' but its wrong and doesnt work. how i can solve that
    Your problem, as I understand is in the parameter definition and not in the filter

    Post or attach a screenshot from your parameters definition
    JG


    ... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...

  5. #5
    Join Date
    Mar 2011
    Location
    Greece
    Posts
    26

    Re: Problem with query and parameters

    Oh ok how i can post pictures to show you exactly. My field in database (id) is integer, my parameter is integer too but when i run it the user cant put a value there is no box

  6. #6
    Join Date
    Jul 2005
    Posts
    1,083

    Re: Problem with query and parameters

    To get a screenshot there must be a key in your keyboard
    The picture goes to the clipboard, From there you can copy everywhere (Ctrl-V)
    Also there's a button in the toolbar in the reply section taht says "InsertImage"
    JG


    ... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured