subscript out of range

Technical support

Moderators: Bob Cergol, Data Access, Cintac

subscript out of range

Postby robinsonky » Thu Mar 15, 2012 9:20 pm

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
Attachments
errorP5.png
errorP5.png (12.2 KiB) Viewed 99924 times
robinsonky
 
Posts: 50
Joined: Wed Oct 19, 2011 8:41 pm

Re: subscript out of range

Postby admin » Thu Mar 15, 2012 9:35 pm

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
User avatar
admin
Certified Dynamic AI Professional
 
Posts: 177
Joined: Thu Jan 01, 1970 1:00 am
Location: Copenhagen, Denmark

Re: subscript out of range

Postby robinsonky » Thu Mar 15, 2012 10:47 pm

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
robinsonky
 
Posts: 50
Joined: Wed Oct 19, 2011 8:41 pm

Re: subscript out of range

Postby Bob Cergol » Thu Mar 15, 2012 11:14 pm

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
User avatar
Bob Cergol
Certified Dynamic AI Professional
 
Posts: 359
Joined: Fri Dec 11, 2009 5:48 pm

Re: subscript out of range

Postby robinsonky » Thu Mar 15, 2012 11:25 pm

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.
robinsonky
 
Posts: 50
Joined: Wed Oct 19, 2011 8:41 pm

Re: subscript out of range

Postby Bob Cergol » Fri Mar 16, 2012 1:12 am

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
User avatar
Bob Cergol
Certified Dynamic AI Professional
 
Posts: 359
Joined: Fri Dec 11, 2009 5:48 pm

Re: subscript out of range

Postby Eddy Kleinjan » Fri Mar 16, 2012 10:22 am

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
User avatar
Eddy Kleinjan
Certified Dynamic AI Professional
 
Posts: 29
Joined: Thu Sep 13, 2007 12:10 pm
Location: Hengelo, Netherlands

Re: subscript out of range

Postby Bob Cergol » Fri Mar 16, 2012 3:30 pm

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
User avatar
Bob Cergol
Certified Dynamic AI Professional
 
Posts: 359
Joined: Fri Dec 11, 2009 5:48 pm

Re: subscript out of range

Postby robinsonky » Fri Mar 16, 2012 4:34 pm

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 )
robinsonky
 
Posts: 50
Joined: Wed Oct 19, 2011 8:41 pm

Re: subscript out of range

Postby Eddy Kleinjan » Mon Mar 19, 2012 10:22 am

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
User avatar
Eddy Kleinjan
Certified Dynamic AI Professional
 
Posts: 29
Joined: Thu Sep 13, 2007 12:10 pm
Location: Hengelo, Netherlands

Re: subscript out of range

Postby Bob Cergol » Mon Mar 19, 2012 1:51 pm

as fixed condition: <getdate() +7

as free condition: date_column_name <getdate() +7

Bob
User avatar
Bob Cergol
Certified Dynamic AI Professional
 
Posts: 359
Joined: Fri Dec 11, 2009 5:48 pm


Return to Technical Support

cron