So simple, but i can't work it out

Exchange HTML report templates between users.
Post Reply
doodleman99
Posts: 38
Joined: Tue Sep 02, 2008 5:45 am

So simple, but i can't work it out

Post by doodleman99 »

I have created a view for each folder/server that shows a very simple list of Bad tests and their reply.
If i goto the properties of the view to create reports for this, the report type HTML is great, but i'd like to clean it up a little, so i use the HTML(Custom) and that uses buttons and i lose test names and each test is horizontal.
How can i add/edit my own HTML report types?


thanks,
JV
Last edited by doodleman99 on Wed Apr 20, 2016 6:40 am, edited 2 times in total.
KS-Soft
Posts: 12821
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Menu Profiles->Report profiles
www.ks-soft.net/hostmon.eng/mframe.htm# ... tm#Reports

Regards
Alex
doodleman99
Posts: 38
Joined: Tue Sep 02, 2008 5:45 am

Post by doodleman99 »

KS-Soft wrote:Menu Profiles->Report profiles
www.ks-soft.net/hostmon.eng/mframe.htm# ... tm#Reports

Regards
Alex
It's not the profiles that i need to edit though. because even if i create a new profile, i'm still restricted to use one of the predefined "Report Types".
This is the before and after of what im trying to achieve http://imgur.com/a/1h4bK

the code is editable for the CustomHTML but that has buttons and is a little too complicated for what i need

To clarify, if i generate the HTML report, i am able to edit that to look exactly how i like, where is the template stored with all the variable that the htm report is being generated from? and how can i add to those?
KS-Soft
Posts: 12821
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

When you are using Custom HTML report, you can modify code as you wish using the same Report Manager - there is big "Setup report template" button, click it and modify template.

Regards
Alex
doodleman99
Posts: 38
Joined: Tue Sep 02, 2008 5:45 am

Post by doodleman99 »

KS-Soft wrote:When you are using Custom HTML report, you can modify code as you wish using the same Report Manager - there is big "Setup report template" button, click it and modify template.

Regards
Alex
yeah i didn't think that would work but i gave it a go anyway.
i deleted all the code in the header section and replaced it with the following
http://imgur.com/e6nxWGI

Code: Select all

<html><head>
<meta name="GENERATOR" content="Advanced Host Monitor">
<title>%Folder% report</title>
<STYLE TYPE="text/css"><!-- a:hover { color: "#00FFFF"; } --> </STYLE>
</head>
<body bgcolor="#000000" text="#E9E9E9" link="#00FFFF" vlink="#00FFFF" alink="#00FFFF">
<p align="left"><u><strong><big><big>%Folder% Report</big></big></strong></u><br>

<div align="left"><left>
<table border="0" bordercolor="#000000" width="100%">
  <tr>
    <td bgcolor="#4D4D4D" nowrap align="left"><strong><font color=#C0C0C0>Test name</font></strong></td>
    <td bgcolor="#4D4D4D" nowrap align="center"><strong><font color=#C0C0C0>Reply</font></strong></td>


  </tr>
  <tr>
    <td bgcolor="#000000" nowrap valign="top" align="left"> <font color=#FF2B2B>%TestName%</font> </td>
    <td bgcolor="#000000" nowrap valign="top" align="center"> <font color=#FF2B2B>%Reply%</font> </td>
  </tr>
  <tr>
    <td bgcolor="#000000" nowrap valign="top" align="left"> <font color=#FF2B2B>%TestName%</font> </td>
    <td bgcolor="#000000" nowrap valign="top" align="center"> <font color=#FF2B2B>%Reply%</font> </td>
  </tr>
</table>
</center></div>
</body></html>
 
i'm guessing i have the syntax wrong. i cant find the test name variable in http://www.ks-soft.net/hostmon.eng/mfra ... tm#Reports

If there was a big "Setup report template" button for the regular HTML template i'd be dancing.
thanks
KS-Soft
Posts: 12821
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

You cannot use %TestName% in the header because it does not make any sense. Test related variables should be used in Test items section.
Please check the manual and look at the samples before "deleted all the code"
Header
Specify header of the report, this template will be used once for the report.

Folder title
Provide HTML code that will be used to display Folders. Here you may use Folder Specific macro variables (in addition to regular, user defined and date variables).
If you do not want to display folders in the report, leave "Folder title" field empty.

Test items
Provide HTML code for each test status. Here you may use test related macro variables (in addition to regular, user defined and date variables).

Folder summary
Provide HTML code that will be used to display summary information about each Folder. Here you may use Folder Specific macro variables (in addition to regular, user defined and date variables).
If you do not want to display any summary information, keep "Folder summary" field empty.

Gap between folders
Provide HTML code that will be inserted between last test item (from current folder) and next folder. In other words this code will be used before each folder item except 1st one.

Footer
Specify footer of the report, this template will be used once for the report.
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

These variables will be resolved in "Test items" section.
Just remove items-related HTML code from header and paste HTML code for one test items into "Test items section", then right mouse click on test items type (e.g. "with 'Good' status) and select "Use selected template for all statuses" to use same HTML code for all test statuses.
doodleman99
Posts: 38
Joined: Tue Sep 02, 2008 5:45 am

Post by doodleman99 »

KS-Soft Europe wrote:These variables will be resolved in "Test items" section.
Just remove items-related HTML code from header and paste HTML code for one test items into "Test items section", then right mouse click on test items type (e.g. "with 'Good' status) and select "Use selected template for all statuses" to use same HTML code for all test statuses.
ok so i have messed about for a while now and changed the test items section to
http://imgur.com/y7fWFOe

Code: Select all

<p> <font color=#FF2B2B>%TestName% %Reply%</font></p>
where/what do i need to do to get my headings back?
if i had the plain html template that the standard HTML is created from i could have done this in 5 mins lol

i tried putting the following into the folder title tab but it doesnt work

Code: Select all

<tr>
    <td bgcolor="#4D4D4D" nowrap align="left"><strong><font color=#C0C0C0>Test name</font></strong></td>
    <td bgcolor="#4D4D4D" nowrap align="center"><strong><font color=#C0C0C0>Reply</font></strong></td>
</tr>
i know i'm being stupid and i apologize - as i said, with the flat HTML that is created i am able to modify that all day long to do whatever i want. this has thrown me because i have to start from fresh instead of modifying what's there (Because the example in the HTML Custom is nothing like the layout of the HTML normal

#Painful
KS-Soft
Posts: 12821
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

where/what do i need to do to get my headings back?
I have no idea what exactly heading do you want but if you are using so simple test items (just %TestName% %Reply%) than I think you don't need any special header.
Probably you want this?

Code: Select all

<html><head><title>HostMonitor report</title></head> 
Generated on %Date% at %Time%</font><br>
i tried putting the following into the folder title tab but it doesnt work
Your "test items" template do not use any table-related tags. Why you are using such tags for "folder title"?

If you want to create table, then use table elements everywhere.
E.g.
- create table using <table> in "Header"
- use <tr><td> and </td></tr> elements for "test items"
- add </table> in "Footer" section
or
- create table using <table> in "Folder title" section
- use <tr><td> elements for "test items"
- add </table> in "Folder summary" section
I just don't know what exactly do you need.
if i had the plain html template that the standard HTML is created from i could have done this in 5 mins lol
Standard HTML is not created from template but there are various examples. You just need to spend some time to read and undersstand how it works...
If you need something close to "standard" HTML report, check this template
http://www.ks-soft.net/cgi-bin/phpBB/vi ... php?t=2278

Regards
Alex
doodleman99
Posts: 38
Joined: Tue Sep 02, 2008 5:45 am

Post by doodleman99 »

KS-Soft wrote:
where/what do i need to do to get my headings back?
I have no idea what exactly heading do you want but if you are using so simple test items (just %TestName% %Reply%) than I think you don't need any special header.
Probably you want this?

Code: Select all

<html><head><title>HostMonitor report</title></head> 
Generated on %Date% at %Time%</font><br>
i tried putting the following into the folder title tab but it doesnt work
Your "test items" template do not use any table-related tags. Why you are using such tags for "folder title"?

If you want to create table, then use table elements everywhere.
E.g.
- create table using <table> in "Header"
- use <tr><td> and </td></tr> elements for "test items"
- add </table> in "Footer" section
or
- create table using <table> in "Folder title" section
- use <tr><td> elements for "test items"
- add </table> in "Folder summary" section
I just don't know what exactly do you need.
if i had the plain html template that the standard HTML is created from i could have done this in 5 mins lol
Standard HTML is not created from template but there are various examples. You just need to spend some time to read and undersstand how it works...
If you need something close to "standard" HTML report, check this template
http://www.ks-soft.net/cgi-bin/phpBB/vi ... php?t=2278

Regards
Alex
Many thanks Alex,
Thats exactly what i was looking for.

Appreciate your time!
KS-Soft
Posts: 12821
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

You are welcome

Regards
Alex
Post Reply