Reply
 
LinkBack Thread Tools Display Modes
Old 02-11-2008, 02:56 AM   #1 (permalink)
Senior Member
 
Join Date: Jul 2006
Posts: 182
Memphix is on a distinguished road
Default Location in reports

I would really like to only display the Room name instead of the full Location. I have read else where that you can delete the property and floor but I actually appreciate that structure when creating the project and in some reports it is clearer to display the full structure.

However, for the Wire Checklist report, under the From Location I'd really like to just have the room name not the full location.

Also, it sometimes displays the ComponentID at the end of the Location which confuses the installers. I'm not sure why its inconsistent but we don't use D-Tools for connectivity at this stage, we just want the room name (I'm not sure how hard they are trying but hey we shouldn't have it there). See attachment.
Attached Images:
File Type: jpg wirechecklist.jpg (15.5 KB, 23 views)

Last edited by Memphix; 02-11-2008 at 03:03 AM.
Memphix is offline   Reply With Quote
Old 02-11-2008, 07:34 PM   #2 (permalink)
RickC
Guest
 
Posts: n/a
Default

Originally Posted by Memphix View Post
I would really like to only display the Room name instead of the full Location. I have read else where that you can delete the property and floor but I actually appreciate that structure when creating the project and in some reports it is clearer to display the full structure.

However, for the Wire Checklist report, under the From Location I'd really like to just have the room name not the full location.

Also, it sometimes displays the ComponentID at the end of the Location which confuses the installers. I'm not sure why its inconsistent but we don't use D-Tools for connectivity at this stage, we just want the room name (I'm not sure how hard they are trying but hey we shouldn't have it there). See attachment.
To accomplish this, follow these steps:
  1. Create a custom report based on the Wire Checklist report.
  2. In the designer, select the txtFromLocation texbox control in the Detail section and set it's DataField property to dtr:Location. Binding to this field should yield the results you are looking for.
    In the XML data there are a number of location related fields. The dtr:LocationPath field is the full appended location path as a string. The dtr:Location field is the name of the location to which the item is assigned.
  3. Select the Script Tab at the bottom of the designer.
  4. Delete the following line of script:
    Code:
    ReportUtilities.SetWireItemLocationFromCompID(rpt,"Detail1","txtFromLocation")

    This line of script is how the value is set in the default report. It sets the value of the textbox control equal the concatenation of the location path of the item and the component ID of the "from/source" component. This is why you only see a component ID sometimes. If the wire is not connected to a source component, it's not there. It's not a bug. It replicates how the SI4 version of the report showed the data.
  5. Select the Designer Tab at the bottom of the screen.
  6. Save and publish the report.

-R
  Reply With Quote
Old 02-25-2008, 11:50 PM   #3 (permalink)
Senior Member
 
Join Date: Jul 2006
Posts: 182
Memphix is on a distinguished road
Default

Wow, thank you! Pure gold.
Memphix is offline   Reply With Quote
Old 02-26-2008, 04:16 AM   #4 (permalink)
Certified Partner
 
Kevin Mikelonis's Avatar
 
Join Date: Mar 2006
Posts: 364
Kevin Mikelonis has a spectacular aura aboutKevin Mikelonis has a spectacular aura aboutKevin Mikelonis has a spectacular aura about
Default

Awesome! Got lots of reports to apply this to!
__________________
Kevin Mikelonis
Process Dealer Services Group
D-Tools Certified Partner
PO Box 3443
Paso Robles, Ca
805.275.2308
www.processdsg.com
info@processdsg.com

Stuff That Works
Kevin Mikelonis is offline   Reply With Quote
Old 08-20-2009, 10:42 PM   #5 (permalink)
Junior Member
 
Join Date: Jul 2008
Posts: 3
cws3020 is on a distinguished road
Default dtr:Floor?????

I'm trying to make an excel report that I can import into a database my problem is that I do not see a location property in reports Designer for Floor. I can setup Zone (Dtr:Zone) and Room (DTR:Location) but not Floor. Help Please, Thanks
cws3020 is offline   Reply With Quote
Old 08-21-2009, 11:13 AM   #6 (permalink)
Senior Member
 
Join Date: May 2009
Location: Chennai, India
Posts: 157
nkarthick is on a distinguished road
Default No property for Floor

There is no property for Floor (location type).

If you use Excel reports – then you can map the dtr:LocationPath (ns1:LocationPath) to find the floor information. After running the excel report you can extract the floor value by using excel formulas or VBA code.

Or

If you customize the Proposal report then do the following steps to get the floor value of an item

Script Changes -
- In the ActiveReport_DataInitialize event include below line

Code:
rpt.Fields.Add("Floor")
- In the Fetch Data routine (ActiveReport_FetchData)

Change the below line from:

Code:
If itm IsNot Nothing Then
         rpt.CalculatedFields("SummarizeInt").Value = Ctype(itm.Summarize, Integer)
End if

To:

Code:
 rpt.Fields("Floor").Value  = String.Empty	
   If itm IsNot Nothing Then	
      rpt.CalculatedFields("SummarizeInt").Value = Ctype(itm.Summarize, Integer)	
      Dim splitLocation As String()
		
      splitLocation = itm.LocationPath.split(":")
			
      If(splitLocation.GetUpperBound(0) > 0) Then
           rpt.Fields("Floor").Value = splitLocation (1)	
      End If

  End If


Designer Changes –

In the grpItemHeader section include a new textbox and place it in the appropriate location. Set the Data field property value of the new textbox to “Floor”.

Publish the report.


Hope it helps.
__________________
Narayana Karthik

Last edited by nkarthick; 08-21-2009 at 11:16 AM.
nkarthick is offline   Reply With Quote
Old 08-21-2009, 06:11 PM   #7 (permalink)
Certified Partner
 
Ryan Brown's Avatar
 
Join Date: Mar 2006
Location: San Diego, CA
Posts: 182
Ryan Brown has much to be proud ofRyan Brown has much to be proud ofRyan Brown has much to be proud ofRyan Brown has much to be proud ofRyan Brown has much to be proud ofRyan Brown has much to be proud ofRyan Brown has much to be proud ofRyan Brown has much to be proud ofRyan Brown has much to be proud of
Default Very Cool

This is very cool. Definitely have a few uses for this!

If I wanted to grab Location 2 - would this be the change:

If(splitLocation.GetUpperBound(0) > 0) Then
rpt.Fields("Floor").Value = splitLocation (2)
End If

(Assuming I left the variable called 'Floor')
__________________
Ryan Brown
Media Environment Design
Founding D-Tools Certified Partner
(760) 434-9040
ryanbrown@medesign.tv
Linked In
D-Tools Custom Reports
Free D-Tools QuickTips Videos
Ryan Brown is offline   Reply With Quote
Old 08-22-2009, 09:42 AM   #8 (permalink)
Senior Member
 
Join Date: May 2009
Location: Chennai, India
Posts: 157
nkarthick is on a distinguished road
Default

Yes you are correct, but need some minor change.

Change this line from:

If(splitLocation.GetUpperBound(0) > 0) Then


To:

If(splitLocation.GetUpperBound(0) > 1) Then


Hope it helps.
__________________
Narayana Karthik
nkarthick is offline   Reply With Quote
Old 08-25-2009, 09:16 PM   #9 (permalink)
CrystalHacker
Guest
 
Posts: n/a
Default

Very Cool!

While we are on the subject, I would like to make sure that my sales reports only show the first four levels on Location:
Campus:Building:Floor:Room

We changed the 5th location to "Install Location". This is used by engineering to define where gear goes in a room. This is used for wire pull applications once the schematics are complete. We built a query in Si4 that would auto-generate the wire pull lists, based on the Instal Location of the gear. Headend is not reliable since it was not data driven. But I digress.

I want to make sure that "Install Location" (Closet) never shows up on a sales report. What would be the easiest way to do this?

-ch
  Reply With Quote
Old 09-02-2009, 06:16 AM   #10 (permalink)
Senior Member
 
Join Date: May 2009
Location: Chennai, India
Posts: 157
nkarthick is on a distinguished road
Default Try this custom report

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.
__________________
Narayana Karthik
nkarthick is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Location Path Order CrystalHacker Reports and Reporting Center 26 12-12-2009 06:00 AM
Modifying reports in Crystal and what to buy Bob Pothier D-Tools Pre-sales Questions 2 04-07-2008 06:33 PM
Customizing your own Word Reports Bob Pothier SI4 Quick Tips and Customizations 8 12-05-2007 03:37 AM
Greater Understanding of Reports gnichols Reports and Reporting Center 0 10-31-2007 04:47 PM
Location Property of D-ToolsSOItem ManjitS SDK 0 11-16-2006 09:46 PM


All times are GMT. The time now is 02:35 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.0
D-Tools, Inc.