How to Vary the width of Interactive Report Column in Oracle Apex 5 - oracle

I have one simple Interactive report build in Apex 5.0. Its just simple plain statement pulling the data from table.
I need to adjust the size of each column in the so that data properly appears in the report.
Right now what is happening is that i have column called customer which contains customer name. Now name is 30 to 40 characters long and in the report it is getting broken down in two lines.
I tried using the following but there is no effect of this. Could you please help me to fix this. I have 30 columns in the report.
#apexir_NAME{width: 200px;}

You should try this using Column Formatting and set HTML Expression value like this
<div style="display:block; width:200px">#COLUMN_NAME_OF_REPORT#</div>
for example:
<div style="display:block; width:200px">#DEPT_ID#</div>

To change interactive column width:
Add static id to interactive report eg. myReport
Add static id for column in report eg. myColumn1
Add to inline css of page below code:
myReport td[headers=myColumn1]{ width:100px; }
Note: before myReport td put #

Use min-width instead. You could use either of the following:
#apexir_NAME {min-width:200px;}
or
th#NAME {min-width:200px;}
To set all of them at once, you could try something like this:
table.apexir_WORKSHEET_DATA th {min-width:200px;}

Related

Why does IMPORTXML with XPATH return unexpected blank row in addition to expected result?

I'm importing into Google Sheets with IMPORTXML with the following XPATH:
=IMPORTXML(A2;"//*[#id='mw-content-text']/div/table[1]/tbody/tr[4]/td[1]/ul/li")
A2 containing the URL (https://stt.wiki/wiki/20th_Century_Pistol).
From the website I want to import the list entries in the "Basic" column and "Crafted From" row of the table.
There are only two list entries in this section of the table:
"x1 Basic Security Codes" and
"x4 Basic Casing"
Therefore, I expected to get only those two list entries as rows in my sheet.
Instead, I got an additional blank row above those two entries. When I change "td[1]" to "td[3]" in the XPATH query however, there are no extra blanks.
I don't understand where the additional blank row is coming from and how I can avoid it.
Google Sheet with desired and actual result
When I saw the HTML of the URL, there are 2 li tags in the ul tag. So I think that your xpath is correct. But from your issue, I was worry that the sup tag might affect to this situation. But I'm not sure whether this is the direct reason. So I would like to propose to add the attribute of li for your xpath as follows.
Modified xpath:
When your xpath is modified, please modify as follows.
From:
//*[#id='mw-content-text']/div/table[1]/tbody/tr[4]/td[1]/ul/li
To:
//*[#id='mw-content-text']/div/table[1]/tbody/tr[4]/td[1]/ul/li[#style='white-space:nowrap']
By adding [#style='white-space:nowrap'], the value of li with style='white-space:nowrap' is retrieved.
Result:
The formula is =IMPORTXML(A1;"//*[#id='mw-content-text']/div/table[1]/tbody/tr[4]/td[1]/ul/li[#style='white-space:nowrap']"). Please put the URL to the cell "A1".
Note:
Also, you can use the xpath of //*[#id='mw-content-text']/div/table[1]/tbody/tr[4]/td[1]/ul/li[position()>1].
To complete the very neat #Tanaike's answer, another expression :
=IMPORTXML(A2;"//th[contains(.,'Crafted')]/following::td[1]//li[contains(#style,'white')]")
If a blank line is added it's because GoogleSheets parses an additional blank li element containing a #style attribute.

summernote table add row

I've just worked my way through a summernote configuration only to find at the last minute that once you insert a table, it's not possible to change the number of rows or columns. And the editor only supports tables up to 10x10.
For me this makes the table editor in summernote redundant. This issue is reported at https://github.com/summernote/summernote/issues/93
However, there doesn't seem to be any progress on fixing it. Summernote has a lot of forks - has anybody forked and fixed this issue?
Try following code.
$('#summer-note').summernote({
// insertTable max size
insertTableMaxSize: {
col: 20,
row: 20
},
});
Looks like a pull request is there. Have a look its not my work but a good start. https://github.com/summernote/summernote/pull/1311

HTML tags inside APEX_ITEM.DISPLAY_AND_SAVE

APEX version 4.0
I need to display dynamic content on APEX form. Region based on query like this:
SELECT DECODE(my_table.field_type,
'WRITE', APEX_ITEM.text(3, my_table.field_value, 100),
'READ', APEX_ITEM.DISPLAY_AND_SAVE(3, some_func_ret_html(my_table.field_value)))
FROM my_table
Unfortunatelly instead of formatted html text all I can see:
some text... link_name
Column property "Display As" set to "Standart Report Column".
Change page source/ region source to pl/sql block and pass this code in HTP. format this might work.

BIRT - expression builder: HTML Table + Dataset field does not evaluate

I am new to BIRT and its awesome but I am unable to make a bullet point list where each bullet point is a field from my dataset. Without using any html the datasetfield evaluates but as soon as I add an html tag it will simply show the name of the field.
This
<ul>
<li><value-of> row["SRRI"] </value-of></li>
</ul>
Shows:
row["SRRI"]
But I want it to show the value of row["SRRI"] instead. (Omitting "" does not change the output for me)
I was searching for a solution for a few hours now and I guess its fairly simple but I cannot find a solution on how to tell BIRT that this is not a string.
It sounds like you have a list, and you want to lead each entry with a bullet point. In your report design, you can put a cell in front of your row["SRRI"] value and put what ever bullet image you want there.

DataTables - Adding filtering function to a column

I have a table which have information which I would like to exclude from the search box. For example, in one of the columns I have some text and then links, it looks like that:
<td>
<div>John Doe</div>
<div>
View |
Edit |
Delete
</div>
</td>
Of-course in this case I would like the search box to consider only "John Doe" as a text to be searched.
I draw my table in php (I use Symfony-2) and apply the DataTable plugin using dataTable function with jQuery. I got the impression that what I want is possible, but couldn't manage to achieve it. Other discussions like http://www.datatables.net/forums/discussion/255/customising-the-way-the-filter-works/p1 neither helped me to solve this problem.
Thanks!
I'm sure there are ways to customize the actual search function (you could specify the type for the column using mDataProp and then write a custom filter for that type maybe?).
But a different way to go about it is to have your PHP script only supply the name: John Doe. This will be the original data for the cell.
Then in your column definitions, use fnRender() to format the cell using the layout you use in your question -- and have it automatically parse the name to create the links you want (assuming all names are first and last, and all links just use the combined first/last names, this should be fairly easy to implement).
Then set bUseRendered to false for that column and it will perform all of its sorting and filtering based on the original content, not the new content. See more here.

Resources