Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Nested grid content not being printed

    Using smartgwt 2.2 on IE8.

    My listgrid has a nestedgrid being populated on click or row header like showed in showcase.

    The print preview is not showing the nested grid expanded data in it.

    I saw that the Print button on showcase also is doing the same and not able to show teh nested grid populated data in print preview.

    Please let me know if there is solution.

    Call -
    Code:
     Canvas.showPrintPreview(new Object[]{form , grid, subAuditDetailWidget} );

    on clicking printpriview however get an error -
    Code:
     
    com.smartgwt.client.core.JsObject$SGWT_WARN: 19:30:34.920:MUP7:WARN:ListGrid:isc_ListGrid_7:This component has no specified fields. In order to display data fields must be set up either via an explicit call to setFields() or by binding to a dataSource.
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
        at java.lang.reflect.Constructor.newInstance(Unknown Source)
        at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:105)
        at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
        at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157)
        at com.google.gwt.dev.shell.BrowserChannel.reactToMessages(BrowserChannel.java:1669)
        at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:401)
        at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222)
        at java.lang.Thread.run(Unknown Source)
    Last edited by buddharay; 2 Nov 2010, 15:35. Reason: added error

    #2
    Currently embedded components in listGrids (recordComponents, expansion components etc) are not included in the generated print preview for the grid.
    This is a known limitation and will be resolved in the future.

    Comment


      #3
      Thanks for prompt reply.
      Do you have an ETA ?

      Comment


        #4
        I wanted to check to see if this has been resolved yet or if there or plans to in the future?
        I am trying to use exportContent() to export to PDF with Smart Client version 8.3 (v8.3p_2013-02-14/Pro Development Only) and noticing that it doesn't show the ListGrid at all in the PDF if expander details are shown for one of the rows that is visible after scrolling down in the ListGrid. The PDF exports fine if you expand a row that is visible without having to scroll.

        Comment


          #5
          Can you show the code you're using?
          Last edited by Isomorphic; 19 Mar 2013, 02:52.

          Comment


            #6
            Here is a simple reproducible test case. Exporting the ListGrid to PDF works fine with or without records expanded as long as you don't scroll to load more content. If you scroll to load more pages and then export, the PDF comes out blank. This is regardless of whether you expanded any of the records or not. Let me know if there is something I need to be doing different.
            I am using Smart Client v8.3p_2013-03-18/Pro Development Only.

            Code:
            <%@ taglib uri="/WEB-INF/iscTaglib.xml" prefix="isomorphic" %>
            <HTML><HEAD>
            	<isomorphic:loadISC skin="Enterprise"/>
            </HEAD>
            
            <BODY>
            <SCRIPT>
            
            <isomorphic:loadDS ID="supplyItem"/>
            
            isc.ListGrid.create({
                ID: "itemList",
                dataSource: "supplyItem",
                leaveScrollbarGap:false, 
                height: 500,
                fields : [
                    { name:"itemName" },
                    { name:"SKU" },
                    { name:"unitCost", width:50 },
                    { name:"units", width:40 }
                ],
                selectionType: "single",
            	canExpandMultipleRecords: true,
            	canExpandRecords: true,
            	getExpansionComponent: function (record) {
            		return isc.DetailViewer.create({
            			data: record,
            			fields: [
            				{name: "itemName", title: "Name"},
            				{name: "description", title: "Description"},
            				{name: "category", title: "Category"}
            			]	
            		});		
            	}
            });
            		
            isc.Button.create({
            	ID: "pdfBtn",
            	title: "Export",
                click:function () {
                	var settings = {
                		skinName: "Enterprise", 
            			pdfName: "export"
              	    };
            		isc.RPCManager.exportContent(itemList, settings);
                }
            });
            
            isc.VLayout.create({
            	ID: "mainLayout",
            	width: "800",
            	layoutMargin: 10,
                members: [
            		pdfBtn,
            		itemList
            	]
            });
            
            itemList.fetchData();
            
            </SCRIPT>
            
            </BODY>
            </HTML>
            Last edited by mgreenberg; 19 Mar 2013, 08:34.

            Comment


              #7
              We see the issue here and it's assigned to an engineer to be addressed - we'll update this thread when we have more information.

              Comment


                #8
                Thanks! Looking forward to hearing back.

                Comment


                  #9
                  This has been fixed in 3.1p and 4.0d - please retest with a nightly build of March 27 or later

                  Comment


                    #10
                    Awesome. Thanks! I will give it a try.

                    Comment


                      #11
                      I tried this fix with build v8.3p_2013-03-27/Pro Development Only and I confirmed that export to PDF now works when I scroll in a list grid with expander content.

                      I wanted to check in again on another related issue I posted here. In this same example when exporting the list grid to PDF after scrolling, the grid renders all column values under one column on the page. If you scroll again, the data shows up under the appropriate columns again. I just wanted to follow up on this to see whether this is another bug.

                      Thanks.

                      Comment


                        #12
                        We don't plan to look into that - there's no point bouncing the content through an intermediate Canvas and should just print/export the widgets directly.

                        Comment


                          #13
                          Okay. Is there anything I can do on our code side to not see this when a user scrolls and then exports?

                          Comment


                            #14
                            From what we understand, it arises through unnecessarily copying HTML around, in which just avoid doing so.

                            However that was a big messy thread with several unrelated issues - if you think there's still a framework issue here involving correct and necessary usage, start a new thread and explain clearly what's going wrong, with runnable sample code.

                            Comment


                              #15
                              Hm, I don't see where I would be copying any HTML around here.

                              Anyhow, I started a new thread with a simple reproducible test case for this issue where all I am doing is calling exportContent on the listGrid. It seems to only reproduce this issue when a criteria is passed into fetchData().

                              Comment

                              Working...
                              X