Page 1 of 1

subscript out of range

PostPosted: Thu Mar 15, 2012 9:20 pm
by robinsonky
Now I have my data organised for my weekly table. about two years of weekly info.

Trying to find a nice graph and with a few of them I get 'subscript out of range', here's the actual error message

Re: subscript out of range

PostPosted: Thu Mar 15, 2012 9:35 pm
by admin
Can you post (or email or private message) a sample of your data? Might there be "strange" values in you F254 date field - sometimes there is a date like 1-1-1753 that is inserted instead of nulls. If so, Dynamic AI must be made aware of this by inserting a system parameter (Administration/System/System Parameters) add a line with
APPLICATION / ZERODATE / DATE / 1753-01-01
and Dynamic AI will treat this date as null

Best regards
Bo

Re: subscript out of range

PostPosted: Thu Mar 15, 2012 10:47 pm
by robinsonky
Would DM/PM a csv file (only 108 records), but your email address is obfuscated. :D

I checked the data access forum and saw your Skype name, but that isn't you either....

send me an email

daver at ksl dot ky

Re: subscript out of range

PostPosted: Thu Mar 15, 2012 11:14 pm
by Bob Cergol
Dave,

While you're pursuing this in more depth you might also try something else. I know I've encountered this error but I can't remember the circumstances. (If you've ever heard Neil Young's song Prarie Wind, you'll understand why! :-) )

I do want to remember it does have to do with null values. Since I know you're migrating data and not using DAW's driver to do it I can well imagine you might have null values.

Try creating a plus column and use it instead of the column you currently use for the date. The column would still be a date type but have a formula like this: isNull(Date_Column_Name,'1753-01-01'). This will return the actual date value or 01/01/1753 -- use whatever you like. I assume you have a filter or condition on this report -- if not you should make one to exclude dates this old.

Bob

Re: subscript out of range

PostPosted: Thu Mar 15, 2012 11:25 pm
by robinsonky
Bob, this is a new and different application from the one in our xmas conversations. That one is in production.


there are no nulls or odd dates. The SQL has already rendered all dates down to a year and a week number.
Code: Select all
select  datepart(year,F254) as 'yr', datepart(ww, F254) as 'wk',  sum(F64) as 'Qty', sum(F65) as 'Rev' from rpt_dpt where F1031='W' and F1034='3' group by F254


As the error message says, the SQL executed properly, it's the conversion to a graph that blows out, and just for some formats.

Is there a 'sample book' somewhere of the various chart formats built-in? I'd like to see this data with graphs like those used in Bo's Tech Support posting on chart variations, but maybe those are among the ones that won't render.

Re: subscript out of range

PostPosted: Fri Mar 16, 2012 1:12 am
by Bob Cergol
No, but I've often wished I could reference a catalog of what all the chart types look like, not to mention the style sheets. One day we'll get that done. it's a lot of work -- and a moving target -- with all the ehancements in the works.

-Bob

Re: subscript out of range

PostPosted: Fri Mar 16, 2012 10:22 am
by Eddy Kleinjan
If you have the demo workspace installed (optional during installation of Dynamic AI; will install into separate workspace) then you can go to Gallery > Graph styles animated > ... to see a collection of graph styles.

We also have the demo available online. See http://dynamicdemo.dataaccess.eu and log in with the default credentials for the the server edition.

Eddy

Re: subscript out of range

PostPosted: Fri Mar 16, 2012 3:30 pm
by Bob Cergol
Thanks for reminding me Eddy!
I've looked at that before but forgot all about it!
I've always checked the box to install the demo site during the Dynamic AI installation routine -- and have advised others to do so. I did discover when installing subsequent updates -- if you fail to check the box -- the installer will then delete the demo site, or at least the data for it.
Bob

Re: subscript out of range

PostPosted: Fri Mar 16, 2012 4:34 pm
by robinsonky
looks like I finally asked the right question :mrgreen:

The LINES example from the demo site was exactly what I was looking for. However (follow up) can I hide future zero values in the graph (otherwise there's an alarming plunge to zero for next week's sales :D )

Re: subscript out of range

PostPosted: Mon Mar 19, 2012 10:22 am
by Eddy Kleinjan
You could try to put an extra condition in your report so that it only shows the data up until last week. I don't know the structure of you data, but you probably have some time element (date, week) in your data. You can try to filter on that. You can do that for example, on the conditions tab by entering a free SQL statement.

Eddy Kleinjan

Re: subscript out of range

PostPosted: Mon Mar 19, 2012 1:51 pm
by Bob Cergol
as fixed condition: <getdate() +7

as free condition: date_column_name <getdate() +7

Bob