CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2009
    Posts
    14

    [RESOLVED] Life, Death, and Parameters

    Using CR 8.5
    Reporting from SQL 2003

    I am creating (trying to) a report that uses parameters to display technical data. Although there is this problem that i cant seem to shake. I have two fields that contain serial numbers that need to be queried. I can create a parameter that searches one table although i can't create one that searches both at the same time.
    Is there a way i can reference both tables as one? Or any other suggestions that can make this query possible?
    Let me know i require more detail..

    Thanks for your time

  2. #2
    Join Date
    Jun 2009
    Posts
    2

    Re: Life, Death, and Parameters

    Hi there,

    You can just create the new parameter, say you call it Serial Number. in the report expert write:

    {?Serial Number} like ({table1.serial_num} or {table2.serial_num})

  3. #3
    Join Date
    Jun 2009
    Posts
    14

    Red face Re: Life, Death, and Parameters

    Interesting enough i have tried that and i get the message that i need a boolean. BUT, thanks to your idea i tried this ...

    {?sch} in ({iminvloc_sql.user_def_fld_2} & {iminvloc_sql.user_def_fld_3})

    This works.. well kind of. This works if there arent any null fields.. So i'm making progress now i need to know how to query and allow null fields.

    Any ideas?

    Thanx abunch!

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

    Re: Life, Death, and Parameters

    You can try next Record Selection Formula
    Code:
    {?sch} = {iminvloc_sql.user_def_fld_2} Or {?sch} = {iminvloc_sql.user_def_fld_3}
    And about Null fields You can check in
    File / Report Options / Convert NULL Field Value to Default
    so You don't need to test if the fields are null or not

  5. #5
    Join Date
    Jun 2009
    Posts
    14

    Thumbs up Re: Life, Death, and Parameters

    This worked! Issue resolved!
    Thank you very much 3omda & jggtz.

Tags for this Thread

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