SQL Marco fixing the position of the header row & 1st left column

Wei March 5, 2013

Dear all,

I am using SQL marco inside wiki's page, however, is it possible to fix the 1st row (header) and the 1st left column?

The SQL query like here:

SELECT ASSET_NUMBER AS 'Server',
LOCATION_NAME AS 'Location',
MAX(IF(LABEL='x64 / x86',STRING_VALUE,NULL)) AS 'x64 / x86',
MAX(IF(LABEL='DNS',STRING_VALUE,NULL)) AS 'DNS',
MAX(NETWORK_ADDRESS) AS 'IP Address',
MAX(IF(LABEL='Internal IP',STRING_VALUE,NULL)) AS 'Internal IP',
MAX(IF(LABEL='(RDP) IP Address',ST
 
 

9 answers

0 votes
Wei March 7, 2013

Thank you Bob.

0 votes
Bob Swift OSS (Bob Swift Atlassian Apps)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 7, 2013

The only options you have are css on the table :(.

0 votes
Wei March 7, 2013

@Bob Swift, it is not the whole table we wanted to modify. We just want to add a <div> on the header row. So I can apply CSS on this <thea> div

i.e.

&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;header&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;/table&gt;

0 votes
Bob Swift OSS (Bob Swift Atlassian Apps)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 6, 2013

You have Common table capabilities which allows you to set the class of the table, perhaps that will work. You can also use the div macro.

0 votes
Wei March 6, 2013

@Bob Swift, I have found out a way to fix the header row while scrolling via CSS. However, I need to put an extra <div> in place to achieve this, however I am restricted by the control I have on the HTML output by SQL query marco. Is it possible to have more control on the SQL macro's HTML output?

0 votes
Bob Swift OSS (Bob Swift Atlassian Apps)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 6, 2013

Ah, having the header row fixed while scrolling. I do not know how to do that with the current implementation.

0 votes
Wei March 6, 2013

@Bob Swift, thank you for getting back to me on this. I have found a way to embed CSS on the page, however due to the fact this table was done by the SQL query, I can't style the header row the way I wanted. Ideally I wanted to fix the header row where it just stays regardless eihter you scoll up or down the page. Currently if you scroll down the page, the header row disppears. Hopefully this makes more sense.

0 votes
Bob Swift OSS (Bob Swift Atlassian Apps)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 6, 2013

Not sure what you mean by fixing. For a specific page, use the css/style macro's front Content formatting plugin

0 votes
Wei March 5, 2013

I have found out I can edit global CSS, however is there a way to put a CSS for a specific page?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events