Print Page | Close Window

Simple Record Selection-Not Working

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22325
Printed Date: 05 May 2024 at 8:23pm


Topic: Simple Record Selection-Not Working
Posted By: BoltzGirl
Subject: Simple Record Selection-Not Working
Date Posted: 06 Jun 2017 at 5:21am
I have what I thought was a simple record selection for my Crystal Report (using 2013 Support Pack 7, v 14.1.7.1853) and I just cannot get one of the lines to work.

I am trying to pull in all records that have the following:

{ATS.GR} like {?HthPl} and
{ATS.PL} like {?PLTYP} and
{ATS.DecDateTime} in {@Beg Date}to {@End Date} and
{ATS.IPA} = {?IPA} and
{ATS.RefType} = "HH" and
{ATS.Stat} = "Approved" and
{V_SupplementalDataServiceType.ServiceType} in ['INITIAL','MED'] and
Not ({AuthStatusChangeLog.CHGFNC} like '*ADHOCLTR*')

The last line is the one not working. It is pulling in records that still have a line in the 'StatChgLog' that have the word ADHOCLTR.

There are multiple lines per record in this StatChgLog and I am trying to only pull the records that 'do not' have any line that has this ADHOCLTR context in any of the lines.

Any ideas as to why?




Replies:
Posted By: DBlank
Date Posted: 08 Jun 2017 at 2:45am
I don't see anything wrong with the select statement.
I am not clear if you are trying to doing a group select or not though. Are you looking at a grouping of records and wanting to exclude the entire group in any of the rows in that group have the ADHOCLTR?


Posted By: BoltzGirl
Date Posted: 09 Jun 2017 at 7:12am
I am looking at a group of records and yes, wanting to exclude any of the rows in that group that have ADHOCLTR in it. For some reason, it's not working and it's including records that have ADHOCLTR. So weird....cannot figure it out.


Posted By: Flyfisher
Date Posted: 09 Jun 2017 at 7:56am
If you remove that last line from the select statement, then the 'ADHOCLTR' lines show up in the report.

Using the field format, do a suppress formula that suppresses those 'ADHOCLTR' lines.


Posted By: DBlank
Date Posted: 12 Jun 2017 at 2:48am
look to see if you have any spaces between any of the letters.
Try a simple formula field fro testing
{AuthStatusChangeLog.CHGFNC} like '*ADHOCLTR*'
Place it on the detail row and see if you get True/False as expected.
Use it to tweak until you figure out what is going on with that field.



Print Page | Close Window