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!

Crystal Report getting Error-Subscript must be between 1 and the size of the array

Status
Not open for further replies.
Jun 16, 2014
1
US
The code that is getting the error is in a Subreport that pulls data out of XMLField

Formula - mid(trim((split({MIFLDS.pList},",")[{?Pm-@Pline}])),2,({@Length}-3))
?Pm-Pline Chooses a field below that matches to a field in the Item table.
It runs the report OK until it hits a problem - try to attach screen shot of this error



MIFLDS.pList - "N/A", "AFF", "ALPHARMA", "AMD", "AMERICAN", "AMERICAN-CHEMICALS", "ANDLER", "AVAIL", "AWANTI", "AWCA", "AWCLN", "AWDGA", "AWFM", "AWHC", "AWHG", "AWHY", "AWSV", "AWTCC", "AWXTRA", "BCGBD", "BEACON", "BERJE", "BOTTLE", "BRADY", "C.L.SMITH", "CANSEW", "CAROLINA", "CBL", "CDN-SPRING", "CHEMICALS", "CHESAPEAKE", "CHESTER", "CIBA", "CLASSIC", "COMMERCIAL", "CON-BDG", "CONCO", "COYLE", "CRODA", "CURWOOD", "DANISCO", "DAY-PKG", "DERMA-FIXATION", "DERMA-US", "DEXTER", "DOMINO", "DPALBA", "DPBDF", "DPCOR", "DPDD", "DPINTE", "DPKOSM", "DPMEDF", "DPMICR", "DPNATI", "DPOMC", "DPPHAR", "DPPURP", "DPSBW", "DUDLEY", "E.J.BAGS&BOXES", "EGP", "ELAST-BDG", "EXPRESS", "EYE-PAD", "FIRST-WATER", "FOURPRINT", "GLENROY", "GOODHEALTH", "HANDLING", "HARDWOOD", "HM-CAST", "HORNWOOD", "HPI", "IMPACT", "INOVAR", "INTERNATIONAL", "JET", "JONES", "KCI", "KENPACK", "KIMBERLY", "KLOCKNER", "KWALITY", "L.V.LOOMAS", "LABEL", "LAZERTHERM", "PLLIM", "MARTIN", "MED.MART", "MEDTRADE", "MITSUBISHI", "MOORE", "MPAC", "MV", "MW-INDUST", "NANTONG", "NETWORK", "NINGBO", "NISE", "OLIVER", "PAC", "PAK-SOURCE", "PENTA", "PERFECSEAL", "PIKES", "PK-CHEM", "PL3M", "PLBLUE", "PLBSN", "PLCARD", "PLCBLZ", "PLCOM", "PLCOVI", "PLEATS", "PLMCK", "PLMCMA", "PLMEDL", "PLRGH", "PLSN", "POSTWRIGHT", "PRESSMAN", "PRIMAPAD", "PRINT-PACKAGING", "PRINT-PKG", "PROTAMEEN", "PULSE", "RAM", "RAUSCHER", "RM-BURNS/SPEC", "RM-LAPS", "ROOSIN", "SCDGB", "SCHS", "SCSB", "SFFD", "SFWC", "SMURFIT", "SOHN", "SPECIALITY", "SPECTRUM", "STEVENS", "SUNSHINE", "TOPI-DERM", "TUBES", "TWCBD", "TWCBS", "TWEND", "TWFAD", "TWICD", "TWLAP", "TWMSC", "TWNAI", "TWORS", "TWPKG", "TWSAL", "TWSPN", "TWTP", "TWWDG", "UFPT", "UNIPEX", "UNIVAR", "US-SURG", "VETCON", "VIDEOJET", "VULCAN", "WEBER", "WEB-TEX", "DPWHT", "WINPAK", "WOUNDSTRIP", "Z-ART", "PLHPT"
 
The first question, what does @Length return If it ever returns a value less than three, the mid function will return an error. Null field values are the normal culprit.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top