Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display a break between date groupings....HELP

Status
Not open for further replies.

charbrad

Technical User
Nov 7, 2002
132
US
I have been trying to display a break between date groupings without luck (using ASP Classic). I have tried many suggestions found in FAQ's or by searching Google..but nothing that works. It must be something that I am doing wrong...can someone help?

Code:
body = "<HTML[b]<STYLE TYPE=""text/css"">P.breakhere {page-break-after: always}</STYLE>[/b]<style type=""text/css""><!-- TD{font-size : 10px;font-family : verdana, 

helvetica, arial, sans-serif; color : #333333; margin-left : 2em;}--></style><BODY BGCOLOR=#ffffff><TABLE BORDER=1 BORDERCOLOR=#AAAAAA CELLPADDING=0 

CELLSPACING=0>"
body = body + "<TR><TD ALIGN=""CENTER"" BGCOLOR=""#99CC99"" COLSPAN=11><B>TITLE</TD></TR>"
body = body + "<TR><TD ALIGN=""CENTER"" BGCOLOR=""#99CC99""><B>COLUMN1</TD><TD ALIGN=""CENTER"" BGCOLOR=""#99CC99""><B>COLUMN2</TD><TD 

ALIGN=""CENTER"" BGCOLOR=""#99CC99""><B>COLUMN3</TD><TD ALIGN=""CENTER"" BGCOLOR=""#99CC99""><B>COLUMN4</TD><TD ALIGN=""CENTER"" 

BGCOLOR=""#99CC99""><B>COLUMN5</TD><TD ALIGN=""CENTER"" BGCOLOR=""#99CC99""><B>COLUMN6</TD><TD ALIGN=""CENTER"" BGCOLOR=""#99CC99""><B>COLUMN7</TD><TD 

ALIGN=""CENTER"" BGCOLOR=""#99CC99""><B>COLUMN8</TD><TD ALIGN=""CENTER"" BGCOLOR=""#99CC99""><B>COLUMN9</TD><TD ALIGN=""CENTER"" 

BGCOLOR=""#99CC99""><B>COLUMN10</TD><TD ALIGN=""LEFT"" BGCOLOR=""#99CC99""><B>COLUMN11</TD></TR>"
SHADE = "#FFFFFF"
Code:
IF MyArray(3,MyCursor) <= Date() then
body = body + "<TR><TD BGCOLOR=""" & SHADE & """>" & MyArray(0,MyCursor) & "&nbsp;</TD><TD WIDTH=300 ALIGN=""CENTER"" BGCOLOR=""" & SHADE & """>" & 

MyArray(1,MyCursor) & "</TD><TD BGCOLOR=""" & SHADE & """>" & MyArray(2,MyCursor) & "&nbsp;<TD ALIGN=""RIGHT"" BGCOLOR=""" & SHADE & """>" & 

MyArray(3,MyCursor) & "</TD><TD ALIGN=""RIGHT"" BGCOLOR=""" & SHADE & """>" & MyArray(4,MyCursor) & "</TD><TD ALIGN=""RIGHT"" BGCOLOR=""" & SHADE & """>" & 

MyArray(5,MyCursor) & "</TD><TD ALIGN=""CENTER"" BGCOLOR=""" & SHADE & """>" & MyArray(6,MyCursor) & "</TD><TD ALIGN=""CENTER"" BGCOLOR=""" & SHADE & """>" & 

MyArray(7,MyCursor) & "</TD><TD ALIGN=""CENTER"" BGCOLOR=""" & SHADE & """>" & MyArray(8,MyCursor) & " </TD><TD ALIGN=""CENTER"" BGCOLOR= """ & SHADE & """>" 

& MyArray(9,MyCursor) & " </TD><TD ALIGN=""CENTER"" BGCOLOR=""" & SHADE & """><B>" & MyArray(10,MyCursor) & " </TD>[b]<P.CLASS:"breakhere">[/b]</TR>"
 
This is actually not an ASP question.

Your page may contain ASP logic, and that logic may determine where to insert the break, but the problem is not the server-side logic.

This is an issue of CSS and HTML so leave the term "ASP" out of any searches.


OK, that said I see there is a missing [red]>[/red] character:[tt]
body = "<HTML[red]>[/red]<STYLE TYPE=""text/css"">P.bre ...[/tt]


Also you might want this:[tt]
<P.CLASS:"breakhere">[/tt]

To look like this: [tt]
<P CLASS="breakhere">[/tt]
 
Yes, I would:
A) Look at CSS (use <div> or <span>)
B) Make all HTML in lowercase
C) Make sure you close all your tags

I am not sure what you mean with break between the date groupings?

But if you mean that you have results like:

11/05-82 11/05-82 22/05-82

Here there are two different results, if you want to break only when there is a new result, you could do this by comparing the previous date-value with th e current.

You would need a "holding variable" for the previous recordset row.

Olav Alexander Mjelde
Admin & Webmaster
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top