locked
web app generate html onh separate pages. RRS feed

  • Question

  • User-1997257017 posted

    In a web form 2010 application, the application generates 'letters' in an html format right now. Basically the application writes the letter 'information' in an html format and the information is stored in a sql server 2012 database. When the user clicks the 'submit' button, the application calls a report server that 'displays' the report as an ssrs report. Each of these letters are setup for unique customers.

    Now the user wants to be able to 'generate' up to 5 of the same letters one right after each other on separate pages. The only difference in the letters would be the address of the customer that would be used. Each customer address would be obtained from calls to the database.

     Each letter would be only one page long. I thought something like 'println'.

    Thus my question is how can I make each 'letter'  'display' on separate pages?

    Is there such a command in html? Would you show me the code and/or point me to a link(s) urls that will  show me how to accomplish this goal?

    Tuesday, October 18, 2016 2:14 PM

Answers

All replies

  • User-654786183 posted

    you can use a <footer> or <p> element at the end of the page with CSS Style

    <p style="page-break-after:always;"></p>

    or just add a footer element at the end of the page with the following style added in your page

    @media print {
        footer {page-break-after: always;}
    }

    Refer link or link

    Tuesday, October 18, 2016 2:27 PM
  • User-1997257017 posted

    Thank  you very much! This is what I am looking for!

    However, I now have an additional about using css style sheets since your answer assumed css was being used.

    Right now the 'html letters' are stored in a sql server 2012 table in a column that is declared varchar(max) and the column is called stringtemplate.

    The values in this column so far have only been html with no css. Listed below is an example of the html stored in this column.

    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&amp;CUR_DATE.EVAL</p>
    <br />
    <br />
    <br />
    <p>
    </p>
    <p>To the &amp;PAR_NAME.EVAL of &amp;STU_FNAME.EVAL &amp;STU_LNAME.EVAL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &amp;PERMNUM</p>
    <p>&amp;PAR_ADDR.EVAL</p>
    &amp;PAR_CITY.EVAL, &amp;PAR_STATE.EVAL &amp;PAR_ZIP.EVAL<br />
    <br />
    <br />
    <br />
    Dear &amp;PAR_NAME.EVAL and &amp;STU_FNAME.EVAL &amp;STU_LNAME.EVAL:<br />
    <br />
    <br />
    This letter is to inform you that &amp;STU_FNAME.EVAL has the equivalent of 5 or more unexcused absences this school year.&nbsp; <span style="color: black; font-family: arial,sans-serif; font-size: 10pt;"><span style="font-family: arial; font-size: 14px;">We believe student attendance in&nbsp;school is a key component to school success, so it is very important for all children to develop habits of good attendance. Poor attendance contributes to failing grades, decreased learning opportunities, lower academic achievement and may limit your child's opportunities to be involved with school activities.</span><br />
    <br />
    </span><br />
    <p><span style="color: black; font-family: arial,sans-serif;">(Option 1)</span></p>
    <p><span style="color: black; font-family: arial,sans-serif;">Please call me at <em>PHONE NUMBER</em> to discuss these absences. During this phone conference we will address concerns and issues that may be contributing to the absences, and develop a collaborative plan to try to improve attendance. </span></p>
    <p><span style="color: black; font-family: arial,sans-serif;">&nbsp;</span></p>
    <p><span style="color: black; font-family: arial,sans-serif;">(Option 2)</span></p>
    <p style="margin: 10pt 0in;"><span style="color: black; font-family: arial,sans-serif;">I have scheduled an attendance review on <em>DATE</em> at <em>TIME</em>.&nbsp;&nbsp;We will meet at <em>PLACE</em> located at <em>ADDRESS</em>. Please check in at the main office upon your arrival.&nbsp; During this meeting we will address concerns and issues that may be contributing to the absences, and develop a collaborative plan to try to improve attendance. &nbsp;The student and parent should attend this review. If you cannot attend this meeting&nbsp;please contact me at PHONE #. </span></p>
    <br />
    <p>
    </p>
    <p>&nbsp;</p>
    <p>We are notifying you so that together we can address all issues that may be contributing to these absences. Communication between the home and school is very important and we request that parents call the school each and every day that a student is going to be absent. Let us work as partners to make your child successful in school.</p>
    <br />
    Sincerely,<br />
    <br />
    <br />
    &amp;SPA_NAME.EVAL<br />
    <p>
    School Support Liaison/ Attendance Designee</p>
    <p>&amp;SCHOOLNAME.EVAL</p>

    Can you show me how to add the appropriate css to this example or another example? This way I  can see how to add the css to this column that has only been straight html.

    Tuesday, October 18, 2016 3:02 PM
  • User-654786183 posted

    wendy elizabeth

    <p><span style="color: black; font-family: arial,sans-serif;">(Option 1)</span></p> <p><span style="color: black; font-family: arial,sans-serif;">Please call me at <em>PHONE NUMBER</em> to discuss these absences. During this phone conference we will address concerns and issues that may be contributing to the absences, and develop a collaborative plan to try to improve attendance. </span></p> <p><span style="color: black; font-family: arial,sans-serif;">&nbsp;</span></p> <p><span style="color: black; font-family: arial,sans-serif;">(Option 2)</span></p>

    You are already using inline CSS in your HTML markup.  You can add the following code at the end of your HTML

    <p style="page-break-after:always;"></p>

    Wednesday, October 19, 2016 1:10 PM
  • User-1997257017 posted

    I do have the following additional questions to ask:

    1. You are saying that I can have the html look like the following correct:

    <p>School Support Liaison/ Attendance Designee</p>
    <p>&amp;SCHOOLNAME.EVAL</p>
    <p style="page-break-after:always;"></p>

    2. This statement '<p style="page-break-after:always;"></p>' is html5, correct? How I know if the html that  I am using supports html5? Should I be checking for html5? If so, what should I be checking for to see if a browser supports html5?

    Wednesday, October 19, 2016 2:13 PM
  • User-654786183 posted

    This is not HTML5.  It is just a paragraph tag with CSS.  This is supported in all major browsers including IE (4 and above), Chrome (1 and above), Firefox (1 and above), Safari(1.2 and above) and Opera (7 and above).  Please refer the "Browser Support" or "Browser Compatibility" section in the following link respectively

    http://www.w3schools.com/cssref/pr_print_pageba.asp

    https://developer.mozilla.org/en-US/docs/Web/CSS/page-break-after

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, October 19, 2016 5:15 PM