Crystal Error This Array Must Be Subscripted
Contents |
this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the
This Array Must Be Subscripted Crystal Reports
register link above to proceed. To start viewing messages, select the forum crystal reports a subscript must be between 1 and the size of the array that you want to visit from the selection below. Results 1 to 5 of 5 Thread: ***RESOLVED***This array must
Crystal Reports Array Must Be Subscripted Parameter
be subscripted. Tweet Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Jul 23rd, 2007,04:12 PM #1 Jefftopia View Profile how to subscript an array in crystal reports View Forum Posts Thread Starter Addicted Member Join Date Jun 2002 Location Sunny Scottsdale Arizona Posts 254 ***RESOLVED***This array must be subscripted. I am passing multiple parameters (ID's) using an array to a Crystal Report. I am receiving the following message when running my code: "Crystal Report Viewer" "This array must be subscripted. For example: Array [i]." Here is my code: Code: Private Sub SettleSched_Par() Dim strInput As String Dim strValues() As String Dim i As Integer '--------Encapslulated code opens cr report-------- Dim Report As New rptFundBuySched Dim crPDefs As CRAXDRT.ParameterFieldDefinitions Dim crPDef As CRAXDRT.ParameterFieldDefinition Set crPDefs = Report.ParameterFields For Each crPDef In crPDefs With crPDef Select Case .ParameterFieldName Case "TradeIDParm" 'Get the ID's. strInput = InputBox("Enter trade ID's seperated by commas.", "Enter Trade ID's") 'Split them into an array. strValues = Split(strInput, ",") 'Add parameter(s). For i = 0 To UBound(strValues) .AddCurrentValue CDbl(strValues(i)) Next i End Select End With Next Report.EnableParameterPrompting = False frmRptView.CRViewer1.ReportSource = Report frmRptView.Show frmRptView.CRViewer1.ViewReport '------------------------------------------------- End Sub I have the parameter in the report set to 'Allow Multiple Values'. Help appreciated. Thx Last edited by Jefftopia; Jul 30th, 2007 at 03:52 PM. Reply With Quote Jul 23rd, 2007,05:05 PM #2 brucevde View Profile View Forum Posts PowerPoster Join Date Oct 2002 Location British Columbia Posts 9,758 Re: This array must be subscripted. Check the report formulas. TradeIdParm is now an array so any existing references you had in formulas need to be modified as well. For example, the Record Selection
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Crystal Reports: This array must be subscripted up vote 0 down vote favorite Code: NumberVar i; StringVar Array aUsers; http://www.vbforums.com/showthread.php?480354-***RESOLVED***This-array-must-be-subscripted for i:= 1 to Ubound({?SYS_USER}) do ( Redim Preserve aUsers[i]; aUsers[i] := totext({?SYS_USER},0)[i]; ); Join (aUsers,", "); Using Crystal Reports v11, I am trying to display the paramters on the Report header, but I am getting an error: "This array must be subscripted" My parameter, SYS_USER is dynamic and pulls through numeric and dynamic values, these values must be converted into a string to display the data I'm filtering for. What is http://stackoverflow.com/questions/35126339/crystal-reports-this-array-must-be-subscripted missing from my function causing the error? crystal-reports share|improve this question edited Feb 1 at 8:58 PRVS 707835 asked Feb 1 at 8:54 Charl van der byl 266 add a comment| 1 Answer 1 active oldest votes up vote 0 down vote accepted change like this: NumberVar i; StringVar Array aUsers; for i:= 1 to Ubound({?SYS_USER}) do ( Redim Preserve aUsers[i]; aUsers[i] := totext({?SYS_USER}[i],0); ); Join (aUsers,", "); share|improve this answer answered Feb 1 at 12:16 Siva 5,99952140 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking for? Browse other questions tagged crystal-reports or ask your own question. asked 8 months ago viewed 198 times active 8 months ago Related 0Display array values in Crystal Report0Inserting Missing Dates into Crystal Report0error at runtime setting the size of an array in crystal reports0'The string is non-numeric' error in a crystal reports Formula1Crystal Reports error: A subscript must be between 1 and size of array2Crystal Reports filtering using optional parameters0Crystal report “a number is required here”
Join INTELLIGENT WORK FORUMSFOR COMPUTER PROFESSIONALS Log In Come Join Us! Are you aComputer / IT professional?Join Tek-Tips Forums! Talk With Other Members Be Notified Of ResponsesTo Your Posts Keyword Search http://www.tek-tips.com/viewthread.cfm?qid=1597455 One-Click Access To YourFavorite Forums Automated SignaturesOn Your Posts Best Of All, It's Free! Join Us! *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.Tek-Tips Posting Policies Jobs Jobs from Indeed What: Where: jobs by Link To This Forum! Add Stickiness To Your Site By Linking To must be This Professionally Managed Technical Forum.Just copy and paste the BBCode HTML Markdown MediaWiki reStructuredText code below into your site. Business Objects: Crystal Reports 1 Formulas Forum at Tek-Tips HomeForumsProgrammersReporting SolutionsBusiness Objects: Crystal Reports 1 Formulas Forum This array must be subscripted thread767-1597455 Forum Search FAQs Links MVPs This array must be subscripted This array must be subscripted crumpm (TechnicalUser) (OP) 29 Mar 10 06:27 array must be I have a report with 2 parameters, and I want to enter multiple values for both, and use both to search in string fields.e.g.{?Name} = "Brown","Green","White"{?Postcode} = "SO9","SO6","SO4"{?Name} in {Client.Name} and{?Postcode} in {Client.Postcode}but i can't find any fomula that will allow multiple parameter values for this search.Any help greatly appreciated RE: This array must be subscripted Madawc (Programmer) 29 Mar 10 07:01 I don't think there is one.Try three name parameters and three postcode parameters.It's possible that if you entered the three values in a single parameter, this would work.Never tried it.It helps to give your Crystal version - 8, 8.5, 9, 10, 11 or whatever.Methods sometimes change between versions, and higher versions have extra options.In this case, it probably makes no difference. Madawc Williams (East Anglia, UK).Using Crystal 10 & 11.5 with Windows XP RE: This array must be subscripted crumpm (TechnicalUser) (OP) 29 Mar 10 07:05 I'm using Crystal 2008 on a windows XP machine, attached to an SQL database.Thanks RE: This array must be subscripted lbass (TechnicalUser) 29 Mar 10 07:36 If you just want to search for each of those names in each of those postcodes, then you sho