Hello! I just found you guys and am hoping you can help me out. Our company purchased Navision 6 months and are still making all kinds of changes. I kind of got volunteered to be the "expert" as far as making forms and such. My background is in web design and development (SQL Server & ColdFusion along with JavaScript and Flash's ActionScript), so C/SIDE is a little foreign to me, but I'm warming up to it.
I'm familiar with programming concepts and techniques, I'm just not fluent in the syntax yet.
We have a report right now (it may be a default one included with the product) called "Sales History" and it's report # 10157. For some reason it only shows 8 "units" worth of data (in our case units = months) and we'd like to show the past year.
I can't for the life of me find where in the code that everything is limited to 8. I can find the loop that goes through each month and gets sales totals, quantities, etc., but not anything that actually says "never go past 8."
I tried cheating and just adding columns for 9-12 and making the appropriate changes to the arrays that are being used, but I get an error saying "the indexing 10 in the array is outside of the permitted range."
Any help would be greatly appreciated!
Thanks,
Rob
Comments
From the error message it seems you need to check the size of the array...increase it to accomodate your req.
I can't figure out how C/AL handles Arrays ... there's nothing in the help about actually creating an array, just a couple functions for working with them. I see tons of ARRAYLEN() checking going on in the code, but I never see anything being assigned to an array or a length being assigned! There are only 2 main chunks of code in the Report:
In the "Item" DataItem:
And then in a blank entry in the DataItem:
It looks like everything depends on the value of QuantitySold, however nothing is ever assigned to it! It gets CLEAR()'d and then immediately used again without anything happening in between. I have no idea what's going on.
- Anyway I have 8 columns too - it looks like it was basically set up that way because that is all the columns that will fit on the page.
If you select the options tab you can change the length of period to 2M
this will cover a whole year
http://www.BiloBeauty.com
http://www.autismspeaks.org
To Create or Amend an array you need to find the Global/Local Variable
click on it's properties and set the Dimensions property to the number you want in the array.
I believe the report should suffice your req. with the period option as suggested by savatage... customization warrants a closer look...u have to change the sections also to accomodate the extra col. u want...
for ur array probs. u may increase the size by going to global/local variables and increasing the dimension at its properties..
The customization is no problem, I've already got it in Landscape and have more than enough room for the extra columns. But they still want the report broken down per month, not per 2 months.
There aren't any arrays in the Global/Locals variable list, that's what's got me stumped! I have no idea where this array is coming from. Unless one of these is an array and I just don't know it?
If you go into the Global Variable list and click on each line, whilst on that line click on the Properties icon on the toolbar or key in Shift+F4, you will then see a list of three properties, the second one Dimensions is the number of dimensions in the array.
The arrays mentioned in the code you posted are
PriorYRMin
PriorYRMax
QuantitySold
$Sold
Profit%
QuantitySoldPRYR
DateRange
I can not do a screen dump as you have because the report you are using is a US localised object.
I hope this helps point you in the right direction
Thanks for the help everyone!