|  | Posted by Andy Dingley on 07/31/06 15:42 
Ian Davies wrote:
 > I would appreciate some help from someone who has knowledge of working with
 > css, php javascript and how they interact.
 
 They don't - or at least they shouldn't.  As far as possible, keep them
 separate -- life will be easier that way.
 
 Avoid JavaScript. Just not needed, or useful.
 
 Start by writing SQL to collect the data you're after. Doesn't need to
 be done through the web yet, you can easily do this through a SQL
 client tool.
 
 Spew your report's content out crudely into some sort of text editor
 (maybe copy-and-paste through the SQL client).  Now make it into a HTML
 document. Don't worry too much looks as yet, just get all the content
 you need represented as good clean HTML with meaningful markup and no
 attempt at presentation.  You don't even need all the data - just a
 page or so. Don't be afraid to include data you don't want to appear,
 such as repeated header values for each section - we can always hide
 them with CSS later.
 
 Now add CSS.  Take your boring pure HTML document and add a stylesheet
 to it. Revise the HTML as needed, such as by adding classes to get the
 presentation control you need. Classes such as "odd" and "even" are
 well worth having on rows, even if you're not yet sure you need them.
 Then do some little extras with a print media stylesheet to make sure
 it prints well (text sizes in points, maybe some extra headers,
 page-break-after: avoid; should already be in there).
 
 Your report should now look and print perfectly. Work on it until it
 does.
 
 Only then, convert the HTML document to PHP that calls the SQL.  You
 should now have a dynamic document with live data and perfect
 formatting.  Make sure you call .HTMLEncode() where needed, in case
 there are entity refeferences etc. needed between database and HTML.
 Check that it works and debug as needed.
  Navigation: [Reply to this message] |