Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Not displaying with each change within grouping...

Status
Not open for further replies.

tradle

Programmer
Jan 7, 2004
94
US
The following is the header formula for a report that I wrote that is grouped by a field called "Rep_X_Consolidated.Eqmajor". Everything else on the report displays without error on a change of "Rep_X_Consolidated.Eqmajor", but for some reason this header disappears afyter the first instance. What the heck am I missing?

Stringvar headerx;
if not isnull({RPPortInfo.Name2}) and {Rep_X_Consolidated.IndexName} <> 'S&P 500' then
headerx:= 'Stock Diversification - ' +totext({Rep_X_Consolidated.StockPortfolioName})+' Sectors'+chr(13)+
totext({RPPortInfo.Name})+
totext({RPPortInfo.Name2})

else if isnull({RPPortInfo.Name2}) and {Rep_X_Consolidated.IndexName} <> 'S&P 500' then
headerx:= 'Stock Diversification - ' +totext({Rep_X_Consolidated.StockPortfolioName})+' Sectors'+chr(13)+
totext({RPPortInfo.Name})

else if not isnull({RPPortInfo.Name2}) and {Rep_X_Consolidated.IndexName} = 'S&P 500' then
headerx:= 'Stock Diversification - S&P 500 Sectors - ' +totext({Rep_X_Consolidated.StockPortfolioName})+chr(13)+
totext({RPPortInfo.Name})+
totext({RPPortInfo.Name2})

else
headerx:= 'Stock Diversification - S&P 500 Sectors - ' +totext({Rep_X_Consolidated.StockPortfolioName})+chr(13)+
totext({RPPortInfo.Name});
headerx;


THANKS!!!
 
I might construct the formula a bit different

*******************************************

Stringvar headerx;

if {Rep_X_Consolidated.IndexName} <> 'S&P 500' then
(
if not isnull({RPPortInfo.Name2}) then
headerx := 'Stock Diversification - ' + totext
({Rep_X_Consolidated.StockPortfolioName}) +
' Sectors'+chr(13)+ totext({RPPortInfo.Name})
+ totext({RPPortInfo.Name2})
else
headerx:= 'Stock Diversification - ' + totext
({Rep_X_Consolidated.StockPortfolioName}) +
' Sectors'+chr(13)+ totext({RPPortInfo.Name});
)
else
(
if not isnull({RPPortInfo.Name2}) then
headerx:= 'Stock Diversification - S&P 500
Sectors - ' + totext
({Rep_X_Consolidated.StockPortfolioName})+
chr(13)+ totext({RPPortInfo.Name})+
totext({RPPortInfo.Name2})
else
headerx:= 'Stock Diversification - S&P 500
Sectors - ' +totext
({Rep_X_Consolidated.StockPortfolioName})+
chr(13)+ totext({RPPortInfo.Name});
);

headerx;

*******************************************

this sorts your logic a bit better since it is a bit unclear at the end.

Other than this You don't say where this formula is placed and what conditions if any exist on the section.

Hope this helps


Jim Broadbent

The quality of the answer is directly proportional to the quality of the problem statement!
 
Thanks so much, Jim!

I've been slammed with another task, but will be able to test your logic tomorrow. I'll let you know how it goes!

Kind Regards,
Tim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top