Results 1 to 4 of 4

Thread: Building a sql string for multiple selections..?

  1. #1

    Thread Starter
    Lively Member Joffies's Avatar
    Join Date
    Aug 2002
    Location
    London
    Posts
    119

    Building a sql string for multiple selections..?

    Hi.

    I have a listbox (checked style) that loades with codes.
    I want to select certain codes to filter my crystal report with. How wil i build my querystring?

    I code example would be helpfull!

    Is there a specific syntax that crystal use? Is there an easy way to implement this. I currently use the ocx. in my application. This application is already in a production environment so to update or add componennts would be difficult at this moment.

    Any advice would be appreciated.

    Thanks
    Do, or do not. There is no 'try'.

  2. #2
    Hyperactive Member
    Join Date
    Nov 1999
    Location
    Galway, Ireland
    Posts
    316
    R U using SQL Server.

    if so you could create a stored procedure that takes the query filters and appends them you could pass these to the crystal report from the vb code.

    using the OCX you can submit the query but this could get very messy and security could be an issue.
    Slan

  3. #3

    Thread Starter
    Lively Member Joffies's Avatar
    Join Date
    Aug 2002
    Location
    London
    Posts
    119

    Not quite....

    Hello again.

    Well i have figured it out but....... I do work with sql server! I build a string according to the codes loaded in the Listbox and then pass this string to the parameter in the crystal report. The only problem is that crystal only accepts strings with no more then 256 characters through a parameter! Any idea how i can get around this as the string i build could easily ber more then 256. Maybe an array or something?

    Thanks
    Do, or do not. There is no 'try'.

  4. #4

    Thread Starter
    Lively Member Joffies's Avatar
    Join Date
    Aug 2002
    Location
    London
    Posts
    119

    Well....

    Version 9 of crystal reports accepts up to 64,000 characters. I am currently using version 8.5. Go figure.....
    Do, or do not. There is no 'try'.

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