-
1. Re: Multiple CARD_TEXT in APEX
fac586 May 25, 2017 4:36 AM (in response to Rotan)3299849 wrote:
Please update your forum profile with a recognisable username instead of "3299849": Video tutorial how to change nickname available
How can have multiple #CARD_TEXT# in a APEX page with 'Cards' Template for Report.
I meant, Usually we wrtie a SQL query as below
Select
'aaaa' 'CARD_INITIALS',
'bbbb' 'CARD_HEADING',
'cccc' 'CARD_TEXT',
'dddd' 'CARD_SUBTEXT'
from dual:
Suppose, I need to have multiple CARD_TEXT to be used in my Apex Card.
How can this be done, as SQL will allow only one 'CARD_TEXT' alias name.
I need to have 1 heading and 4 lines with same fontsize in the card.
Why? What exactly does this data consist of?
-
2. Re: Multiple CARD_TEXT in APEX
Rotan May 25, 2017 4:53 AM (in response to Rotan)The data consists of 'Total Records', 'Processed Records', 'Error Records'.
-
3. Re: Multiple CARD_TEXT in APEX
Rotan May 25, 2017 4:54 AM (in response to fac586)The data consists of 'Total Records', 'Processed Records', 'Error Records'.
-
4. Re: Multiple CARD_TEXT in APEX
LA County APEX May 25, 2017 5:07 AM (in response to Rotan)Try this:
'<table><tr><td>Total Records:</td><td style="width:100px;text-align:right;">' || tcnt || '</td></tr><tr><td>Processed Records</td><td style="width:100px;text-align:right;">' || pcnt || '</td></tr><tr><td>Error Records</td><td style="width:100px;text-align:right;">' || ecnt || '</td></tr></table>' card_subtext
-
5. Re: Multiple CARD_TEXT in APEX
fac586 May 25, 2017 8:05 AM (in response to Rotan)1 person found this helpfulRotan wrote:
The data consists of 'Total Records', 'Processed Records', 'Error Records'.
That would appear to be three elements, not four...
Assuming the data is sourced from three (or four) columns or expressions, here's how to do this using semantic mark-up and proper separation of concerns:
1. In the report source query, return null for the CARD_TEXT column value, and the data elements in separate columns:
select ... card_title , ... card_link , null card_text , null card_subtext , coalesce(total, 0) total , coalesce(processed, 0) processed , coalesce(errors, 0) errors ...
2. Set the CARD_TEXT column HTML Expression to
<dl> <dt>Total Records<dd>#TOTAL# <dt>Processed Records<dd>#PROCESSED# <dt>Error Records<dd>#ERRORS# </dl>
3. Set the report template option Body Text to Auto.
4. Add a style sheet to the page Inline CSS property to position the terms and descriptions so they appear on the same line:
.t-Card-desc dt { display: inline-block; width: 8.65em; } .t-Card-desc dd:before { content: ": "; } .t-Card-desc dd { display: inline; margin: 0; } .t-Card-desc dd:after { display: block; content: ""; }
-