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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Store the Data from a Column from a database into an array 1

Status
Not open for further replies.

CrystalMule

Technical User
Dec 28, 2005
2
CH
Hi,

I Had Problem with the Arrays.If any one can Help that will be Great.

Problem :
I have to move all the data from the datacolumn into the Array and then How to use the IRR function in Crystal Report.


Thanks,

Ravi

 
You can generate the array using a formula in the details section (assuming that you have all of the unique values in the details):

whileprintingrecords;
numbervar array MyValues;
redim preserve MyValues[ubound(MyValues)+1];
MyValues[ubound(MyValues)]:={table.value};
1

The last value is simply to get around the fact that Crystal can't return an array in a formula.

Then in the report footer try:

whileprintingrecords;
numbervar array MyValues;
IRR(MyValues)

-k
 
Hi Everyone,

I am working on what sounds like a similar project. I am also having a lot of trouble. I used your suggestion (above) but am running into errors:

"numerical method did not converge; try another value for guess"
&
"The values array argument of IRR must have both positive & negative entries"

The first error message, I think I've worked through - but the second one is proving to be a challenge. How do I test for cash flows that do not include at least one positive and one negative, with out eliminating those cash flows from the report entirely (I still need them to calculate other summaries within the report)?

Any help would be greatly appreciated!!

-SB

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top