6 Replies Latest reply on May 26, 2017 8:19 PM by Rotan

    Multiple CARD_TEXT in APEX

    Rotan

      Hi,

       

      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.

       

      Any help appreciated !!!

       

      Thanks

        • 1. Re: Multiple CARD_TEXT in APEX
          fac586

          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

            The data consists of 'Total Records', 'Processed Records', 'Error Records'.

            • 3. Re: Multiple CARD_TEXT in APEX
              Rotan

              The data consists of 'Total Records', 'Processed Records', 'Error Records'.

              • 4. Re: Multiple CARD_TEXT in APEX
                LA County APEX

                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

                  Rotan 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: "";  
                  }  
                  
                  1 person found this helpful
                  • 6. Re: Multiple CARD_TEXT in APEX
                    Rotan

                    Hi,

                    Thank You for your response.

                    Drifting off.... how can I mark answer as correct answer. I just see Like , Helpful, comment , Actions (there is no actions under the action link )