Print Page | Close Window

Help in the selection logic

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=11926
Printed Date: 15 May 2024 at 5:02am


Topic: Help in the selection logic
Posted By: 203bravo
Subject: Help in the selection logic
Date Posted: 21 Dec 2010 at 11:01am
currently using CR XI... grouping records based on invoice number then showing a comment field and date field.  there is a new comment created each time something is altered to the invoice.
 
trying to create a quick report to show only invoics that have no payment activity.  thus i am attempting to search the comments for "*payment received" to flag it.
 
example
 
35130
   2010-12-15     payment recieved
35132
    2010-12-15    shipment confirmed
    2010-12-19    shipment received
35133
    2010-12-01    shipment received
    2010-12-15    payment received
 
 
so i would only want to return invoice 35132.  I have to thought to flag it by at each entry and if the flag is false and payment received then set the flag to true.  this works, but i cannot select on the flag because of the formula. (it does not even show up as a possiblity in the select expert)
 
any all suggestions or help is appreicated.



Replies:
Posted By: DBlank
Date Posted: 21 Dec 2010 at 11:26am

create a fomula called @Flag

instring(table.commentfield,'payment received',1)
SUM this at the group level of invoice number
SUM(@Flag,table.invoicenumber)
go into the select expert and flip it to group select option and add your criteria there
SUM(@Flag,table.invoicenumber)=0 (Set this formula to use default values for NULLs)
 


Posted By: 203bravo
Date Posted: 21 Dec 2010 at 11:52am
THANK YOU ---- basically the same process i was using just didn't do the group selection.  works like a dream.


Posted By: DBlank
Date Posted: 21 Dec 2010 at 11:58am
no problem.
just a warning that group selection happens after many calculations occur so you have to make sure any summaries you are doing are account for this and the excluded groups still appear in the group tree, just not the body of the report


Posted By: 203bravo
Date Posted: 22 Dec 2010 at 5:12am
Thank you for the warning - i did have a minor correction to make on that as well.



Print Page | Close Window