So they may have several transaction dates but you only want the first one...ie: the oldest
Not as simple as it sounds...If you are using CR SQL Designer then it would not be so bad as you can create a query that would bring back the Minimum Transaction date along with the other data...that would then make a easy report to write.
Otherwise, through direct linking you are drawing in virtually all the transactions for the clients...
if that is ok then group by Transaction date ascending
Now we want the first date only so once a client has been processed we want to ignore all other references.
Create an array called ClientID in an initialization formula and place it in the report header suppressed
@Initialization
//I'll assume this is a string...initialize the array
//for 50% more clients than you expect to have to a max of
//1000 (if more than 1000 then use 2 arrays)
WhilePrintingRecords;
stringVar array ClientID := ["","","","","","","","","","",
"","","","","","","","","","",
..(additional)..
"","","","","","","","","",""];
numberVar ClientIDCounter := 0;
Set up your report in the normal groupings of Transaction date (Ascending), Client
In the conditional suppress for all display sections of the report (header,detail and footers) place the following formula
WhilePrintingRecords;
{table.ClientID} in ClientID
this will suppress all details if we have reported this clientID earlier
Now in the footer of the clientid group, place a formula called ClientArray_Update: Suppress it in the footer
@ClientArray_Update
WhilePrintingRecords;
stringVar array ClientID;
numberVar ClientIDCounter;
if not {table.ClientID} in ClientID then
(
ClientIDCounter := ClientIDCounter + 1;
ClientID[ClientIDCounter] := {table.ClientID};
);
That should do the trick...the only drawback is the number of records you will be processing.
Hope this helps
Jim
JimBroadbent@hotmail.com