show table border oracle apex html region - oracle-apex

The following code is not showing table border in apex report.
Declare
Cursor c_Group Is
select DISTINCT
PSGROUP
FROM LOG_PS_STATUS;
Cursor c_Col(p_Group Varchar2) Is
select DISTINCT
SRNO,PSCOLUMN as PSCOLUMN
FROM LOG_PS_STATUS
WHERE PSGROUP =p_Group
ORDER BY SRNO;
Begin
For Rec_d In c_Group Loop
Htp.p('<table border: 1px solid>');
Htp.p('<tr><td colspan=75%><b>' || Rec_d.PSGROUP|| '</b></td></tr>');
Htp.p('<tr>');
For Rec_e In c_Col(Rec_d.PSGROUP) Loop
Htp.p('<td>' || Rec_e.PSCOLUMN|| '</td>');
End Loop;
For Rec_e In c_Col(Rec_d.PSGROUP) Loop
Htp.p('<tr><td>' || Rec_e.srno|| '</td></tr>');
End Loop;
Htp.p('</tr>');
Htp.p('</table>');
End Loop;
End;

Your table displays no border because your HTML is invalid. If you want inline CSS you have to use the style attribute which would contain inline CSS declarations.
style="css-property:css-value;…"
Description
In Cascading Style Sheets (CSS), a key feature is the cascade itself.
In the cascade, styles set at different levels take different levels
of importance, so a style that’s set in a globally linked style sheet
can be overridden by a style for the same class or id that’s included
in an embedded style sheet. The style attribute goes a level further,
to override styles set in linked or embedded style sheets.
However, the use of the style attribute is generally considered to be
a bad practice, as it causes the presentation to become intrinsically
mixed with the content of the document—a practice that’s almost as bad
as using the font element to style text. One way in which you might
use inline styles is to debug CSS display issues (applying the style
at its lowest level in the cascade, and progressively moving higher up
the cascade until the problem is isolated). You should, therefore,
avoid using inline style attributes in your markup.
(Source: http://reference.sitepoint.com/html/core-attributes/style)
However:
why not just make a classic report where you break on the first column (group)?
why not use an IR with control break?
Try to use apex to its fullest instead of htp.p calls - that's avoiding the strength of it: declarative. Consider the possibilities and boundaries of apex first.

Related

How to hide one cell in the ASCIIDOC table?

I have a table with human parameters. I want to hide one column, for example age, if attribute :showall: is not set. How to do that? I can hide only the whole table, but not the one column.
.Human parameters
:showall:
ifdef::showall[]
[cols="1,1,1,1,1"]
|===
|Name
|Sex
|Age
|Country
|Weight
5+^|Values
|John Daw
|Male
|41
|Algeria
|85
endif::showall[]
That's not a built in feature.
You have two options:
For cell content that should be hidden, simply remove it from the table.
If you need show/hide functionality, you'll need to add some custom JavaScript and CSS to make that happen.
For option 2, the technique for including JS/CSS is called Docinfo files.
You'll have to experiment with column show/hide, as there may be browser compatibility or presentation issues that would need to be addressed. That said, this answer might show a technique that would work for you: https://stackoverflow.com/a/34098320/4023764

Oracle apex (19.1) - hide interactive report panel when table is empty

I got an interactive report with a "collapsible" template.
When the table is empty there is an empty panel that takes up a lot of space. In Classic report this space does not exist when the table is empty.
I can't find a way that interactive report will behave the same way (we don't want to use Classic report).
I need a simple generic solution since we have a lot of tables.
The interactive report looks like this:
And I want it to look like this (as Classic report):
You could apply an after-refresh dynamic action that checks for the existence of the nodatafound area, and hide/treat the region in some way:
$(this.triggeringElement).find('.nodatafound').length == 1
Or you could apply a different amount of padding to the .a-IRR-noDataMsg class
.a-IRR-noDataMsg {padding: 5px;}

XSL:FO - Page break on two dynamic areas?

I'm using XSLFast and was wondering if the following is possible:
I have a page with static content and one area containing a table that outputs XML-data. The table is set to a specific height so that the page breaks when the height is reached and continues outputting one the next page.
Now,
I want to add another area containing such a table with the exact feature. Is that possible on one side?
I have never used XSLFast, but...
XSL 1.1 allows an fo:simple-page-master to have multiple fo:region-body. (See https://www.w3.org/TR/xsl/#fo_simple-page-master.) I do not know if XSLFast supports it, but with a formatter that supports multiple fo:region-body, you could put the red table and the blue table in separate fo:flow and direct them to the two different fo:region-body. The formatter would then make another page whenever either fo:region-body overflowed.

Infragistics UltraGrid - How to use displayed values in group by headers when using an IEditorDataFilter?

I have a situation where I'm using the IEditorDataFilter interface within a custom UltraGrid editor control to automatically map values from a bound data source when they're displayed in the grid cells. In this case it's converting guid-based key values into user-friendly values, and it works well by displaying what I need in the cell, but retaining the GUID values as the 'value' behind the scenes.
My issue is what happens when I enable the built-in group by functionality and the user groups by a column using my editor. In that case the group by headers default to using the cell's value, which is the guid in my case, so I end up with headers like this:
Column A: 7F720CE8-123A-4A5D-95A7-6DC6EFFE5009 (10 items)
What I really want is the cell's display value to be used instead so it's something like this:
Column A: Item 1 (10 items)
What I've tried so far
Infragistics provides a couple mechanisms for modifying what's shown in group by rows:
GroupByRowDescriptionMask property of the grid (http://bit.ly/1g72t1b)
Manually set the row description via the InitializeGroupByRow event (http://bit.ly/1ix1CbK)
Option 1 doesn't appear to give me what I need because the cell's display value is not exposed in the set of tokens they provide. Option 2 looks promising but it's not clear to me how to get at the cell's display value. The event argument only appears to contain the cell's backing value, which in my case is the GUID.
Is there a proper approach for using the group by functionality when you're also using an IEditorDataFilter implementation to convert values?
This may be frowned upon, but I asked my question on the Infragistic forums as well, and a complete answer is available there (along with an example solution demonstrating the problem):
http://www.infragistics.com/community/forums/p/88541/439210.aspx
In short, I was applying my custom editors at the cell level, which made them unavailable when the rows were grouped together. A better approach would be to apply the editor at the column level, which would make the editor available at the time of grouping, and would provide the expected behavior.

Long check list ui pattern for web

I have a data entry page where the user is required so make some selections from a list. Currently it is just a check list with about 10 items they can tick, but is will expand soon to about 230. What is a good UI paradigm for dealing with a large number of selectable items? I am considering dual list type control.
Dual list, BUT, for a large # of non-groupable elements:
MUST have ability to select multiple elements (Duh!)
SHOULD have ability to select ALL elements with a click
SHOULD have ability to search (in either list), and select all matching elements
Also, if the lists are REALLY big (1k+), you may run into trouble with slow rendering.
If so, you can also "paginate" the list - e.g. display only first N elements, allow selection from those, and then ability to shift the "frame" to next N elements.
(all the above, BTW, are real attributes of a solution we implemented in an enterprise web app needing a selection list with 30k possible values which could not be grouped).
Are the items grouped in any way? If so, a collapsible tree-type navigation might be useful.
It really depends on the situation and how much space you have but in most cases I prefer the dual list control, aka list builder, you where thinking about.
Here's a nice link for inspiration (requires silverlight): http://good.ly/qh7aeg8
Here's an accessible way using only HTML and Javascript:
Use the HTML fieldset tag to chunk them into logical groups;
use (say) JQuery to show/hide each group;
add navigation at the top to jump to each group.
If you hide all the groups initially, users can click the link for the groups they want to complete. Further, if you add a rollover (could just be a tooltip title attribute on the links for accessibility) with a description of each group, users will have a 'preview' before visiting it.
Finally, if the labels are short enough, give the fieldsets a width and make them into columns using CSS float or absolute positioning.
Try to stick to valid (X)HTML, CSS and Javascript - there are plenty of precedents for this.