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

Array was not long enough. Check destIndex and length, and the array's 1

Status
Not open for further replies.

clanm

Programmer
Dec 26, 2005
237
US

"Array was not long enough. Check destIndex and length, and the array's lower bounds."

Is this because the cell within Excel contains too many characters? There are two detail bands which could contain several pages worth of text.

I can export fine in HTML or PDF.

Thanks!
 
Not sure what question you're trying to ask here. Could you rephrase it and let us know what you're actually trying to accomplish and what you've got to work with?



Catadmin - MCDBA, MCSA
"The only stupid question is the one that *wasn't* asked.
 
Catadmin,

Thanks for checking on this.

When I run the report, the user can view the report. If they try to export the report to an .xls format, then they get the error of:
"Array was not long enough. Check destIndex and length, and the array's lower bounds."

My guess is it's happening on two fields reported that are ntext which could hold a lot of data. The user is allowed to copy / paste from a word document via the web application, so this data could be very large......10+ pages.

This error doesn't happen with .pdf for .html formats.

We do have SP2 on the server as well.

Thanks!
 
I would say that it is definitely a limitation of Excel. First of all, I bet the report is trying to export all the info to Sheet1 instead of spreading it evenly amongst the available sheets. Second of all, Excel only allows like 65,000 rows of data. Lastly, I don't think your NText values can fit in an Excel Column.

Try pulling out the NText values off your report and (in test mode still) exporting to Excel then. Does it work? If so, then you know for a fact that is your problem.

If you're still getting the data array problem, then it's probably the sheer size of your report and you'll have to create a copy of parametizable reports that cuts down your record set for exporting to Excel.



Catadmin - MCDBA, MCSA
"The only stupid question is the one that *wasn't* asked.
 
Catadmin,

I did a select with:
WHERE ([MyNumber] LIKE '01.06.01%') AND (DATALENGTH([Work Scope]) > 50000)

This did return one row, and if I paste it in Excel from SQL Server Enterprise Manager, it won't expand the [Work Scope] column.

I'm wondering if like you said, it's too big to export to an .xls format.
 
If the WorkScope column is indeed your NText value, then I would say that is exactly what your problem is.



Catadmin - MCDBA, MCSA
"The only stupid question is the one that *wasn't* asked.
 
Catadmin,

Thanks..yes that's the field that giving me the issue.

I appreciate the follow up!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top