Notes from Dean Harmon's presentation on CFDOCUMENT/CFREPORT:
cfdocument
Stressed the importance of "complete" HTML documents.
Each cfdocumentsection needs to be a complete HTML doc.
Well formced CSS works file. Border Collapse and Float-Left do not.
cfdcoument src attribute is BETTER than using cfhttp to suck down the contents.
Multiple header/footers will not work. Only the last one will win.
Therefore, use documentsection. But it forces a page break.
It's a CF bug that will hopefully be fixed.
cfreport
Most things in CFR are expressions.
Use same logic as what you could put in Evaluate().
Cant use tags, but could use IIF(), with DE().
You can use tag syntax in a cfr using Report Functions.
Richer and conditional formatting
7.0 - not optimal.
7.01 - things are a bit better. basic html support, must be xhtml compliant, does not work in FP.
Support will be improved in the future.
Making decent excel files
Spaces are very important.
Use zoom.
Simpler layout is best.
"Fancy formatting makes for funky files"
Don't use number formatting as excel will treat them as strings, not numbers.
parameters,br> Params are uni-directional. Data can go from cfm to cfr. From master report to child report. You CANT pass from cfr to cfm. You cANT pass from child to master. You can use the shared scopes to get around this, ie, child report can set request variable.
how to force a page break
Make a cfr called cfreport_pagebreak.cfr - see his preso for more notes on the fix. (It's involved.)
Archived Comments
I've seen some issues on the forums related to cfdocument "hanging". Some users have suggested that this can be a result of bad or incomplete HTML. We are experiencing cfdocument "hanging" now. Do you think this could be a cause? I can't say for 100% that there is not a single syntax problem in the HTML, but I am surprised it would completely hang up all of our cfdocument generation tasks.
Ray,
Thanks for giving us a glimpse of what's going on at MAX. Not all of us can make the conferences, and it's good to get a report of what's going on. It seems that nowadays that most of us that don't get to go to all the various CF related conferences are pretty much SOL or left in the dark as to what gets presented or discussed.
Not too long ago, this wasn't the case, it seemed that a lot more people would give rundowns on what went on and/or provide some of the sample codes. Now it seems that maybe 1, or at most 2 people will blog about it, and we don't get to see any snippets anymore.
Thanks again for this report and for the "ask a jedi" section. They are really invaluable and I look forward to them every day.
-A
As far as multiple header / footer, we came up with something fairly great as a "hack" for this issue. While we cannot use page numbers as part of CFIF statements, we CAN USE THEM as part of CSS class name:
<style>
div.footer div.f1 { display: none; }
div.footer div.f2 { display: block ; }
div.footer div.page1 div.f1 { display: block; }
div.footer div.page1 div.f2 { display: none ; }
</style>
<div class="footer">
<div class="page#CFDOCUMENT.CurrentPageNumber#">
<div class="f1">
Footer version ONE
</div>
<div class="f2">
Footer version TWO
</div>
</div>
</div>
Follow up to my last comment: ONLY WORKS if CSS classes are declared IN THE FOOTER ITEM.