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

Invalid Argument

Status
Not open for further replies.

bld21

Technical User
Mar 1, 2010
49
US
I am using crystal reports 2008. I am running a report and after about 10,000 records I get an error of "Invalid Argument provided". In the formula area I am using:

{account.account_no} startswith ["3","4"] and
{billing_outstanding.chrg_amt} > 1 and
{account.status_cde} = 1 and {billing.enter_dte}> Date(2010,02,10). And I am using one formula field with :

If {account.account_dte}< Date(2008,07,01) then "NO" else
If {account.account_dte}> Date(2008,06,30) then "YES"

If I stop the report after about a few hundred records I do get data on the report. But if I let it run it will eventually error out.

Any ideas??

Thanks to anyone who replies.

 
It sounds like the report is fine but you have at least one record in your database with bad data

First, remove the formula that references the account.account_dte. If the report still bombs out, then the problem is with the selection criteria.

Remove the "{account.account_no} startswith ["3","4"] " and run the report again. If it still bombs out remove the "{billing_outstanding.chrg_amt} > 1" restriction and try again.

Repeat with each element until you're able to isolate the field that is giving you problems. Once that is done, create a new report with only the field in question, and make sure you sort on that field.

Then scan the report, you can usually just look at the beginning and end, and see if you can identify something that doesn't look right, such as a date of 2/31/2010.

Have the record corrected in the database and your report should work fine.

You can speed up this process by querying the db with a SQL editor, if that is an option for you.

 
Thanks, I am in the process now. I suspect it may be bad account number information. We do use sql server 2005 and that might be a good idea.
 
Your report should test for bad information and exclude it, either from the run or the test.

Add a few tests like IsNull and Length({your.field}) > 0 before trying to manipulate data that may not be there. Since nulls just stop processing, I suspect that you have blank fields.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 10 & 11.5 with Windows XP [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top