Jump to content

Combine Columns in Report

Dan Munns

Recommended Posts


Is there a way we can combine columns in reports? 

I have an asset report with contains the serial number of each asset, however the table and column is obviously different from each type (computers, peripherals etc) 

I was hoping that by using the same alias the report would combine the columns but this is not the case. 

The report is being used to upload assets to a third party for ordering equipment disposal and the format is fixed. 

I want to have this as automated as possible to outputting the report and then having to manually combine the columns is a pain and can be time consuming. 



I also notice in the preview the data is incorrect, but is showing as expected in the actual report. 

Link to comment
Share on other sites

I assume you will only have one serial number across all related tables (computer, computer peripheral, etc.). Because that asset is of one type only - i.e. Asset X can only be a "computer", not a "computer" and some other type... so you could theoretically use CONCAT function here. But since you don't have this function in reporting UI, you can't do it in a report :( 

Using DB direct though, you could use something like this (following the example in your screenshot):

SELECT <list of various fields here>, CONCAT(h_cmdb_assets_computer.serial_number, h_cmdb_assets_computer_peripheral.serial_number) AS asset_serial_number
  FROM ... etc.



Link to comment
Share on other sites

@Dan Munns

Not the ideal solution, but is there a shared attribute that you don't use that could be re purposed (and relabeled) to contain the Serial Number across Asset Classes? That way, the attribute would be stored in h_cmdb_assets. Even if this was a duplicate of the actual Serial Number and hidden when looking at the Asset in Hornbill, it would still appear in the report extract. 

Kind Regards


Link to comment
Share on other sites

@Bob Dickinson I think the only field under the General Properties section we don't use (at the moment) is company.

Do I just change this label in translation for this single column and then copy the serial numbers to h_company_name

The issue is it has to be somewhere obvious and unhidden as they service desk will use it when manually creating assets for disposal (printers, hard drives, monitors etc) 

Edit: Ok, I just realised I cant use company so it is looking like this won't be an option for us. 

Link to comment
Share on other sites

@Dan Munns

I don't think Company will work as its actually an attribute that is looking up and linked to existing companies that have been set in your organisational structure. 

Ah I see the issue about it being obvious - I thought these assets may be coming in from CSV or a Database Source. I was thinking that a typically less popular attribute from one of other generic drop downs may be used (e.g. "Maintenance Reference" which falls under "Financial Information" ) - though as you say, then the Serial Number falls under the Financial Information heading which may not make too much sense. 

But in theory, yes - you would just change the translation label in this scenario. 

Link to comment
Share on other sites

@Dan Munns right... well, we did discuss your request for such a section (afaik it was posted in non product discussions) and the outcome was to use "tags" for such requests (no section). So, until we have a formal "tags" system in place, may I ask when such request is raised to tag it as such? I think you already do...

Apologies, I should have updated your post where you requested the enhancement section....

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...