CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2008
    Posts
    3

    Crystal Reports 10 Selection Record

    Hi I am using Crystal Reports 10 to develop a report. In my Selection Record I have the following code:

    {tblYears.Year} in {?Year}-2 to {?Year}-1 and
    {@PresbNo} = {?Pm-tblPresb.PresbID}
    and ({qryAllRegions.SuppressIDOnReport} <> True)
    or({qryAllRegions.PCFID}<>0 and {qryAllRegions.PastoralCharge}<>False)

    What I want to do is make sure records where PCFID field = 0 and PastoralCharge=False DO NOT display in the report.

    However the code that I have from above isn't working it's still displaying records where PCFID = 0 and PastoralCharge=False...

    I'm not sure what going on. Any help would be greatly appreaciated.

    Thanks.

    Regards,

    Irena

  2. #2
    Join Date
    Mar 2008
    Posts
    7

    Re: Crystal Reports 10 Selection Record

    Hi,
    Can you check your condition for OR i.e.

    or({qryAllRegions.PCFID}<>0 and {qryAllRegions.PastoralCharge}<>False)

    I think this or condition is disturbing the record selection criteria, When the previous conditions are met then it may be showing the records where
    where PCFID = 0 and PastoralCharge=False for the sake of previous AND conditions.

  3. #3
    Join Date
    May 2006
    Posts
    324

    Re: Crystal Reports 10 Selection Record

    Maybe the OR should be an AND

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