DavidWSnow
 Basic Member Posts:129
 |
| 09 Feb 2008 05:11 PM |
|
I have been using you fantastic print method for several months now and really like it. While doing a "cleanup" on my site I investigated if I could somehow get rid of "hard coding" the path to the current skin into report.html and maybe make all of the pieces of this live in the skin's directory. I am not a JavaScript nor ASP coder and I was not successful. Before I put much more effort into this can I assume that you considered this during your design and it is not easily possible? I need the skin linked into report.html so that what is being printed renders the same as the screen. With a single report.html per site and the possibility of multiple skins I saw this as a potential problem for me. Also each time I switch skins I need to edit report.html. Regardless this is so much better than DNN's brain-dead printing method - Thanks /DaveS |
|
|
|
|
pauldes
 Veteran Member Posts:1392
 |
| 09 Feb 2008 05:33 PM |
|
what about using an iframe in a listx module? <iframe src="http://[alias,system]/../report.html?yourparameters=xxx></iframe> |
|
| ListX....makes you look brilliant, even though you're not. |
|
|
radcoder1
 New Member Posts:24
 |
| 05 Mar 2008 09:18 PM |
|
I am printing the entire content pane as described in Kevin's post on 10/06/2006 10:08 AM. However, it shows the word "content pane" etc in the printout whenever you are logged in as admin. The problem is that we have several admins (which are needed to maintain user profiles) who need to print. So, I need to remove the text "content pane" from their printouts. Anyone know how to do this? If the text is removed so no one ever saw it even on the site that would be even better. |
|
|
|
|
DavidWSnow
 Basic Member Posts:129
 |
| 05 Mar 2008 09:23 PM |
|
Wrap a div around that you want to print, like a ListX module or two, when use Kevin's method to print that div. As I recall Keven's stuff assumes that a "dnn_" will be prepended to the name of the div so you'll have to but that in the correct place. You can see how I do this on my Listed Homes page http://www.agingsafely.com/ListedHomes/tabid/58/Default.aspx with the "Print Page" button in the bottom module. /DaveS |
|
|
|
|
radcoder1
 New Member Posts:24
 |
| 05 Mar 2008 10:04 PM |
|
Within listX I went to the formatting section and put the following at the beginning of my list:
<div id="TARGETDIV" name="TARGETDIV" >
I also tried <div id="dnn_TARGETDIV" name="dnn_TARGETDIV" >
And then </div> at the end.
However, nothing changed. Am I putting the tag in the wrong place or using the wrong tag?
|
|
|
|
|
DavidWSnow
 Basic Member Posts:129
 |
| 05 Mar 2008 10:15 PM |
|
Note Extra spaces after < and before > to keep Active Forum from eating the code. <div id="dnn_SelectedHomes" > ........ ........ < table > < tr class="DataGrid_Header"> < th > < a href="printcontent('SelectedHomes');" class='cssbutton' > Print Page < /a > < br/ >< br/ > [TOTALRECORDS] Total Records < /th > .......< /tr > ....... rest of table < /table > < /div > Hope that this helps /DaveS |
|
|
|
|
DavidWSnow
 Basic Member Posts:129
 |
| 05 Mar 2008 10:16 PM |
|
Don't forget that you also need the report.html in the root directory. Also I find that I have to adjust the line that links in the style sheet to point ot my current skin. /DaveS |
|
|
|
|
radcoder1
 New Member Posts:24
 |
| 06 Mar 2008 09:56 PM |
|
Thanks - I can make that work for one ListX module - but what if I have several modules in one pane that combine to make one report? I tried putting div tags around those also but seem to just get the first module to show for printing. |
|
|
|
|
DavidWSnow
 Basic Member Posts:129
 |
| 06 Mar 2008 11:25 PM |
|
Put the opening div in the first and the ending div after the last. /DaveS |
|
|
|
|
radcoder1
 New Member Posts:24
 |
| 08 Mar 2008 12:17 AM |
|
That's what I have. However, it looks like DNN is putting extra < /div > tags in the page source that messes things up. So, the extra tags are not even in the XML, it just somehow is inserted by DNN. The code below is from the page source, but neither < /div > is in the XML. In fact, almost all the code below is from DNN. Any suggestions?
< /table > < /div > < script > var CURRENTPAGE714 = 0; var DATALENGTH714 = 0; var TBL714 = false; var XML714 = false; var DATA714 = false; var PGS714 = false; var STATUS714 = false; var S714 = 'lxS=lx&mid=714&tabid=332&tmid=436&lxSrc=dnn_ctr714_xListing'; var WURL714="/REMP_EXP/DesktopModules/ListX/"; var HIDE714 = false; var PGSN714 = 'lxP714'; var STATUSN714 = 'lxS714'; var RPP714 = 0; lxInitiate(714,CURRENTPAGE714,true); </ script > < !-- End_Module_714 -- > < /div >< /TD > < /TR > |
|
|
|
|
DavidWSnow
 Basic Member Posts:129
 |
| 08 Mar 2008 03:09 AM |
|
Just be sure that the the unmatched beg/end div isn't from you or skin or container. I have done both. I have not fond a problem where ListX was the cause. --- yet <img src='desktopmodules/ntforums/images/emoticons/biggrin.gif' height='20' width='20' border='0' title='Big Grin' align='absmiddle'> /DaveS |
|
|
|
|
radcoder1
 New Member Posts:24
 |
| 10 Mar 2008 05:07 AM |
|
I don't think ListX is the problem either. As far as I can tell, it looks like DNN puts div tags around each ListX module when it generates the page. Then, I suspect it matches the wrong < /div > with the one I insert for printing. Do you have an example where you've printed more than one ListX module at a time? |
|
|
|
|
robert_chumley
 Advanced Member Posts:592
 |
| 10 Mar 2008 02:08 PM |
|
You actually cannot put an opening tag in one module and a closing div in another. The problem is that the nesting of the tags will be wrong and it may break other things on your page. Thanks, |
|
| Robert Chumley<br>r2integrated (formally bi4ce) |
|
|
DavidWSnow
 Basic Member Posts:129
 |
| 10 Mar 2008 04:05 PM |
|
As I recall Kevin mentioned in one of the original posts about this method that he often used it to print multiple ListX modules and that was one of its benefits. I usually have two ListX modules on the page (one search and one grid) and use it to just print the grid. Either that or I use it to print the content pane. I too don't like the fact that "ContentPane" is included in the printout, but haven't investigated making that part go away. /DaveS |
|
|
|
|
kevinmschreiner
 Advanced Member Posts:729
 |
| 19 Mar 2008 02:19 PM |
|
I'm not certain of how to force landscape mode - the main reason is that the browser is the control point for this aspect, and the interaction provided by the user when print is requested is pretty minimal from a javascript perspective. |
|
|
|
|
kevinmschreiner
 Advanced Member Posts:729
 |
| 19 Mar 2008 02:22 PM |
|
Ah, sorry - mis posted there. Anyway - the way that I do the printing is by opening a new window and then pumping the content of the source pane into a div in the target window. This provides a simple ability to set a print function in the skin that works directly. There is a lengthy thread for this purpose already within the site with a working script for doing that. Also - the script simply takes a div id, so you can easily create your own div and push it into a print window.. |
|
|
|
|
Larry-K
 New Member Posts:94
 |
| 06 Jul 2008 10:37 PM |
|
If you are trying to get rid of the 'ContentPane' so it prints pretty, tell them to go into view mode (rather than edit mode) before they print. |
|
|
|
|
Larry-K
 New Member Posts:94
 |
| 06 Jul 2008 11:49 PM |
|
The problem with Kevin's printitems script is that line 12 needs to be changed from: for (x=0;x<arguments;x++) to: for (x=0;x<arguments.length;x++) once I changed that, it worked great! |
|
|
|
|
robert_chumley
 Advanced Member Posts:592
 |
| 07 Jul 2008 07:21 PM |
|
Thanks for the update Larry. |
|
| Robert Chumley<br>r2integrated (formally bi4ce) |
|
|