cancel
Showing results for 
Search instead for 
Did you mean: 

HTMLReport flush left in table | display in per cent | diagramm

Hi everyone,

 

I have created an own Table with coloumns like "waiting, working, blocked" (flush-left) and added it to my HTML-report.

 

1. But row index is still placed in the middle (centre). Flush-right is also working but it is more structure with a flush-left. 

 

2. Is it possible somehow to display my numbers in per cent?

 

3. How can i add a diagramm (waiting, working etc.)  for each row in a seperate coloumn for the HTML-Report?

 

thanks.

5 REPLIES

Re: HTMLReport flush left in table | display in per cent | diagramm

Siemens Phenom Siemens Phenom
Siemens Phenom

Hello StudentCologne,

1: This is a bug which we will fix. The HTML row index doesn't use the justification setting defined for the row index column in the table file.

2: This is currently not possible.

3: You can insert HTML code into a table cell. The code has to be surrounded by << and >>. So the following string can be used to create a stacked bar with 3 segments:

 << <span style="width: 10px; height: 9px; font-size: 10px; float: left; background-color: rgb(60, 148, 0);"></span><span style="width: 86px; height: 9px; font-size: 10px; float: left; background-color: rgb(250, 188, 0);"></span><span style="width: 4px; height: 9px; font-size: 10px; float: left; background-color: rgb(208, 34, 0);"></span>>>

 

Regards,

Ralf

Betreff: HTMLReport flush left in table | display in per cent | diagramm

Siemens Valued Contributor Siemens Valued Contributor
Siemens Valued Contributor

Dear StudentCologne,

I just checked the current implementation, which is unchanged since 13.0.

With Plant Simulation 13.0 the follwoing format attributes of each cell gets applied to tables in the HTML report:

  • font color
  • background color
  • text alignment / justification

So, after upgrading/updating to 13.0 you should see the tables in your HTML report with the same visual format attributes you set in the source object.

Best regards,

Martin Lemburg

Martin Lemburg

Digital Factory Divison

Product Lifecycle Management
Manufacturing Engineering Software / R&D / Plant Simulation
Berlin / Germany

Re: HTMLReport flush left in table | display in per cent | diagramm

Phenom
Phenom

Hello.

 

A way to get the numbers to display as a % is to change the column type to a string and then you can format your data as you see fit. Sorting the data then into accending or decending values will not work the same, so to get around this you can include an extra column that contains the raw data and then use this to sort, depending on what your doing you can then either delete the column after sorting (if regenerating the table each time) or can exclude it from the report (see below code, wrote from memory).

 

[TableFile, 1, 2, 3, 4, 5] - Will show columns 1 through to 5, but could exclude columns 6 and 7 for example.

James M

Re: HTMLReport flush left in table | display in per cent | diagramm

thank you all for your support. all your proposals are working fine.

 

An additional question,

how can i create a connection between my coloumn values and the diagramm code?

 

thanks

Re: HTMLReport flush left in table | display in per cent | diagramm

Siemens Valued Contributor Siemens Valued Contributor
Siemens Valued Contributor

Dear StudentCologne,

To get the HTML span tags into the table, you would need a method using the table contents from the numerical columns, calculating the needed width for each horizontal 100%-bar.

In detail:

  1. The method would e.g. use column 1 to 3 for a three element 100% bar diagram per row
  2. The method would calculate the percentates from the sum of the values of the column 1 to 3 for each row
  3. The method would use the calculated percentages to calculate the width of each HTML span tag in relation to a desired maximum width of th 100%-bar diagramm
  4. The method would use e.g. column 4 to write a HTML span tag per known percentage into the cell per row - each HTML span tag would have the calculated fixed CSS width property and a defined CSSbackground color property.

I hope this helps a bit further!

Best regards,

Martin Lemburg

Martin Lemburg

Digital Factory Divison

Product Lifecycle Management
Manufacturing Engineering Software / R&D / Plant Simulation
Berlin / Germany