INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

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

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

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

(OP)
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"

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

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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close