By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,996 Members | 1,051 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,996 IT Pros & Developers. It's quick & easy.

Problem printing a table

P: n/a
Hello!

I have a wecontrol table in a page, this table has a number of variable
rows depending of the choice of the user.

But when the table has a large number of rows, the printing of the page
requires 2 pages . The first page is ok, but in the second page of the
printing I have no ligne of the row and no ligne of the column printing
on the page!

Any idea ?

Thanks

--
Ceci est une signature automatique de MesNews.
Site : http://www.mesnews.net

Nov 19 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
Once a time, I had a problem like you. But it is hard to guess without
seeing the code. My problem was caused by some additional style attributes
of datagrid(display width and height). I just cleared them.And then it
worked.

--
Thanks,
Yunus Emre ALPÖZEN

"Amirallia" <bn**@bluewin.ch> wrote in message
news:mn***********************@bluewin.ch...
Hello!

I have a wecontrol table in a page, this table has a number of variable
rows depending of the choice of the user.

But when the table has a large number of rows, the printing of the page
requires 2 pages . The first page is ok, but in the second page of the
printing I have no ligne of the row and no ligne of the column printing on
the page!

Any idea ?

Thanks

--
Ceci est une signature automatique de MesNews.
Site : http://www.mesnews.net

Nov 19 '05 #2

P: n/a
Yunus Emre ALPÖZEN a émis l'idée suivante :
Once a time, I had a problem like you. But it is hard to guess without seeing
the code. My problem was caused by some additional style attributes of
datagrid(display width and height). I just cleared them.And then it worked.

--
Thanks,
Yunus Emre ALPÖZEN

"Amirallia" <bn**@bluewin.ch> wrote in message
news:mn***********************@bluewin.ch...
Hello!

I have a wecontrol table in a page, this table has a number of variable
rows depending of the choice of the user.

But when the table has a large number of rows, the printing of the page
requires 2 pages . The first page is ok, but in the second page of the
printing I have no ligne of the row and no ligne of the column printing on
the page!

Any idea ?

Thanks

-- Ceci est une signature automatique de MesNews.
Site : http://www.mesnews.net


But I don't have a datagrid but a table, I add rows to this table with
source code

here is the code:

Sub CreateLine(ByVal pNbrLine As Integer)
Dim i, j As Integer
Dim lRows As TableRow

Try
For i = 1 To pNbrLine
lRows = New TableRow
For j = 1 To 63
Dim lCellVide As New TableCell
lRows.Cells.Add(lCellVide)
Next
Table1.Rows.Add(lRows)
Next

Catch ex As Exception
End Try
End Sub

--
Ceci est une signature automatique de MesNews.
Site : http://www.mesnews.net

Nov 19 '05 #3

P: n/a
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
CreateLine(100)
End Sub
Sub CreateLine(ByVal pNbrLine As Integer)
Dim i, j As Integer
Dim lRows As TableRow

Try
For i = 1 To pNbrLine
lRows = New TableRow
For j = 1 To 63
Dim lCellVide As New TableCell
lCellVide.Text = i & "," & j
lRows.Cells.Add(lCellVide)
Next
Table1.Rows.Add(lRows)
Next

Catch ex As Exception
Response.Write(ex.Message)
End Try
End Sub

I modified your code as follows and I remove style attribute of the table
that is generated by VS.NET from HTML View. And It prints whole 3 pages. I
think your problem is similar caused by style attributes...

Am I right ?
--
Thanks,
Yunus Emre ALPÖZEN

"Amirallia" <bn**@bluewin.ch> wrote in message
news:mn***********************@bluewin.ch...
Yunus Emre ALPÖZEN a émis l'idée suivante :
Once a time, I had a problem like you. But it is hard to guess without
seeing the code. My problem was caused by some additional style
attributes of datagrid(display width and height). I just cleared them.And
then it worked.

--
Thanks,
Yunus Emre ALPÖZEN

"Amirallia" <bn**@bluewin.ch> wrote in message
news:mn***********************@bluewin.ch...
Hello!

I have a wecontrol table in a page, this table has a number of variable
rows depending of the choice of the user.

But when the table has a large number of rows, the printing of the page
requires 2 pages . The first page is ok, but in the second page of the
printing I have no ligne of the row and no ligne of the column printing
on the page!

Any idea ?

Thanks

-- Ceci est une signature automatique de MesNews.
Site : http://www.mesnews.net


But I don't have a datagrid but a table, I add rows to this table with
source code

here is the code:

Sub CreateLine(ByVal pNbrLine As Integer)
Dim i, j As Integer
Dim lRows As TableRow

Try
For i = 1 To pNbrLine
lRows = New TableRow
For j = 1 To 63
Dim lCellVide As New TableCell
lRows.Cells.Add(lCellVide)
Next
Table1.Rows.Add(lRows)
Next

Catch ex As Exception
End Try
End Sub

--
Ceci est une signature automatique de MesNews.
Site : http://www.mesnews.net

Nov 19 '05 #4

P: n/a
Yunus Emre ALPÖZEN a exprimé avec précision :
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
CreateLine(100)
End Sub
Sub CreateLine(ByVal pNbrLine As Integer)
Dim i, j As Integer
Dim lRows As TableRow

Try
For i = 1 To pNbrLine
lRows = New TableRow
For j = 1 To 63
Dim lCellVide As New TableCell
lCellVide.Text = i & "," & j
lRows.Cells.Add(lCellVide)
Next
Table1.Rows.Add(lRows)
Next

Catch ex As Exception
Response.Write(ex.Message)
End Try
End Sub

I modified your code as follows and I remove style attribute of the table
that is generated by VS.NET from HTML View. And It prints whole 3 pages. I
think your problem is similar caused by style attributes...

Am I right ?
--
Thanks,
Yunus Emre ALPÖZEN

"Amirallia" <bn**@bluewin.ch> wrote in message
news:mn***********************@bluewin.ch...
Yunus Emre ALPÖZEN a émis l'idée suivante :
Once a time, I had a problem like you. But it is hard to guess without
seeing the code. My problem was caused by some additional style attributes
of datagrid(display width and height). I just cleared them.And then it
worked.

--
Thanks,
Yunus Emre ALPÖZEN

"Amirallia" <bn**@bluewin.ch> wrote in message
news:mn***********************@bluewin.ch...
Hello!

I have a wecontrol table in a page, this table has a number of variable
rows depending of the choice of the user.

But when the table has a large number of rows, the printing of the page
requires 2 pages . The first page is ok, but in the second page of the
printing I have no ligne of the row and no ligne of the column printing
on the page!

Any idea ?

Thanks

-- Ceci est une signature automatique de MesNews.
Site : http://www.mesnews.net


But I don't have a datagrid but a table, I add rows to this table with
source code

here is the code:

Sub CreateLine(ByVal pNbrLine As Integer)
Dim i, j As Integer
Dim lRows As TableRow

Try
For i = 1 To pNbrLine
lRows = New TableRow
For j = 1 To 63
Dim lCellVide As New TableCell
lRows.Cells.Add(lCellVide)
Next
Table1.Rows.Add(lRows)
Next

Catch ex As Exception
End Try
End Sub

-- Ceci est une signature automatique de MesNews.
Site : http://www.mesnews.net


Where do you remove style attributes ? In the HTML code?

Any example ?

--
Ceci est une signature automatique de MesNews.
Site : http://www.mesnews.net

Nov 19 '05 #5

P: n/a
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb"
Inherits="SampleVB.WebForm1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body>
<form id="Form1" method="post" runat="server">
<asp:Table id="Table1" runat="server"></asp:Table>
</form>
</body>
</HTML>
--------------------------------
Public Class WebForm1
Inherits System.Web.UI.Page

#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()

End Sub
Protected WithEvents Table1 As System.Web.UI.WebControls.Table

'NOTE: The following placeholder declaration is required by the Web Form
Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub

#End Region

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
CreateLine(100)
End Sub
Sub CreateLine(ByVal pNbrLine As Integer)
Dim i, j As Integer
Dim lRows As TableRow

Try
For i = 1 To pNbrLine
lRows = New TableRow
For j = 1 To 63
Dim lCellVide As New TableCell
lCellVide.Text = i & "," & j
lRows.Cells.Add(lCellVide)
Next
Table1.Rows.Add(lRows)
Next

Catch ex As Exception
Response.Write(ex.Message)
End Try
End Sub
End Class

--
Thanks,
Yunus Emre ALPÖZEN

"Amirallia" <bn**@bluewin.ch> wrote in message
news:mn***********************@bluewin.ch...
Yunus Emre ALPÖZEN a exprimé avec précision :
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
CreateLine(100)
End Sub
Sub CreateLine(ByVal pNbrLine As Integer)
Dim i, j As Integer
Dim lRows As TableRow

Try
For i = 1 To pNbrLine
lRows = New TableRow
For j = 1 To 63
Dim lCellVide As New TableCell
lCellVide.Text = i & "," & j
lRows.Cells.Add(lCellVide)
Next
Table1.Rows.Add(lRows)
Next

Catch ex As Exception
Response.Write(ex.Message)
End Try
End Sub

I modified your code as follows and I remove style attribute of the table
that is generated by VS.NET from HTML View. And It prints whole 3 pages.
I think your problem is similar caused by style attributes...

Am I right ?
--
Thanks,
Yunus Emre ALPÖZEN

"Amirallia" <bn**@bluewin.ch> wrote in message
news:mn***********************@bluewin.ch...
Yunus Emre ALPÖZEN a émis l'idée suivante :
Once a time, I had a problem like you. But it is hard to guess without
seeing the code. My problem was caused by some additional style
attributes of datagrid(display width and height). I just cleared
them.And then it worked.

--
Thanks,
Yunus Emre ALPÖZEN

"Amirallia" <bn**@bluewin.ch> wrote in message
news:mn***********************@bluewin.ch...
> Hello!
>
> I have a wecontrol table in a page, this table has a number of
> variable rows depending of the choice of the user.
>
> But when the table has a large number of rows, the printing of the
> page requires 2 pages . The first page is ok, but in the second page
> of the printing I have no ligne of the row and no ligne of the column
> printing on the page!
>
> Any idea ?
>
> Thanks
>
> -- Ceci est une signature automatique de MesNews.
> Site : http://www.mesnews.net
>

But I don't have a datagrid but a table, I add rows to this table with
source code

here is the code:

Sub CreateLine(ByVal pNbrLine As Integer)
Dim i, j As Integer
Dim lRows As TableRow

Try
For i = 1 To pNbrLine
lRows = New TableRow
For j = 1 To 63
Dim lCellVide As New TableCell
lRows.Cells.Add(lCellVide)
Next
Table1.Rows.Add(lRows)
Next

Catch ex As Exception
End Try
End Sub

-- Ceci est une signature automatique de MesNews.
Site : http://www.mesnews.net


Where do you remove style attributes ? In the HTML code?

Any example ?

--
Ceci est une signature automatique de MesNews.
Site : http://www.mesnews.net

Nov 19 '05 #6

P: n/a
Le 28.01.2005, Yunus Emre ALPÖZEN a supposé :
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb"
Inherits="SampleVB.WebForm1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body>
<form id="Form1" method="post" runat="server">
<asp:Table id="Table1" runat="server"></asp:Table>
</form>
</body>
</HTML>
--------------------------------
Public Class WebForm1
Inherits System.Web.UI.Page

#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()

End Sub
Protected WithEvents Table1 As System.Web.UI.WebControls.Table

'NOTE: The following placeholder declaration is required by the Web Form
Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub

#End Region

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
CreateLine(100)
End Sub
Sub CreateLine(ByVal pNbrLine As Integer)
Dim i, j As Integer
Dim lRows As TableRow

Try
For i = 1 To pNbrLine
lRows = New TableRow
For j = 1 To 63
Dim lCellVide As New TableCell
lCellVide.Text = i & "," & j
lRows.Cells.Add(lCellVide)
Next
Table1.Rows.Add(lRows)
Next

Catch ex As Exception
Response.Write(ex.Message)
End Try
End Sub
End Class

--
Thanks,
Yunus Emre ALPÖZEN

"Amirallia" <bn**@bluewin.ch> wrote in message
news:mn***********************@bluewin.ch...
Yunus Emre ALPÖZEN a exprimé avec précision :
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
CreateLine(100)
End Sub
Sub CreateLine(ByVal pNbrLine As Integer)
Dim i, j As Integer
Dim lRows As TableRow

Try
For i = 1 To pNbrLine
lRows = New TableRow
For j = 1 To 63
Dim lCellVide As New TableCell
lCellVide.Text = i & "," & j
lRows.Cells.Add(lCellVide)
Next
Table1.Rows.Add(lRows)
Next

Catch ex As Exception
Response.Write(ex.Message)
End Try
End Sub

I modified your code as follows and I remove style attribute of the table
that is generated by VS.NET from HTML View. And It prints whole 3 pages. I
think your problem is similar caused by style attributes...

Am I right ?
--
Thanks,
Yunus Emre ALPÖZEN

"Amirallia" <bn**@bluewin.ch> wrote in message
news:mn***********************@bluewin.ch...
Yunus Emre ALPÖZEN a émis l'idée suivante :
> Once a time, I had a problem like you. But it is hard to guess without
> seeing the code. My problem was caused by some additional style
> attributes of datagrid(display width and height). I just cleared
> them.And then it worked.
>
> --
> Thanks,
> Yunus Emre ALPÖZEN
>
>
>
> "Amirallia" <bn**@bluewin.ch> wrote in message
> news:mn***********************@bluewin.ch...
>> Hello!
>>
>> I have a wecontrol table in a page, this table has a number of variable
>> rows depending of the choice of the user.
>>
>> But when the table has a large number of rows, the printing of the page
>> requires 2 pages . The first page is ok, but in the second page of the
>> printing I have no ligne of the row and no ligne of the column printing
>> on the page!
>>
>> Any idea ?
>>
>> Thanks
>>
>> -- Ceci est une signature automatique de MesNews.
>> Site : http://www.mesnews.net
>>

But I don't have a datagrid but a table, I add rows to this table with
source code

here is the code:

Sub CreateLine(ByVal pNbrLine As Integer)
Dim i, j As Integer
Dim lRows As TableRow

Try
For i = 1 To pNbrLine
lRows = New TableRow
For j = 1 To 63
Dim lCellVide As New TableCell
lRows.Cells.Add(lCellVide)
Next
Table1.Rows.Add(lRows)
Next

Catch ex As Exception
End Try
End Sub

-- Ceci est une signature automatique de MesNews.
Site : http://www.mesnews.net


Where do you remove style attributes ? In the HTML code?

Any example ?

-- Ceci est une signature automatique de MesNews.
Site : http://www.mesnews.net


if I remove style attributes, how can I set the position of my table ?

--
Ceci est une signature automatique de MesNews.
Site : http://www.mesnews.net

Nov 19 '05 #7

P: n/a

You can use flow layout and html tables to design your page... Otherwise, I
ve no idea....
--
Thanks,
Yunus Emre ALPÖZEN
Nov 19 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.