cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 11

Change Row Colors in Reports

Jump to solution

Is there a way to change the background color of rows on reports currently? Or can someone point me in the right direction of the files needed to change to be able to accomplish this?

1 Solution
Level 12

I have been able to do this.  Here is how I did it. I built a web based report using the custom table by adding the Widget on a page and Selecting the Reporting Category and Custom Table.  Then selected the customize the report in the widget.

I then selected the DataSource to be the Advanced Database Query (SWQL, SQL).  I then did SQL.

When configuring the Table Layout, I selected one of the columns and click on the +Advanced link.

Then select the checkbox for Allow HTML Tags.

I created a custom SQL function to convert the EventTypes.backcolor to an HTML HEX color and utilize javascript to change the styling of the TR row.

I will attach the functions I used.

Here is an example query used:

SELECT TOP 100 EventID, EventTime, dbo.ntta_BackgroundColor(EventID,EventTypes.BackColor) + Message as Message

FROM Events, EventTypes WHERE Events.EventType = EventTypes.EventType;

I use the eventID as the unique identifier for the ID of the div in order to set the background color to the correct row.

With this Allow HTML Tags functionality we are able to do some amazing things. An you can too without having to edit aspx pages.

Having the functionality built into the system would have been great, but this works for now until the new functionality is don.

View solution in original post

35 Replies

Here is an example of the view I created.

ExampleNoc.jpg

0 Kudos

NVM i figured that part out , i have to select Generic Icon then just use /NetPerfMon/images/{0} in that field

0 Kudos
Level 12

I have been able to do this.  Here is how I did it. I built a web based report using the custom table by adding the Widget on a page and Selecting the Reporting Category and Custom Table.  Then selected the customize the report in the widget.

I then selected the DataSource to be the Advanced Database Query (SWQL, SQL).  I then did SQL.

When configuring the Table Layout, I selected one of the columns and click on the +Advanced link.

Then select the checkbox for Allow HTML Tags.

I created a custom SQL function to convert the EventTypes.backcolor to an HTML HEX color and utilize javascript to change the styling of the TR row.

I will attach the functions I used.

Here is an example query used:

SELECT TOP 100 EventID, EventTime, dbo.ntta_BackgroundColor(EventID,EventTypes.BackColor) + Message as Message

FROM Events, EventTypes WHERE Events.EventType = EventTypes.EventType;

I use the eventID as the unique identifier for the ID of the div in order to set the background color to the correct row.

With this Allow HTML Tags functionality we are able to do some amazing things. An you can too without having to edit aspx pages.

Having the functionality built into the system would have been great, but this works for now until the new functionality is don.

View solution in original post

c.gura

Is it possible to have some details on it?

0 Kudos

@msarkar

Sure, what kind of details are you wanting?

0 Kudos
Level 17

this would be a great feature request!

I feel the same way , i mean already i can pull the BackColor from the EventTypes table , if i knew what ASP or JS script that fomated the data from the reports i could add a check for BackColor= in the <field> line of the .report file and using the ${BackColor} for the actual style of the background color. However I am also yet to find what file is formatting this data.

0 Kudos

Got it. Thanks!

0 Kudos

IS there a current way to do this or at this time not possible rob?

0 Kudos

Not at the moment unfortunately.

0 Kudos

You may want to check out my response to this request.  It works for what we want.

0 Kudos

Is there any update on this for being able to use the BackColor for Reports for formating?

0 Kudos

AH Rob your killing me , upper management likes pretty colors and flashing lights

0 Kudos

All he needs:

green-circle-md.png

0 Kudos

ROFL yeahhhh then they will want a legend of what that means

0 Kudos