473,217 Members | 1,966 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,217 software developers and data experts.

Problem printing a table

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
7 1652
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
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
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
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
<%@ 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
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

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: gb | last post by:
Hi All, Ive created a popup page using 'var openWindow = window.open("new","pop")' And added content using openWindow.document.write(" "); statements. But now I would like to be able to print...
0
by: Chang Shiung | last post by:
Hi We have discovered a problem when printing web pages in Internet Explorer 6 (IE6) that have HTML sources like this <TABLE ....><TR><TD><TABLE .... that spans more than one page...
2
by: mark | last post by:
I have one page with a series of reports to be printed like :- (bear with me ill try to explain the best i can!) report one - checkbox1 report two - checkbox2 report three - checkbox3 and...
1
by: Smitha Nataraj | last post by:
Hello, Please let me know if you have the solution for a similar kind of problem... Background: I have an aspx page which is used as a report i.e. will be used for printing some information....
1
by: Trev | last post by:
Hi, I'm hoping that someone in this group can shed some light on an issue I'm having with a Formview. I have a Web User Control (.ascx) with a Formview. The Formview contains 2 Multiviews,...
1
by: seralasu | last post by:
Hi, I have a html table. Iwant to print but if html table size is bigger than A4 paper then it is printing half of the row and another half part is printing other pages. So I want to print that...
2
by: coldblood22 | last post by:
Well in my Application i am using the java Printable interface to print the GUI. The printing is done fine but once done with the printing my program breaks off with the database file without. Well...
0
by: gnewsgroup | last post by:
In my asp.net 2.0 web application. I create chart images on the fly by getting the data from the database. These chart images all have fixed width, but the height is dynamic depending on the...
5
by: NoOneCanHelpMe | last post by:
Hello everyone, could someone help me please, I want to print out the frequency of each vowel in the string and I think I will need to use the hash table I already have but im not sure how to do it...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...

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.