Click here to Skip to main content
14,243,034 members
   

ASP.NET

 
GeneralRe: Data Reader only producing one row of records. Any ideas why? Pin
samflex3-May-19 3:51
membersamflex3-May-19 3:51 
GeneralRe: Data Reader only producing one row of records. Any ideas why? Pin
Richard Deeming3-May-19 5:27
mveRichard Deeming3-May-19 5:27 
GeneralRe: Data Reader only producing one row of records. Any ideas why? Pin
samflex3-May-19 7:06
membersamflex3-May-19 7:06 
AnswerRe: Data Reader only producing one row of records. Any ideas why? Pin
jkirkerx3-May-19 9:18
professionaljkirkerx3-May-19 9:18 
GeneralRe: Data Reader only producing one row of records. Any ideas why? Pin
samflex3-May-19 9:51
membersamflex3-May-19 9:51 
GeneralRe: Data Reader only producing one row of records. Any ideas why? Pin
jkirkerx3-May-19 10:16
professionaljkirkerx3-May-19 10:16 
GeneralRe: Data Reader only producing one row of records. Any ideas why? Pin
jkirkerx3-May-19 10:34
professionaljkirkerx3-May-19 10:34 
GeneralRe: Data Reader only producing one row of records. Any ideas why? Pin
samflex10-May-19 4:39
membersamflex10-May-19 4:39 
Hello,

Still having issues with the code from @jkirkerx. It is me, not the code, I am sure.

So, I decided to go the Richard route by switching back to binding to ListView datasource.

However, the code is not giving an error but when enter a vaue say for Caller List and click "Generate Report", nothing happens.

I just flickers for a second.

I know I am missing something critical but have been looking at this now for two days with no success.

I have decided to post some relevant HTML markup and some VB. Hopefuly, you guys can put me out of my misery.

Thank you very much.

//HTML

             <table class="criteria" runat="server">
 		      <tr id="row_0" class="evenRow">
			   <th>UUID</th>
			   <td>
				<asp:TextBox id="suuid" style="width:150px;" class="form-control" runat="server" />
			   </td>
		</tr>
		<tr id="row_1" class="oddRow">
			<th>Call List ID</th>
			<td>
              <asp:TextBox id="caller_list_id" style="width:150px;" class="form-control" runat="server" />
			</td>
		</tr>
		<tr id="row_2" class="evenRow">
			<th>Phone Number</th>
			<td>
				<asp:TextBox id="phonenumber" style="width:150px;" class="form-control" runat="server" />
			</td>
		</tr>
		<tr id="row_3" class="oddRow">
			<th>Start Date</th>
			<td>
				<asp:TextBox id="date_start" style="width:150px;" class="form-control" runat="server" />
		 </td>
		</tr>
		<tr id="row_4" class="evenRow">
			<th>End Date</th>
			<td>
			  <asp:TextBox id="date_end" style="width:150px;" class="form-control" runat="server" />
		 </td>
		</tr>
		<tr class="oddRow">
			<th>Call Type</th>
			<td>
			  <asp:DropDownList id="call_type" runat="server">
		        <asp:ListItem SELECTED="True" value="">All</asp:ListItem>
		        <asp:ListItem value="0" Text="0 ">Unknown</asp:ListItem>
		        <asp:ListItem value="1" Text="1">Outbound Progressive</asp:ListItem>
		        <asp:ListItem value="2" Text="2">Outbound Predictive</asp:ListItem>
		        <asp:ListItem value="3" Text="4">Inbound</asp:ListItem>
		        <asp:ListItem value="4" Text="8">Blaster</asp:ListItem>
		        <asp:ListItem value="5" Text="16">Personal Inbound</asp:ListItem>
		        <asp:ListItem value="6" Text="32">Nailin</asp:ListItem>
		        <asp:ListItem value="7" Text="64">External Transfer</asp:ListItem>
		        <asp:ListItem value="8" Text="128">PBX Outbound</asp:ListItem>
		        <asp:ListItem value="9" Text="256">PBX Inbound</asp:ListItem>
		        <asp:ListItem value="10" Text="512">Snoop</asp:ListItem>
             </asp:DropDownList>
			</td>
		</tr>
      </table>
    <div class="menuToolbar" style="padding-bottom: 30px;">
      <asp:Button runat="server" id="btnSubmit" Text="Generate Report" OnClick="btnSubmit_Click" />
      <asp:Button runat="server" id="btnExport" Text="Export to CSV" OnClick="btnExport_Click" />
    </div>
 <asp:ListView ID="ProductsListView" runat="server" DataKeyNames="uuid" DataSourceID="SqlDataSource1">
     <LayoutTemplate>
        <table runat="server" border="0" style="">
          <tr>
                <th style="border-left: 1px solid #557799" class="reportHeader">
				Dialed Phone Number
		</th>
		<th class="reportHeader">
				Caller ID
		</th>
		<th class="reportHeader">
				Call List ID
		</th>
		<th class="reportHeader">
				Start Time
		</th>
		<th class="reportHeader">
				Connect Time
		</th>
		<th class="reportHeader">
				End Time
		</th>
		<th class="reportHeader">
				Duration
		</th>
		<th class="reportHeader">
				Full Duration
		</th>
		<th class="reportHeader">
				Campaign Name
		</th>
		<th class="reportHeader">
				Queue Name
		</th>
		<th class="reportHeader">
				Call Type
		</th>
		<th class="reportHeader">
				Employee
		</th>
		<th class="reportHeader">
				ISDN Cause Code
		</th>
		<th class="reportHeader">
				Disposition
		</th>
		<th class="reportHeader">
				Telephony Server
		</th>
		<th class="reportHeader">
				Trunk Name
		</th>
		<th class="reportHeader">
				UUID
		</th>
		<th class="reportHeader">
				Recording
		</th>
		<th class="reportHeader">
				Details
		</th>
	</tr>
    <tr runat="server" id="itemPlaceholder">
      <td colspan="19">
        There is no data!
      </td>
    </tr>
   </table>
</LayoutTemplate>
   <SelectedItemTemplate>
  <table runat="server" border="0" style="">
  	 <tr>
	  <td><asp:Label ID="lblphonenumber" Text='<%# Eval("phone_number") %>' runat="server"></asp:Label></td>
	  <td><asp:Label ID="lblcallerid" Text='<%# Eval("callerid") %>' runat="server"></asp:Label></td>
	  <td><asp:Label ID="lblcallerlist" Text='<%# Eval("call_list_id") %>' runat="server"></asp:Label></td>
	  <td><asp:Label ID="lblstarttime" Text='<%# Eval("startttime") %>' runat="server"></asp:Label></td>
	  <td><asp:Label ID="lblconnectime" Text='<%# Eval("connecttime") %>' runat="server"></asp:Label></td>
	  <td><asp:Label ID="lblendtime" Text='<%# Eval("endtime") %>' runat="server"></asp:Label></td>
	  <td><asp:Label ID="lblduration" Text='<%# Eval("duration") %>' runat="server"></asp:Label></td>
	  <td><asp:Label ID="lblfullduration" Text='<%# Eval("fullduration") %>' runat="server"></asp:Label></td>
	  <td><asp:Label ID="lblampaignname" Text='<%# Eval("camapign_id") %>' runat="server"></asp:Label></td>
	  <td><asp:Label ID="lblqueuename" Text='<%# Eval("queue_id") %>' runat="server"></asp:Label></td>
	  <td><asp:Label ID="lblcalltype" Text='<%# Eval("call_type_id") %>' runat="server"></asp:Label></td>
	  <td><asp:Label ID="lblemployee" Text='<%# Eval("roll_id") %>' runat="server"></asp:Label></td>
	  <td><asp:Label ID="lblisdn" Text='<%# Eval("cause_code") %>' runat="server"></asp:Label></td>
	  <td><asp:Label ID="lbldisposition" Text='<%# Eval("cause_code") %>' runat="server"></asp:Label></td>
	  <td><asp:Label ID="lbltelephony" Text='<%# Eval("box_id") %>' runat="server"></asp:Label></td>
	  <td><asp:Label ID="lbltrunkname" Text='<%# Eval("trunk_name") %>' runat="server"></asp:Label></td>
	  <td><asp:Label ID="lbluuid" Text='<%# Eval("uuid") %>' runat="server"></asp:Label></td>
	  <td><asp:Label ID="lblrecording" Text='<%# Eval("customer_id") %>' runat="server"></asp:Label></td>
	  <td><a href="#"></a></td>
	</tr>
  </table>
  </SelectedItemTemplate>
  </asp:ListView>
  <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:test %>" 
  SelectCommand="SELECT phone_number, callerid, call_list_id, startttime,connecttime, endtime, duration, fullduration,
             camapign_id, queue_id, name, roll_id, cause_code, uuid, box_id, trunk_name, uuid, customer_id FROM cti.qpcdr, cti.call_types
             WHERE cti.qpcdr.call_type_id = cti.call_types.id">
  <SelectParameters>
   <asp:ControlParameter ControlID="suuid" Name="uuid" PropertyName="Text" Type="String" DefaultValue="%" />
   <asp:ControlParameter ControlID="caller_list_id" PropertyName="Text" Name="callerlist" />
   <asp:ControlParameter ControlID="phonenumber" PropertyName="Text" Name="phone" />
   <asp:ControlParameter ControlID="date_start" PropertyName="Text" Name="start" />
   <asp:ControlParameter ControlID="date_end" PropertyName="Text" Name="end" />
  <asp:ControlParameter ControlID="call_type" PropertyName="SelectedValue" Name="calltype" />
  </SelectParameters>
 </asp:SqlDataSource>
 
 
 //VB
    Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
        If Not Me.IsPostBack Then
         'TODO
        End If
    End Sub 
     Protected Sub btnSubmit_Click(sender As Object, e As EventArgs) Handles btnSubmit.Click
         'ProductsListView.DataSource = SqlDataSource1
         ProductsListView.DataBind()
     End Sub
     Protected Sub btnExport_Click(sender As Object, e As EventArgs)
         ProductsListView.DataBind()
    End Sub

GeneralRe: Data Reader only producing one row of records. Any ideas why? Pin
jkirkerx10-May-19 8:22
professionaljkirkerx10-May-19 8:22 
GeneralRe: Data Reader only producing one row of records. Any ideas why? Pin
samflex10-May-19 10:31
membersamflex10-May-19 10:31 
GeneralRe: Data Reader only producing one row of records. Any ideas why? Pin
jkirkerx12-May-19 13:15
professionaljkirkerx12-May-19 13:15 
GeneralRe: Data Reader only producing one row of records. Any ideas why? Pin
samflex16-May-19 14:39
membersamflex16-May-19 14:39 
Questionodata Pin
Member 140736591-May-19 2:33
memberMember 140736591-May-19 2:33 
AnswerRe: odata Pin
jkirkerx3-May-19 9:01
professionaljkirkerx3-May-19 9:01 
QuestionSOAP and using a Class containing two sub classes with same name problem Pin
Martin Stevens26-Apr-19 17:18
memberMartin Stevens26-Apr-19 17:18 
AnswerRe: SOAP and using a Class containing two sub classes with same name problem Pin
jkirkerx3-May-19 8:38
professionaljkirkerx3-May-19 8:38 
GeneralRe: SOAP and using a Class containing two sub classes with same name problem Pin
Martin Stevens10-May-19 20:03
memberMartin Stevens10-May-19 20:03 
GeneralRe: SOAP and using a Class containing two sub classes with same name problem Pin
jkirkerx12-May-19 13:03
professionaljkirkerx12-May-19 13:03 
Questionprint sql data from vb Pin
Member 1433060825-Apr-19 1:17
memberMember 1433060825-Apr-19 1:17 
AnswerRe: print sql data from vb Pin
Afzaal Ahmad Zeeshan25-Apr-19 1:36
mveAfzaal Ahmad Zeeshan25-Apr-19 1:36 
QuestionSharing API's between multiple sites in IIS 8.5 Pin
Fred283424-Apr-19 21:39
memberFred283424-Apr-19 21:39 
AnswerRe: Sharing API's between multiple sites in IIS 8.5 Pin
Richard Deeming25-Apr-19 1:17
mveRichard Deeming25-Apr-19 1:17 
GeneralRe: Sharing API's between multiple sites in IIS 8.5 Pin
Fred283425-Apr-19 1:47
memberFred283425-Apr-19 1:47 
QuestionSo I finally got my Angular wrapped in .Net Core 2.2 app working in a Docker Container on a production server. Pin
jkirkerx16-Apr-19 11:14
professionaljkirkerx16-Apr-19 11:14 
SuggestionRe: So I finally got my Angular wrapped in .Net Core 2.2 app working in a Docker Container on a production server. Pin
Richard MacCutchan20-Apr-19 22:16
protectorRichard MacCutchan20-Apr-19 22:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.