Note that there are some explanatory texts on larger screens.

plurals
  1. POAdd row for totals at the end of each table
    primarykey
    data
    text
    <p>I am looking to add a row to each of the Location's like the image below shows. The row would display the totals of each column. I have these values already calculated ( &lt;%= owetotal %> , &lt;%= paidtotal %>, &lt;%= origtotal %>) just need them placed in the correct spot and I can't seem to format it the way I want it.</p> <p>Currently it looks like this:</p> <p><img src="https://i.stack.imgur.com/kvrxz.jpg" alt="enter image description here"></p> <p>I want it to look like this:</p> <p><img src="https://i.stack.imgur.com/0yBGG.jpg" alt="enter image description here"></p> <p>My ASPX Page</p> <pre><code>&lt;form id="form1" runat="server"&gt; &lt;div class="container"&gt; &lt;div class="page-header"&gt; &lt;h1&gt; Report&lt;/h1&gt; &lt;br /&gt; &lt;div class="row"&gt; &lt;div class="span11"&gt; &lt;% System.Data.OleDb.OleDbConnection pcn; System.Data.OleDb.OleDbCommand pcm; System.Data.OleDb.OleDbDataReader prs; pcn = new System.Data.OleDb.OleDbConnection(""); pcm = new System.Data.OleDb.OleDbCommand(); pcn.Open(); pcm.Connection = pcn; var tableSql = @"SELECT * FROM Accounts"; pcm.CommandText = tableSql; prs = pcm.ExecuteReader(); var rowcount = 0; var CurrentLocation = ""; while (prs.Read()) { rowcount++; %&gt; &lt;% if (prs["Location"].ToString() != CurrentLocation) { %&gt; &lt;table width="100%" class="table"&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt; Name &lt;/th&gt; &lt;th&gt; Owes &lt;/th&gt; &lt;th&gt; Paid &lt;/th&gt; &lt;th&gt; Original Amt &lt;/th&gt; &lt;th&gt; Date &lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;h4&gt; &lt;%= prs["Location"].ToString()%&gt;&lt;/h4&gt; &lt;% CurrentBranch = prs["Loction"].ToString(); } %&gt; &lt;tr&gt; &lt;td&gt; &lt;%= prs["Name"].ToString() %&gt; &lt;/td&gt; &lt;td&gt; $&lt;%= prs["Owes"].ToString() %&gt; &lt;/td&gt; &lt;td&gt; $&lt;%= prs["Paid"].ToString() %&gt; &lt;/td&gt; &lt;td&gt; $&lt;%= prs["OrigAmt"].ToString() %&gt; &lt;/td&gt; &lt;td&gt; &lt;%= Convert.ToDateTime(prs["SubmitDate"].ToString()).ToShortDateString() %&gt; &lt;/td&gt; &lt;/tr&gt; &lt;% } prs.Close(); pcn.Close(); %&gt; &lt;/table&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/form&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload