cancel
Showing results for 
Search instead for 
Did you mean: 

a subscript must be 1 and the size of the array

samratmuddasani
Advisor
Advisor
0 Kudos

Hi Experts,

When I'm trying to run the report I'm getting the error, "a subscript must be 1 and the size of the array". Below is the formula.


Split({@newproj},",")[1]

Can anyone help me in identifying what went wrong???

Thanks in Advance,

Samrat Muddasani

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Samrat,

Looks like the formula : {@newproj}, is blank.

Try this:

If {@newproj} = "" then

""

else

Split({@newproj},",")[1]


-Abhilash

samratmuddasani
Advisor
Advisor
0 Kudos

Abhilash thanks for your quick response. It worked but when i run the report I'm getting blank report. I took an SQL and ran it and I can see the data is not pulling up in the where clause and the clause is

AND ("FE_HOUR"."ACTY_DT">=TO_DATE ('01-08-2014 00:00:00', 'DD-MM-YYYY HH24:MI:SS')

AND "FE_HOUR"."ACTY_DT"<TO_DATE ('01-09-2014 00:00:00', 'DD-MM-YYYY HH24:MI:SS'))

Need your suggestions...

Thanks,

Samrat Muddasani

abhilash_kumar
Active Contributor
0 Kudos

Hi Samrat,

Glad it works. For the where clause issue, please a separate Discussion per SCN's rules.

-Abhilash

samratmuddasani
Advisor
Advisor
0 Kudos

Oh is it...!! Thank you so much for your help. yes it worked...

Samrat Muddasani

samratmuddasani
Advisor
Advisor
0 Kudos

The Blank report issue is fixed as it has not data for those dates.

Thank you once again Abhilash.

0 Kudos

Good Morning Abhilash!

I'm having the same problem only I'm using the formula below...

Dim FMnames() As String

FMnames = split({ACCOUNT.ACCOUNT_NAME},",")

Dim First() As String

First = split(FMnames(2)," ")

formula=First(1)

I can't correct the data and I'm not sure how I would enter the IF logic in what I'm guessing is .NET. 

Do you have any suggestions?

abhilash_kumar
Active Contributor
0 Kudos

I'm not very familiar with the VB syntax, unfortunately.

Could you post your issue as a new discussion please (with a little more description of what you're trying to do)?

-Abhilash

0 Kudos

Thanks for the quick response but I solved the issue - Nulls in the name data column were causing the error.  Please disregard my last post.  I created an additional formula to suppress Nulls which resolved the issue.

Answers (0)