I'm using CR XI. And CR Server to batch run report.
I have a simple list report about three columns. The report is dealing with some one-to-many issues by concatenating data into one column.
EXAMPLE: An account can have many opportunities associated with it. Each opportunity has an estimated close date. And each opportunity has a last modified date.
[tt]
Account EstCloseMonth
12 Nov, Jan
13 Jan, Feb
14 Mar
[/tt]
I'm grouping on the account number and I'm using a group header, detail and group footer formulas on the estimated close date to concatenate the estimated close date months into the second column of the report.
Now my user wants the last modified date added. And only the most recent last modified date should be shown for
an account (the latest modified date on any of the opportunities assigned to an account). Want this:
[tt]
Account EstCloseMonth LastModDate
12 Nov, Jan 11/15/07
13 Jan, Feb 9/1/07
14 Mar 1/1/2005
[/tt]
To do this I added a group header, detail and footer formula to act on the last modified date field. Here are those formulas:
[tt]
HEADER FORMULA
WhilePrintingRecords;
Global StringVar LastModDate;
DETAIL FORMULA
WhilePrintingRecords;
global StirngVar LastModDate;
LastModDate := LastModDate + ToText({CRAL_V_TEAM_OPPS.team_opp_modification_date})
FOOTER FORMULA
WhilePrintingRecords;
global StringVar LastModDate;
LastModDate
[/tt]
NOTE: I know the above doesn't limit to the most recent last modified date like I'm after but I'm stepping back from that goal for the moment. I'm trying to understand why when the above runs the value in the LastModDate field for the last row on the report is a concatenation of all last mod dates from all opportunities.
Why isn't the grouping by account number making the concatenation reset? I'm thinking once I figure this out I won't have any problem with my original detail formula that will get me the latest mod date within an account grouping of opportunities - which is really:
[tt]
If Not IsNull({CRAL_V_TEAM_OPPS.team_opp_modification_date}) then
If {CRAL_V_TEAM_OPPS.team_opp_modification_date} > LastModDate then
LastModDate := {CRAL_V_TEAM_OPPS.team_opp_modification_date}
Else
LastModDate
[/tt]
Thanks in advance!!!
I have a simple list report about three columns. The report is dealing with some one-to-many issues by concatenating data into one column.
EXAMPLE: An account can have many opportunities associated with it. Each opportunity has an estimated close date. And each opportunity has a last modified date.
[tt]
Account EstCloseMonth
12 Nov, Jan
13 Jan, Feb
14 Mar
[/tt]
I'm grouping on the account number and I'm using a group header, detail and group footer formulas on the estimated close date to concatenate the estimated close date months into the second column of the report.
Now my user wants the last modified date added. And only the most recent last modified date should be shown for
an account (the latest modified date on any of the opportunities assigned to an account). Want this:
[tt]
Account EstCloseMonth LastModDate
12 Nov, Jan 11/15/07
13 Jan, Feb 9/1/07
14 Mar 1/1/2005
[/tt]
To do this I added a group header, detail and footer formula to act on the last modified date field. Here are those formulas:
[tt]
HEADER FORMULA
WhilePrintingRecords;
Global StringVar LastModDate;
DETAIL FORMULA
WhilePrintingRecords;
global StirngVar LastModDate;
LastModDate := LastModDate + ToText({CRAL_V_TEAM_OPPS.team_opp_modification_date})
FOOTER FORMULA
WhilePrintingRecords;
global StringVar LastModDate;
LastModDate
[/tt]
NOTE: I know the above doesn't limit to the most recent last modified date like I'm after but I'm stepping back from that goal for the moment. I'm trying to understand why when the above runs the value in the LastModDate field for the last row on the report is a concatenation of all last mod dates from all opportunities.
Why isn't the grouping by account number making the concatenation reset? I'm thinking once I figure this out I won't have any problem with my original detail formula that will get me the latest mod date within an account grouping of opportunities - which is really:
[tt]
If Not IsNull({CRAL_V_TEAM_OPPS.team_opp_modification_date}) then
If {CRAL_V_TEAM_OPPS.team_opp_modification_date} > LastModDate then
LastModDate := {CRAL_V_TEAM_OPPS.team_opp_modification_date}
Else
LastModDate
[/tt]
Thanks in advance!!!