按记录分页

时间:2016-10-21 10:41:45

标签: javascript c# html css asp.net

我目前正在尝试根据personID / person名称对表进行分页以进行打印。目前,它在每张单独的桌面记录上都有分页 (这是一个aspx页面,在aspx页面中,在iframe中使用ascx文件)。 我如何通过每个患者的表而不是每个记录对此进行分页?

table.ascx

<br class="clear" /><br />
    <table class="report-table" cellspacing="0" cellpadding="2">
        <asp:Repeater ID="Repeater1" runat="server" DataSource='<%# Eval("Bil") %>' OnItemDataBound="Repeater1_OnItemDataBound">
            <HeaderTemplate>
                <tr>
                    <td>Seq</td>
                    <td class="BillingId">Billing Id</td>
                    <td class="DateOfService">Date of Service</td>
                    <td class="PrintNormalWrap">MD</td>
                    <td class="POS">POS</td>
                    <td class="CPT">CPT</td>
                    <td class="MODS">MODS</td>
                    <td class="Charge">Charge</td>
                    <td>Diagnosis</td>
                    <td class="PrintNormalWrap">Referring Provider(UPIN)/Comment</td>
                </tr>
            </HeaderTemplate>

            <ItemTemplate>
                <tr class="<%# BillHasHold(Eval("HasHold")) %> billRowShade<%# Container.ItemIndex % 2 %>">
                    <asp:TableCell ID="tableCellSequence" runat="server"><%# Container.ItemIndex + 1 %></asp:TableCell>
                    <td class="BillingId"><%# FormatBillingId(Eval("BillingId"))  %></td>
                    <td class="DateOfService"><%# FormatShortDate(Eval("ServiceDate")) %></td>
                    <td class="PrintNormalWrapMD"><%# FormatDoctorField(Eval("DoctorName"), Eval("SupervisedByName")) %></td>
                    <td class="POS"><%# FormatField(Eval("Pos")) %></td>
                    <td class="CPT"><%# FormatField(Eval("CptCode"))    %></td>
                    <td class="MODS"><%# FormatField(Eval("Mod"))   %></td>
                    <td class="Charge"><%# Eval("Charge") %></td>
                    <td><%# FormatDiagnoses(Eval("Diagnoses"), Eval("BillDate"), Eval("SiteName")) %></td>
                    <td class="PrintNormalWrapRefPrvdr"><%# FormatNotes(Eval("RefMd"), Eval("RefUpin"), Eval("Notes"), Eval("TimeEntry")) %></td>
                </tr>
                <asp:TableRow ID="tableRowSpecialtyFieldDetails" runat="server" CssClass="specialtyFieldDetails">
                    <asp:TableCell colspan="9" runat="server"><span id="spanSpecialtyFieldDetails" runat="server"></span></asp:TableCell>
                </asp:TableRow>
            </ItemTemplate>
        </asp:Repeater>
     </table>
<p id="pageBreaker" class="pageBreak"></p>

aspx文件

<head runat="server">
    <title></title>
    <link href="Css/ReportStyles.css" rel="stylesheet" type="text/css" />
    <link href="Css/ReportControls.css" rel="stylesheet" type="text/css" />
       <style type="text/css">
    @media print{
                .pageBreak {
        page-break-after: always;
    }

        .pageBreak:last-of-type{
            page-break-after: avoid;
        }
    }
</style>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="theScriptManager" runat="server"></asp:ScriptManager>
        <im:UserSecurityControl ID="userSecurityControl" runat="server" />


        <div id="report-controls">
            <div id="batch-action-tab-container">
                    <div id="batch-action-tabs">
                       <span id="print-batch-tab" class="selected">Encounter Reports</span>
                       <span id='print-face-sheet-tab'>Print Face Sheets</span>
                     </div>

                    <div class="batch-action-panel" id="print-batch-panel">

                        <input type="button" id="generate-report" value="Generate Report" style="float: right; margin: 10px;" /> 

                        <div style="float: left; margin-left: 20px;">
                            <label class="reportControlsHeader" style="margin-left: 5px;">Report Type</label><br />
                            <input type="radio" class="main-report-type" name="main-report-type" value="1" checked="checked"  /> Physician Encounters
                            <br />
                            <input type="radio" class="main-report-type" name="main-report-type" value="2"  /> Patient Details
                            <br/>
                        </div>

                         <div class="grouping-options">
                            <label class="reportControlsHeader" style="margin-left: 25px;">Group By</label><br />
                            <div class="option">
                                <input type="radio" class="main-report-grouping" name="main-report-grouping" value="0" checked="checked"  /> <span>Encounter Date</span>
                            </div>
                            <div class="option">
                                <input type="radio" class="main-report-grouping" name="main-report-grouping" value="1"  /> Name
                            </div>
                            <br />
                            <div class="option">
                                <input type="radio" class="main-report-grouping" name="main-report-grouping" value="2"  /> Facility
                            </div>
                            <div class="option">
                                <input type="radio" class="main-report-grouping" name="main-report-grouping" value="3"  /> Group Name
                            </div>
                             <div>
                               <input id="paginateCheckBox" type="checkbox" class="main-report-grouping" name="main-report-grouping" value="3"  /><span>Paginate each patient</span> 
                            </div>  
                            <br />
                        </div>

                    </div>

                     <div class="batch-action-panel" id="print-facesheet-panel">

                         <input type="button" id="generate-facesheets" value="Generate Face Sheets" style="float: right;  margin: 10px;" />
                        <div style="padding-top: 10px; padding-left: 10px; ">
                             <input type="checkbox" checked="checked" id="facesheet-include-bills" /> Include Bills
                             <input type="checkbox" id="facesheet-sort-lastname" style="margin-left: 140px;" /> Sort by Last Name
                         </div>
                         <div>
                             <input type="checkbox" id="facesheet-include-holds" style="margin-left: 40px;" /> Include Holds 
                         </div>
                     </div>
            </div>
        </div>

        <div id="report-container">
            <div id="report-toolbar">
                 <div id="print-button" style="float: right;">&nbsp;</div>
            </div>
            <iframe id="report-display" border="0"></iframe>

        </div>


    </form>
</body>
</html>

0 个答案:

没有答案