How can I create report popup

Last post 09-29-2004 12:55 AM by jmorrissette. 10 replies.

Sort Posts:

  • How can I create report popup

    09-21-2004, 1:32 AM
    • Member
      560 point Member
    • jmorrissette
    • Member since 03-10-2004, 7:58 PM
    • Springfield, IL
    • Posts 112
    I want to create a popup window that displays a datalist in Word or Excel format. I understand the mechanics of coding html word/excel headers. I have also resolved how to load up a popup window at the click of a mouse and pass a query string to it.

    Can someone point me to where I need to go next? Do I create an aspx page? Do I create an ascx control? If I create the control, how do I get it to appear inside the popup without all of the headers, menu, skin stuff?

    I have searched the forums and haven't found a complete discussion on this anywhere. Thanks in advance to all those who help.
    Jon Morrissette
    www.links2business.com
    www.lakesidechristian.com
  • Re: How can I create report popup

    09-21-2004, 11:40 AM
    • Member
      150 point Member
    • markyou
    • Member since 12-07-2003, 11:01 PM
    • USA
    • Posts 30
    This is still my question too.
    Here is my walkarould:
    use DNN PRINTMODULE in container.

    The below container code will add printer icon on top module, when you click on the icon, it will pop new window and remove all extra skin html.

    hope this help.
    mark

    save the code to ..Portals\0\Containers\PRINT\StandardPrint.ascx and use this container.

    <%@ Control language="vb" CodeBehind="~/admin/Skins/container.vb" AutoEventWireup="false" Explicit="True" Inherits="DotNetNuke.Container" %>
    <%@ Register TagPrefix="dnn" TagName="Icon" Src="~/admin/Containers/Icon.ascx"%>
    <%@ Register TagPrefix="dnn" TagName="Actions" Src="~/admin/Containers/Actions.ascx"%>
    <%@ Register TagPrefix="dnn" TagName="Title" Src="~/admin/Containers/Title.ascx"%>
    <%@ Register TagPrefix="dnn" TagName="PRINTMODULE" Src="~/Admin/Containers/PrintModule.ascx" %>

    <div id="SMContainer1">
    <table cellSpacing="0" cellPadding="0" width="100%" summary="Module Title Table">
    <tr class="SMTitleBg1">
    <td width="2" height="23 align=" align="center"" vAlign="middle" noWrap>
    <dnn:Icon runat="server" id="dnnIcon" /> <dnn:Actions runat="server" id="dnnActions" />
    </td>
    <td width="100%" align="left" vAlign="middle" noWrap><dnn:PRINTMODULE runat="server" id="dnnPRINTMODULE" />
    <dnn:Title runat="server" id="dnnTitle" CssClass="SMHead1" />&nbsp; </td>
    <td width="20" align="right" vAlign="middle" noWrap></td>
    </tr>
    <tr>
    <td height="24" valign="top" colspan="3" >
    <table cellSpacing="0" cellPadding="4" width="100%" summary="Module Content Table">
    <tr>
    <td id="ContentPane" runat="server"></td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </div>
    <table cellSpacing="0" cellPadding="0" width="100%" summary="Module Title Table">
    <tr>
    <td height="5"><img src="/Portals/0/Containers/smcculloch.net_container/1pix.gif" runat="server" width="5" height="1"></td>
    </tr>
    </table>
  • Re: How can I create report popup

    09-21-2004, 1:40 PM
    • Member
      240 point Member
    • karimvirani
    • Member since 06-30-2004, 6:58 PM
    • Dallas, TX
    • Posts 48
    You can append the following to your DNN URL:

    &SkinType=G&SkinName=_default&SkinSrc=printmodule.ascx

    All 3 parameters seem to be required. You need to have a tabid specified too and probably want to specify the moduleid (mid) of your custom module.

    There's plenty of info on creating custom modules at http://dnnjungle.vmasanas.net/

    Karim
  • Re: How can I create report popup

    09-21-2004, 5:35 PM
    • Member
      560 point Member
    • jmorrissette
    • Member since 03-10-2004, 7:58 PM
    • Springfield, IL
    • Posts 112
    Okay, so if I do this above and insert the word/ or excel html header then all should work fine?
    Jon Morrissette
    www.links2business.com
    www.lakesidechristian.com
  • Re: How can I create report popup

    09-21-2004, 7:41 PM
    • Member
      150 point Member
    • markyou
    • Member since 12-07-2003, 11:01 PM
    • USA
    • Posts 30
    Thanks Karim for the tip. it works very well.
    You can see different here:

    Before with skin:


    After add: &SkinType=G&SkinName=_default&SkinSrc=printmodule.ascx


    mark

  • Re: How can I create report popup

    09-22-2004, 5:44 PM
    • Member
      240 point Member
    • karimvirani
    • Member since 06-30-2004, 6:58 PM
    • Dallas, TX
    • Posts 48
    I forgot to mention that this uses the default skin from the default portal. If you want to use the skin installed on your specific portal, then set your SkinType=L (for local), and SkinName=YourActualSkinName. You'll need to have a printmodule.ascx (could be named differently) in your skin that contains at least a 'ContentPane' cell. If your skin doesn't have a printmodule.ascx, you can use this simple code to make one:


    <%@ Control language="vb" CodeBehind="~/admin/Skins/skin.vb" AutoEventWireup="false" Explicit="True" Inherits="DotNetNuke.Skin" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

    <html>
    <head>
    <title></title>
    </head>

    <body style="background: white; margin: 10px 10px 10px 10px;">

    <table width="100%" height="100%" cellpadding="0" cellspacing="0" align="left">
    <tr>
    <td valign="top" id="ContentPane" runat="server" visible="false"></td>
    </tr>
    </table>

    </body>
    </html>


    Just put it in your skin folder: Portals\x\Skins\SkinName and it should pickup all the right style details.
  • Re: How can I create report popup

    09-22-2004, 10:03 PM
    • Member
      560 point Member
    • jmorrissette
    • Member since 03-10-2004, 7:58 PM
    • Springfield, IL
    • Posts 112
    Thanks, that answers some lingering questions I had.
    Jon Morrissette
    www.links2business.com
    www.lakesidechristian.com
  • Re: How can I create report popup

    09-27-2004, 10:56 PM
    • Member
      560 point Member
    • jmorrissette
    • Member since 03-10-2004, 7:58 PM
    • Springfield, IL
    • Posts 112
    Alright, I am close on this one. I just need a little coaching. On my test sight, the following code is not returning the full address of my page.

    It is dropping off the "http://localhost/" portion and giving me this

    "/DotNetNuke/Default.aspx?tabid=27&mid=335&SkinType=L&SkinName=_default&SkinSrc=printmodule.ascx"


    HERE IS MY CODE:
    --------------------------------------------------------

    myURLstring = CType(Global.ApplicationPath, String) & "/" & glbDefaultPage & "?tabid=" & TabId & "&mid=" & ModuleId & "&SkinType=L&SkinName=_default&SkinSrc=printmodule.ascx"
    Jon Morrissette
    www.links2business.com
    www.lakesidechristian.com
  • Re: How can I create report popup

    09-27-2004, 11:30 PM
    • Member
      560 point Member
    • jmorrissette
    • Member since 03-10-2004, 7:58 PM
    • Springfield, IL
    • Posts 112
    I don't know, I guess I'll keep talking to myself. Seems to work now.
    Jon Morrissette
    www.links2business.com
    www.lakesidechristian.com
  • Re: How can I create report popup

    09-28-2004, 12:54 AM
    • Member
      240 point Member
    • karimvirani
    • Member since 06-30-2004, 6:58 PM
    • Dallas, TX
    • Posts 48
    Patience grasshopper.

    I think I used something like this:


    dim hl as HyperLink
    hl.NavigateUrl = Request.Url.ToString & "&SkinType=L&SkinName=MySkin&SkinSrc=printmodule.ascx"


    This works for me because I'm interested in letting them print the current page. Of course you'd want to check whether those parameters already exist in the current URL before adding them - if you want them to be able to refresh the page in print view.

    Karim
  • Re: How can I create report popup

    09-28-2004, 10:52 PM
    • Member
      560 point Member
    • jmorrissette
    • Member since 03-10-2004, 7:58 PM
    • Springfield, IL
    • Posts 112
    Thanks... what I meant above is that I end up answering my own questions.... no critique on timing of answers.... people are good about responding in a timely fashion!
    Jon Morrissette
    www.links2business.com
    www.lakesidechristian.com
Page 1 of 1 (11 items)