Created a sales order custom report based on existing “Sales Order by Location” report in which it shows up to four levels of location. You can download the customized sales order report from here
http://downloads.d-tools.com/si5/rep..._(4_level).zip
FYI
- Standard Reports use XML as Data source.
- Orders & Scheduling Reports use Dataset as Data source.
Custom Report Updates –
- Included a new procedure in script called
SetDataSource.
- This procedure will add two new columns “
LocationOrder4” and “
LocationPath4” to the dataset. It will loop through all data rows in the dataset and populate this columns based on following condition(s) :-
o If the Location is less than 4 levels then location order and location path are assigned as it is.
o If location is more than 4 levels then up to 4th level will be assigned to these columns.
- This procedure will be invoked from the
ActiveReport_ReportStart event procedure.
- Also updated the report designer to support this use case.
Note: - You can define your location levels as per your need.
For example –
If you want to show location up to 2 location level then change the following lines
From :
|
Code:
|
If (splitLocation.GetUpperBound(0) > 3) Then
row("LocationOrder4") = String.Format("{0}:{1}:{2}:{3}",splitLocation(0),splitLocation(1),splitLocation(2),splitLocation(3)) splitLocation = locationPath.split(":")
row("LocationPath4") = String.Format("{0}:{1}:{2}:{3}",splitLocation(0),splitLocation(1),splitLocation(2),splitLocation(3))
End If |
To:
|
Code:
|
If (splitLocation.GetUpperBound(0) > 1) Then
row("LocationOrder4") = String.Format("{0}:{1}",splitLocation(0),splitLocation(1)) splitLocation = locationPath.split(":")
row("LocationPath4") = String.Format("{0}:{1}",splitLocation(0),splitLocation(1))
End If |
Hope it helps.