469,950 Members | 2,320 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,950 developers. It's quick & easy.

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 1211
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Jason Shohet | last post: by
reply views Thread by Mike Fellows | last post: by
2 posts views Thread by Philip Rayne | last post: by
5 posts views Thread by tshad | last post: by
4 posts views Thread by Mr. B | last post: by
5 posts views Thread by Andreas Prilop | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.