Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > page formatting problem with tables and datagrids - especially printing

Reply
Thread Tools

page formatting problem with tables and datagrids - especially printing

 
 
mark
Guest
Posts: n/a
 
      06-08-2004
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


 
Reply With Quote
 
 
 
 
=?Utf-8?B?QmluIFNvbmcsIE1DUA==?=
Guest
Posts: n/a
 
      06-08-2004
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
 
Reply With Quote
 
 
 
 
mark
Guest
Posts: n/a
 
      06-09-2004

"Bin Song, MCP" <> wrote in message
news:FFA83756-AF70-4EEC-81A5-...
> 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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Modules for PDFs especially tables. Justin C Perl Misc 12 01-29-2010 07:57 AM
especially strange "The page cannot be displayed" error spam1@aleksiuk.com ASP .Net 2 10-18-2006 03:27 PM
Weird anomaly when printing datagrids? Dan ASP .Net 0 02-01-2006 03:08 PM
Formatting Datasets (and a quick question on datagrids) Mike Fellows ASP .Net 0 03-03-2004 04:50 PM
Formatting datagrids at run time coleenholley ASP .Net 2 01-30-2004 04:39 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57