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

page formatting problem with tables and datagrids - especially printing

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 so on

finally a button to process the reports is pressed
which sends true for each report needed to a reports page

which is set out like this :-

label1
datagrid1
label2

label3
datagrid2
label4

label5
datagrid3
label6

these are all in a table and set to visible - false
i set them to visible from the true response passed from the other page

works great - i can have all reports on a page and switch them off and on at
will - problem is when it comes to printing
when the labels/datagrids have been set to visible = false theres a lot of
empty table tags - which causes the bottomost reports
to print half way down the page

eg

<TR>
<TD>

</TD>
</TR>
<TR>
<TD></TD>
</TR>
<TR>
<TD></TD>
</TR>
<TR>
<TD></TD>
</TR>
<TR>

is there anyway of disposing of these blank rows before printing ?

thanks

mark
Nov 18 '05 #1
2 1309
You might try this
replace the table with ASP:Table and set the related TableCell and TableRow to invisible when you set the label and datagrid to invisible
<asp:Table id="Table2" runat="server"><asp:TableRow ID="tr1"><asp:TableCell ID="tc1"
label
datagrid
label
</asp:TableCell></asp:TableRow><asp:TableRow ID="tr2"><asp:TableCell ID="tc2"
label
datagrid
label
</asp:TableCell></asp:TableRow><asp:TableRow ID="tr3"><asp:TableCell ID="tc3"
label
datagrid
label
</asp:TableCell></asp:TableRow></asp:Table

If 1 is invisble the
tc1.Visible = Fals
tr1.Visible = Fals
End If
Nov 18 '05 #2

"Bin Song, MCP" <an*******@discussions.microsoft.com> wrote in message
news:FF**********************************@microsof t.com...
You might try this:
replace the table with ASP:Table and set the related TableCell and TableRow to invisible when you set the label and datagrid to invisible. <asp:Table id="Table2" runat="server"><asp:TableRow ID="tr1"><asp:TableCell ID="tc1"> label1
datagrid1
label2
</asp:TableCell></asp:TableRow><asp:TableRow ID="tr2"><asp:TableCell ID="tc2"> label3
datagrid2
label4
</asp:TableCell></asp:TableRow><asp:TableRow ID="tr3"><asp:TableCell ID="tc3"> label5
datagrid3
label6
</asp:TableCell></asp:TableRow></asp:Table>

If 1 is invisble then
tc1.Visible = False
tr1.Visible = False
End If


ill try that thanks!

mark
Nov 18 '05 #3

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

Similar topics

4
by: Rob Meade | last post by:
Hi all, Ok - this leads on from speaking to a couple here and in the SQL server group... I've an application which allows the user to type in their text into a form, they add 'happy' tags...
12
by: Jim H | last post by:
We ahve a .NET web page that we dynamically create a bunch of DataGrids and add them to a place holder. When the user hits submit we need to go through all of the DataGrids to get some data. We...
1
by: Jason Shohet | last post by:
Someone in my group created an aspx with 12 tables on it, each with several rows in the table. In codebehind, we often make 1 or more tables visible / invisible. (However within each table, there...
0
by: Mike Fellows | last post by:
i have a function (shown below) that accepts a web datagrid and populates it with a dataset when i display my datagrid it shows the date as 00/00/0000 00:00:00 i need to format the time from...
2
by: Philip Rayne | last post by:
I have 2 datagrids, both with databound columns that I have dynamically added. I have an EditCommandColumn on both grids. EnableViewState is enabled on both of the grids. When I click the edit...
5
by: tshad | last post by:
I have been trying to figure out what the Datagrid is doing to create its formatting. I found that some of my Datagrids have a 3D type of border and sometime it has a straight line. I finally...
4
by: Mr. B | last post by:
In VB.net, if you set up a print routine... and all works fine (including a print preview)... setting the Page # (1, 2, 3, 4, etc) is easy. HOW can you get the final number of pages? Such as...
4
by: Ed Jay | last post by:
I generate a DHTML page (a medical report) with dynamically generated text based on user input (answers to questions). The page length changes dynamically. I desire that when the page is printed...
5
by: Andreas Prilop | last post by:
Firefox 3 (like older versions) ignores TR { page-break-before: always } for the first row of a TBODY. Sample page: http://www.unics.uni-hannover.de/nhtcapri/temp/1000.html Choose "Print...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.