473,396 Members | 2,010 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

repeater advice

Hi,

I have an ASP .NET /VB application over a SQL database. I am designing
a print friendly page. The database holds security incidents with the
possibility of multiple (or none) people, and property attached to the
incident. There is an incident table, person table, and property table
all tied together by the incident number. When someone hits the print
button I open a new page and use 3 datarepeaters to display the data.
What happens is this:

For example, If I have more than one person tied to an incident, the
repeater goes through one time and displays my data perfectly the way
I have laid the table out. The second person appears all jumbled with
no formatting though. Here is an example:

Person
Name: matt Involvement: Contact Status: Contractor

Employer: motorola Employee ID: 0987654321
Employer Address: 1000 west Employer Phone #: 0987654321
Department: ep809 Supervisor: george Shift: first

Home Address: 2000 east Home Phone: 0987654321 Pager: 0987654321

Notes: more notes
Name:george Involvement:Reported By Status:Other Employer:motorola
Employee ID:1234 Employer Address:8000 west sunrise Employer Phone
#:1234567890 Department:et555 Supervisor:me Shift:first Home
Address:7000 west university Home Phone:1234567890 Pager:1234567890
Notes:my notes

****Hard to see with copy and paste but you should get the picture
that the first person has some formatting while the second is just
fields of data crammed together. I am using a select statement and a
repeater bound to a datareader. Here is the repeater code. Any help is
appreciated. Thanks.

<asp:Repeater id="rptPrintFriendlyPerson" runat="server">
<HeaderTemplate>
<table width="100%">
<tr align="center" bgcolor="#0000FF"><td colspan="6" >
<font color="#FFFFFF">Person</font>
</td></tr>
</HeaderTemplate>
<itemtemplate>

<tr>
<td><b>Name:</b></td><td><%# Container.DataItem("person_name")
%></td>
<td><b>Involvement:</b></td><td><%#
Container.DataItem("involvement") %></td>
<td><b>Status:</b></td><td><%# Container.DataItem("person_status")
%></td>
</tr>

<tr><td>&nbsp;</td></tr>

<tr>
<td><b>Employer:</b></td><td><%# Container.DataItem("employer")
%></td>
<td><b>Employee ID:</b></td><td><%#
Container.DataItem("employee_id") %></td>
</tr>

<tr>
<td><b>Employer Address:</b></td><td><%#
Container.DataItem("employer_address") %></td>
<td><b>Employer Phone #:</b></td><td><%#
Container.DataItem("employer_phone") %></td>
</tr>

<tr>
<td><b>Department:</b></td><td><%# Container.DataItem("department")
%></td>
<td><b>Supervisor:</b></td><td><%# Container.DataItem("supervisor")
%></td>
<td><b>Shift:</b></td><td><%# Container.DataItem("shift") %></td>
</tr>

<tr><td>&nbsp;</td></tr>

<tr>
<td><b>Home Address:</b></td><td><%#
Container.DataItem("home_address") %></td>
<td><b>Home Phone:</b></td><td><%# Container.DataItem("home_phone")
%></td>
<td><b>Pager:</b></td><td><%# Container.DataItem("pager") %></td>
</tr>

<tr><td>&nbsp;</td></tr>

<tr>
<td><b>Notes:</b></td><td><%# Container.DataItem("person_notes")
%></td>
</tr>
</table>
</itemtemplate>
</asp:repeater>
Nov 18 '05 #1
3 1214
Matt,
there appears tobe some pretty basic HTML errors.

For example,
your first row has 6 columns, your 2nd one has 1 and your 3rd has 4...you'll
need to throw in some colspans.

Also, you open your <Table> in the headertemplate (happens once) and you
close it in your itemtemplate (happens once per row). so you'll end up with.
<table>
<tr><td>ur stuff here</td></tr>
</table>
<tr><td>ur stuff here</td></tr>
</table>
<tr><td>ur stuff here</td></tr>
</table>
<tr><td>ur stuff here</td></tr>
</table>
<tr><td>ur stuff here</td></tr>
</table>

your </table> must be placed in the FooterTemplate or your <table> in the
itemtemplate..
Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"Matt Mercer" <ma******@bellsouth.net> wrote in message
news:37**************************@posting.google.c om...
Hi,

I have an ASP .NET /VB application over a SQL database. I am designing
a print friendly page. The database holds security incidents with the
possibility of multiple (or none) people, and property attached to the
incident. There is an incident table, person table, and property table
all tied together by the incident number. When someone hits the print
button I open a new page and use 3 datarepeaters to display the data.
What happens is this:

For example, If I have more than one person tied to an incident, the
repeater goes through one time and displays my data perfectly the way
I have laid the table out. The second person appears all jumbled with
no formatting though. Here is an example:

Person
Name: matt Involvement: Contact Status: Contractor

Employer: motorola Employee ID: 0987654321
Employer Address: 1000 west Employer Phone #: 0987654321
Department: ep809 Supervisor: george Shift: first

Home Address: 2000 east Home Phone: 0987654321 Pager: 0987654321

Notes: more notes
Name:george Involvement:Reported By Status:Other Employer:motorola
Employee ID:1234 Employer Address:8000 west sunrise Employer Phone
#:1234567890 Department:et555 Supervisor:me Shift:first Home
Address:7000 west university Home Phone:1234567890 Pager:1234567890
Notes:my notes

****Hard to see with copy and paste but you should get the picture
that the first person has some formatting while the second is just
fields of data crammed together. I am using a select statement and a
repeater bound to a datareader. Here is the repeater code. Any help is
appreciated. Thanks.

<asp:Repeater id="rptPrintFriendlyPerson" runat="server">
<HeaderTemplate>
<table width="100%">
<tr align="center" bgcolor="#0000FF"><td colspan="6" >
<font color="#FFFFFF">Person</font>
</td></tr>
</HeaderTemplate>
<itemtemplate>

<tr>
<td><b>Name:</b></td><td><%# Container.DataItem("person_name")
%></td>
<td><b>Involvement:</b></td><td><%#
Container.DataItem("involvement") %></td>
<td><b>Status:</b></td><td><%# Container.DataItem("person_status")
%></td>
</tr>

<tr><td>&nbsp;</td></tr>

<tr>
<td><b>Employer:</b></td><td><%# Container.DataItem("employer")
%></td>
<td><b>Employee ID:</b></td><td><%#
Container.DataItem("employee_id") %></td>
</tr>

<tr>
<td><b>Employer Address:</b></td><td><%#
Container.DataItem("employer_address") %></td>
<td><b>Employer Phone #:</b></td><td><%#
Container.DataItem("employer_phone") %></td>
</tr>

<tr>
<td><b>Department:</b></td><td><%# Container.DataItem("department")
%></td>
<td><b>Supervisor:</b></td><td><%# Container.DataItem("supervisor")
%></td>
<td><b>Shift:</b></td><td><%# Container.DataItem("shift") %></td>
</tr>

<tr><td>&nbsp;</td></tr>

<tr>
<td><b>Home Address:</b></td><td><%#
Container.DataItem("home_address") %></td>
<td><b>Home Phone:</b></td><td><%# Container.DataItem("home_phone")
%></td>
<td><b>Pager:</b></td><td><%# Container.DataItem("pager") %></td>
</tr>

<tr><td>&nbsp;</td></tr>

<tr>
<td><b>Notes:</b></td><td><%# Container.DataItem("person_notes")
%></td>
</tr>
</table>
</itemtemplate>
</asp:repeater>

Nov 18 '05 #2
Go to
my article : http://www.code101.com/Code101/Displ...le.aspx?cid=43
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:uv**************@TK2MSFTNGP09.phx.gbl...
Matt,
there appears tobe some pretty basic HTML errors.

For example,
your first row has 6 columns, your 2nd one has 1 and your 3rd has 4...you'll need to throw in some colspans.

Also, you open your <Table> in the headertemplate (happens once) and you
close it in your itemtemplate (happens once per row). so you'll end up with. <table>
<tr><td>ur stuff here</td></tr>
</table>
<tr><td>ur stuff here</td></tr>
</table>
<tr><td>ur stuff here</td></tr>
</table>
<tr><td>ur stuff here</td></tr>
</table>
<tr><td>ur stuff here</td></tr>
</table>

your </table> must be placed in the FooterTemplate or your <table> in the
itemtemplate..
Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"Matt Mercer" <ma******@bellsouth.net> wrote in message
news:37**************************@posting.google.c om...
Hi,

I have an ASP .NET /VB application over a SQL database. I am designing
a print friendly page. The database holds security incidents with the
possibility of multiple (or none) people, and property attached to the
incident. There is an incident table, person table, and property table
all tied together by the incident number. When someone hits the print
button I open a new page and use 3 datarepeaters to display the data.
What happens is this:

For example, If I have more than one person tied to an incident, the
repeater goes through one time and displays my data perfectly the way
I have laid the table out. The second person appears all jumbled with
no formatting though. Here is an example:

Person
Name: matt Involvement: Contact Status: Contractor

Employer: motorola Employee ID: 0987654321
Employer Address: 1000 west Employer Phone #: 0987654321
Department: ep809 Supervisor: george Shift: first

Home Address: 2000 east Home Phone: 0987654321 Pager: 0987654321

Notes: more notes
Name:george Involvement:Reported By Status:Other Employer:motorola
Employee ID:1234 Employer Address:8000 west sunrise Employer Phone
#:1234567890 Department:et555 Supervisor:me Shift:first Home
Address:7000 west university Home Phone:1234567890 Pager:1234567890
Notes:my notes

****Hard to see with copy and paste but you should get the picture
that the first person has some formatting while the second is just
fields of data crammed together. I am using a select statement and a
repeater bound to a datareader. Here is the repeater code. Any help is
appreciated. Thanks.

<asp:Repeater id="rptPrintFriendlyPerson" runat="server">
<HeaderTemplate>
<table width="100%">
<tr align="center" bgcolor="#0000FF"><td colspan="6" >
<font color="#FFFFFF">Person</font>
</td></tr>
</HeaderTemplate>
<itemtemplate>

<tr>
<td><b>Name:</b></td><td><%# Container.DataItem("person_name")
%></td>
<td><b>Involvement:</b></td><td><%#
Container.DataItem("involvement") %></td>
<td><b>Status:</b></td><td><%# Container.DataItem("person_status")
%></td>
</tr>

<tr><td>&nbsp;</td></tr>

<tr>
<td><b>Employer:</b></td><td><%# Container.DataItem("employer")
%></td>
<td><b>Employee ID:</b></td><td><%#
Container.DataItem("employee_id") %></td>
</tr>

<tr>
<td><b>Employer Address:</b></td><td><%#
Container.DataItem("employer_address") %></td>
<td><b>Employer Phone #:</b></td><td><%#
Container.DataItem("employer_phone") %></td>
</tr>

<tr>
<td><b>Department:</b></td><td><%# Container.DataItem("department")
%></td>
<td><b>Supervisor:</b></td><td><%# Container.DataItem("supervisor")
%></td>
<td><b>Shift:</b></td><td><%# Container.DataItem("shift") %></td>
</tr>

<tr><td>&nbsp;</td></tr>

<tr>
<td><b>Home Address:</b></td><td><%#
Container.DataItem("home_address") %></td>
<td><b>Home Phone:</b></td><td><%# Container.DataItem("home_phone")
%></td>
<td><b>Pager:</b></td><td><%# Container.DataItem("pager") %></td>
</tr>

<tr><td>&nbsp;</td></tr>

<tr>
<td><b>Notes:</b></td><td><%# Container.DataItem("person_notes")
%></td>
</tr>
</table>
</itemtemplate>
</asp:repeater>


Nov 18 '05 #3
Yup...where I placed my <table> tag was the problem. Thanks!

"Shatdal Priya" <ks***********@ismnet.com> wrote in message news:<u2**************@TK2MSFTNGP15.phx.gbl>...
Go to
my article : http://www.code101.com/Code101/Displ...le.aspx?cid=43
"Karl Seguin" <karl REMOVE @ REMOVE openmymind REMOVEMETOO . ANDME net>
wrote in message news:uv**************@TK2MSFTNGP09.phx.gbl...
Matt,
there appears tobe some pretty basic HTML errors.

For example,
your first row has 6 columns, your 2nd one has 1 and your 3rd has

4...you'll
need to throw in some colspans.

Also, you open your <Table> in the headertemplate (happens once) and you
close it in your itemtemplate (happens once per row). so you'll end up

with.
<table>
<tr><td>ur stuff here</td></tr>
</table>
<tr><td>ur stuff here</td></tr>
</table>
<tr><td>ur stuff here</td></tr>
</table>
<tr><td>ur stuff here</td></tr>
</table>
<tr><td>ur stuff here</td></tr>
</table>

your </table> must be placed in the FooterTemplate or your <table> in the
itemtemplate..
Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"Matt Mercer" <ma******@bellsouth.net> wrote in message
news:37**************************@posting.google.c om...
Hi,

I have an ASP .NET /VB application over a SQL database. I am designing
a print friendly page. The database holds security incidents with the
possibility of multiple (or none) people, and property attached to the
incident. There is an incident table, person table, and property table
all tied together by the incident number. When someone hits the print
button I open a new page and use 3 datarepeaters to display the data.
What happens is this:

For example, If I have more than one person tied to an incident, the
repeater goes through one time and displays my data perfectly the way
I have laid the table out. The second person appears all jumbled with
no formatting though. Here is an example:

Person
Name: matt Involvement: Contact Status: Contractor

Employer: motorola Employee ID: 0987654321
Employer Address: 1000 west Employer Phone #: 0987654321
Department: ep809 Supervisor: george Shift: first

Home Address: 2000 east Home Phone: 0987654321 Pager: 0987654321

Notes: more notes
Name:george Involvement:Reported By Status:Other Employer:motorola
Employee ID:1234 Employer Address:8000 west sunrise Employer Phone
#:1234567890 Department:et555 Supervisor:me Shift:first Home
Address:7000 west university Home Phone:1234567890 Pager:1234567890
Notes:my notes

****Hard to see with copy and paste but you should get the picture
that the first person has some formatting while the second is just
fields of data crammed together. I am using a select statement and a
repeater bound to a datareader. Here is the repeater code. Any help is
appreciated. Thanks.

<asp:Repeater id="rptPrintFriendlyPerson" runat="server">
<HeaderTemplate>
<table width="100%">
<tr align="center" bgcolor="#0000FF"><td colspan="6" >
<font color="#FFFFFF">Person</font>
</td></tr>
</HeaderTemplate>
<itemtemplate>

<tr>
<td><b>Name:</b></td><td><%# Container.DataItem("person_name")
%></td>
<td><b>Involvement:</b></td><td><%#
Container.DataItem("involvement") %></td>
<td><b>Status:</b></td><td><%# Container.DataItem("person_status")
%></td>
</tr>

<tr><td>&nbsp;</td></tr>

<tr>
<td><b>Employer:</b></td><td><%# Container.DataItem("employer")
%></td>
<td><b>Employee ID:</b></td><td><%#
Container.DataItem("employee_id") %></td>
</tr>

<tr>
<td><b>Employer Address:</b></td><td><%#
Container.DataItem("employer_address") %></td>
<td><b>Employer Phone #:</b></td><td><%#
Container.DataItem("employer_phone") %></td>
</tr>

<tr>
<td><b>Department:</b></td><td><%# Container.DataItem("department")
%></td>
<td><b>Supervisor:</b></td><td><%# Container.DataItem("supervisor")
%></td>
<td><b>Shift:</b></td><td><%# Container.DataItem("shift") %></td>
</tr>

<tr><td>&nbsp;</td></tr>

<tr>
<td><b>Home Address:</b></td><td><%#
Container.DataItem("home_address") %></td>
<td><b>Home Phone:</b></td><td><%# Container.DataItem("home_phone")
%></td>
<td><b>Pager:</b></td><td><%# Container.DataItem("pager") %></td>
</tr>

<tr><td>&nbsp;</td></tr>

<tr>
<td><b>Notes:</b></td><td><%# Container.DataItem("person_notes")
%></td>
</tr>
</table>
</itemtemplate>
</asp:repeater>


Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Peter Kirk | last post by:
Hi are there any "gotchas" with using an asp:repeater that means that the "onclick" method of a LinkButton created in the repaeter does not fire? I at least cannot get it to work. I have a...
0
by: Rob Meade | last post by:
Hi all, Ok - I need to plonk a repeater in my form which is using a template (table and series of web user controls)...as a result I have something like this (short version) <table> <tr>...
0
by: Ludmal | last post by:
hi I have a xml file and I want to bind it to a nested repeaters. but the problem I'm having is now I cannot give reference to xml nodes inside the repeater.. pls advice me .. the problem is in...
4
by: nicholas | last post by:
Got an asp.net data-repeater on my page. I can view the texts from the database (ex.: <%# Databinder.Eval(Container.DataItem, "contentEN") %> ), but I also would like to see the image, but only if...
4
by: Harry | last post by:
Hello, I have a Repeater control that contains a Label control inside its ItemTemplate. A dummy mockup of the HTML code looks as follows: <asp:repeater id="StyleRepeater" Runat="server">...
0
by: Reza Nabi | last post by:
Dear All: Banckgroud: I have a datagrid which lives inside a repeater. Which is working fine. What i need is to dyanamically set the column width of the grid (which lieves inside the repeater)....
2
by: fredda054 | last post by:
Hi everybody ! I need some advice about a repeater... I have a repeater on a website displaying a list of hyperlinks. The url's of these hyperlinks are all stored in a database. everything's...
2
by: Tarun Mistry | last post by:
Hi everyone, a simple problem I hope you guys can help me with. I have a repeater control, within this i would like to place another server control. I.e. <asp:Repeater id="Repeater1"...
2
by: ASF | last post by:
Hey all, I have a gridview which pulls from a BLL which pulls from a DAL (an .XSD file). Each row on that gridview has a nested repeater which pulls from another table. The code which populates...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.