page formatting problem with tables and datagrids - especially printing

M

mark

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
 
G

Guest

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
 
M

mark

Bin Song said:
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"> said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top