Requested unknown parameter '0' from the data source for row 0

Requested unknown parameter '0' from the data source for row 0

kvskvs Posts: 13Questions: 1Answers: 1
edited April 2015 in Free community support

hi all,

I am gettingdata from data base and dispaly in jsp page.
im getting below error.

Data table warning (table id = 'ProcessStatustable'):Requested
unknown parameter '0' from the data source for row 0"

my jsp code is below:

<%@include file="/WEB-INF/jsp/includes/header.jspf" %>
</div>

<c:url var="fieldSalesReqSearchUrl" value="/search/fieldSalesContractReqSearch.html" />
<c:url var="fieldSalesReqUrl" value="/request/salesContractReqUpdate.html" />

<script>
    $('#mainContent').hide(); 
</script>

<div style="color: #00457c;">   <h1>Sales Contract Request Search Results</h1> </div>

<h4> ${search.reportDateAndTime}
</h4>

<script>
    function openPage(pageURL)
    {
        window.open(pageURL);
    }
    $(document).ready(function() {

        
        $('#processStatusTable').dataTable({
            "bJQueryUI" : true,
            "bFilter" : false,
            "bAutoWidth": true,  
            "sPaginationType" : "full_numbers",
            aaSorting : [ [ 1, 'asc' ] ],
            "aoColumns" : [ {
                "bSortable" : [ "desc", "asc" ],
                "sWidth" : "10%"
            }, {
                "asSorting" : [ "desc", "asc" ],
                "sWidth" : "10%"
            }, {
                "asSorting" : false,
                "sWidth" : "10%"
            }, {
                "asSorting" : false,
                "sWidth" : "10%"
            }, {
                "asSorting" : false,
                "sWidth" : "8%"

            }, {
                "asSorting" : false,
                "sWidth" : "10%"

            }, {
                "asSorting" : false,
                "sWidth" : "10%"

            }, {
                "asSorting" : false,
                "sWidth" : "8%"

            }, {
                "asSorting" : false,
                "sWidth" : "7%"

            }, {
                "asSorting" : false,
                "sWidth" : "10%"

            }, {
                "asSorting" : false,
                "sWidth" : "9%"

            } ]

        });
        $('button').button();
        $('#closeButton').click(function() {
            window.location = "<spring:url value='${fieldSalesReqSearchUrl}'/>";
        });
        
        $('#reviewBt').click(function() {
            window.location = "<spring:url value='${fieldSalesReqUrl}' />";
        });
        
        
    });
</script>

<form:form id="searchForm" modelAttribute="predefinedSearch">
<table id="processStatusTable" class="display rcDataTable" >
    <thead>
        <tr>
            <th>WPS Request Id</th>
            <th>Customer Name</th>
            <th>Customer Number</th>
            <th>Plan Number(s)</th>
            <th>Rep Name</th>
            <th>Territory Manager</th>
            <th>Work Item Status</th>
            <th>Work Queue</th>
            <th>Workflow ID</th>
            <th>Create Date</th>
            <th>See Detail</th>
            
        </tr>
    </thead>
    <tbody>
        <tr>
        
                         <c:if test="${empty searchList}">
                           <tr>
                                  <td>No Records Found</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>
                                 
                                
                           </tr>
                         </c:if>
                       
                           <c:forEach items="${searchList}" var="search">
                                  <tr>
                                         <td>${search.requestId}</td>
                                         <td>${search.customerName}</td>
                                         <td>${search.customerNumber}</td>
                                         <td>${search.planNumber}</td>
                                         <td>${search.firstName},${search.lastName}</td>
                                         <td>${search.teamManger}</td>
                                         <td>${search.workItemStatus}</td>
                                         <td>${search.workQueue}</td>
                                         <td>${search.workItemID}</td>
                                         <td>${search.createDate}</td>
                                         <td><input type="submit"  value="Review" id="reviewBt" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" onclick="/request/salesContractReq/getWPSRequest.html?requestId='+${search.requestId})"></td>  
                                         
                                  </tr>
                           </c:forEach>
                      

            
        </tr>

    </tbody>
</table>
<br />
</form:form>
<form:form id="searchForm" action="${fieldSalesReqSearchUrl}">
<button id="closeButton">Close</button>

</form:form>

<div>
    
<%@ include file="/WEB-INF/jsp/includes/footer.jspf" %>

can any one help me to resolve this error.

This question has accepted answers - jump to:

Answers

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    Answer ✓

    Can you link to the page showing the issue, or use the DataTables debugger, as per the forum rules please.

    Allan

  • kvskvs Posts: 13Questions: 1Answers: 1

    my data table debug page http://debug.datatables.net/eluyaw

  • kvskvs Posts: 13Questions: 1Answers: 1

    Allan,

    Please reply for my issue. i had send the debugger page for your reference.

    Thanks in advance.

  • kvskvs Posts: 13Questions: 1Answers: 1
    Answer ✓

    allan,

    I found it .i have added extra <tr> after tbody that is the issue. any way thanks a lot.

  • kvskvs Posts: 13Questions: 1Answers: 1

    hi allan,

    is there aoption to copy these data to pdf or something.please reply me...

  • kvskvs Posts: 13Questions: 1Answers: 1

    i have added copy button it is not in view.... please see my debugger http://debug.datatables.net/arinow and help me...

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin

    The debugger says you are using DataTables 1.8.0. 1.10.6 is the current release. 1.9 and before are no longer supported.

    For PDF export, please see the TableTools extension.

    Allan

  • kvskvs Posts: 13Questions: 1Answers: 1

    yes i upgraded to latest version my debugger for your reference. http://debug.datatables.net/ejakat .Sorry please guide me wht to do next. im new to this data tables

  • kvskvs Posts: 13Questions: 1Answers: 1
    edited April 2015

    yes allan i can able to see buttons now but only print view is working ..
    my debugger is http://debug.datatables.net/ayuzuh
    and code is

    "sDom": 'T<"clear">lfrtip',
    "oTableTools": {
    "sSwfPath": "/abc/swf/copy_cvs_xls_pdf.swf",
    "aButtons": [ "copy", "csv", "pdf","print" ]
    }

    used


    please reply me which i ahve missed....

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin

    Please check you server error logs for a 404 error. It sounds like the SWF file isn't being found. The other thing to check is that you have Flash installed.

  • kvskvs Posts: 13Questions: 1Answers: 1

    yes flash is there in my system if it is not there print button will not work. print button alone works. i have copied swf also. error logs does nt shows any trace of errors respect to this. i am messed up and could nt solve this issue. tried in lot of ways. please guide me over this issue.

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin

    Thanks for the information. Can you give me a link to the page so I can debug it please. I will need to be able to access it to understand why it is not working.

    Allan

  • kvskvs Posts: 13Questions: 1Answers: 1

    Allan,

    Please check whether u can able to access this link..

    http://w7wkumar-k:7001/reports/fieldSalesContractReqReportResults.html

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin

    http://w7wkumar-k:7001/

    That isn't a host name I'm able to resolve. Could you give me the publicly addressable location please.

    Allan

  • kvskvs Posts: 13Questions: 1Answers: 1
    edited April 2015

    its under development stage .... and i am new to this project i dont know abt that.... shall i copy that jsp page....

    JSP page:

    <%@include file="/WEB-INF/jsp/includes/header.jspf" %>
    </div>
     
    <c:url var="fieldSalesReqReportUrl" value="/reports/fieldSalesContractReqReport.html" />
    
    <script>
        $('#mainContent').hide(); 
    </script>
    <div style="color: #00457c;">   <h1> ${report.reportName} Report Results</h1> </div>
    
    <h4>
        ${report.reportDateAndTime}
    </h4>
    
    <script>
        function openPage(pageURL)
        {
            window.open(pageURL);
        }
    
        $(document).ready( function () {
    
            $('#processStatusTable').dataTable( {
                "bJQueryUI" : true,
                "bFilter" : false,
                "bAutoWidth": true,
                "dom": 'T<"clear">lfrtip',
                "tableTools": {
                    "aButtons": [
                        "copy",
                        "print",
                        {
                            "sExtends":    "collection",
                            "sButtonText": "Save",
                            "aButtons":    [ "csv", "xls", "pdf" ]
                        }
                    ]
                },
                "sPaginationType" : "full_numbers",
                "aaSorting" : [ [ 1, 'asc' ] ],
                "aoColumns" : [ {
                    "bSortable" : [ "desc", "asc" ],
                    "sWidth" : "10%"
                }, {
                    "asSorting" : [ "desc", "asc" ],
                    "sWidth" : "20%"
                }, {
                    "asSorting" : false,
                    "sWidth" : "5%"
                }, {
                    "asSorting" : false,
                    "sWidth" : "10%"
                }, {
                    "asSorting" : false,
                    "sWidth" : "8%"
    
                }, {
                    "asSorting" : false,
                    "sWidth" : "5%"
    
                }, {
                    "asSorting" : false,
                    "sWidth" : "5%"
    
                }, {
                    "asSorting" : false,
                    "sWidth" : "8%"
    
                }, {
                    "asSorting" : false,
                    "sWidth" : "7%"
    
                }, {
                    "asSorting" : false,
                    "sWidth" : "10%"
    
                }, {
                    "asSorting" : false,
                    "sWidth" : "9%"
    
                } ]
                
    
    
    
            } );
            $('button').button();
        } );
    </script>
    
    
    
    
    <table id="processStatusTable" class="display rcDataTable">
        <thead>
            <tr>
                <th>WPS Request Id</th>
                <th>Customer Name</th>
                <th>Customer Number</th>
                <th>Plan Number(s)</th>
                <th>Rep Name</th>
                <th>Territory Manager</th>
                <th>Work Item Status</th>
                <th>Work Queue</th>
                <th>Workflow ID</th>
                <th>Create Date</th>
                <th>See Detail</th>
            </tr>
        </thead>
        <tbody>
                
    
                    <c:if test="${empty searchList}">
                        <tr>
                            <td>No Records Found</td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
    
    
                        </tr>
                    </c:if>
                    <c:if test="${not empty searchList}">
                    <c:forEach items="${searchList}" var="search">
                        <tr>
                            <c:choose>
                                <c:when test="${search.requestId=='NOT_FOUND' }">
                                    <td><c:out value="" /></td>
                                </c:when>
                                <c:otherwise>
                                    <td><c:out value="${search.requestId}" /></td>
                                </c:otherwise>
                            </c:choose>
                            <c:choose>
                                <c:when test="${search.customerName=='NOT_FOUND' }">
                                    <td><c:out value="" /></td>
                                </c:when>
                                <c:otherwise>
                                    <td><c:out value="${search.customerName}" /></td>
                                </c:otherwise>
                            </c:choose>
                            <c:choose>
                                <c:when test="${search.customerNumber=='NOT_FOUND' }">
                                    <td><c:out value="" /></td>
                                </c:when>
                                <c:otherwise>
                                    <td><c:out value="${search.customerNumber}" /></td>
                                </c:otherwise>
                            </c:choose>
                            <c:choose>
                                <c:when test="${search.planNumber=='NOT_FOUND' }">
                                    <td><c:out value="" /></td>
                                </c:when>
                                <c:otherwise>
                                    <td><c:out value="${search.planNumber}" /></td>
                                </c:otherwise>
                            </c:choose>
                            <c:choose>
                                <c:when test="${search.firstName=='NOT_FOUND' }">
                                    <td><c:out value="" /></td>
                                </c:when>
                                <c:otherwise>
                                    <td><c:out value="${search.firstName} ${search.lastName}" /></td>
                                </c:otherwise>
                            </c:choose>
                            <c:choose>
                                <c:when test="${search.teamManger=='NOT_FOUND' }">
                                    <td><c:out value="" /></td>
                                </c:when>
                                <c:otherwise>
                                    <td><c:out value="${search.teamManger}" /></td>
                                </c:otherwise>
                            </c:choose>
                            <c:choose>
                                <c:when test="${search.workItemStatus=='NOT_FOUND' }">
                                    <td><c:out value="" /></td>
                                </c:when>
                                <c:otherwise>
                                    <td><c:out value="${search.workItemStatus}" /></td>
                                </c:otherwise>
                            </c:choose>
                            <c:choose>
                                <c:when test="${search.workQueue=='NOT_FOUND' }">
                                    <td><c:out value="" /></td>
                                </c:when>
                                <c:otherwise>
                                    <td><c:out value="${search.workQueue}" /></td>
                                </c:otherwise>
                            </c:choose>
                            <c:choose>
                                <c:when test="${search.workItemID=='NOT_FOUND' }">
                                    <td><c:out value="" /></td>
                                </c:when>
                                <c:otherwise>
                                    <td><c:out value="${search.workItemID}" /></td>
                                </c:otherwise>
                            </c:choose>
                            <c:choose>
                                <c:when test="${search.createDate=='NOT_FOUND' }">
                                    <td><c:out value="" /></td>
                                </c:when>
                                <c:otherwise>
                                    <td><c:out value="${search.createDate}" /></td>
                                </c:otherwise>
                            </c:choose>
                        
                            <td><input type="submit" value="Review" id="reviewBt"
                                class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
                                onclick="openPage(/request/salesContractReq/getWPSRequest.html?requestId='+${search.requestId})"></td>
                            
                        </tr>
                    </c:forEach>
                    
                </c:if>
    
        </tbody>
        </table>
    

    <br />
    <br />
    <form:form id="reportForm" action="${fieldSalesReqReportUrl}">
    <button id="closeButton">Close</button>
    </form:form>

    <

    div>

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    edited April 2015

    I don't know JSP at all I'm afraid, but you don't show how you populate the searchList variable. That is still the critical missing bit.

  • kvskvs Posts: 13Questions: 1Answers: 1

    oh its ok.... data is coming correctly allan but i have issue in save as pdf/ excel/csv alone button not working ..if i right click it shows like Movie not loaded.... but for print option button it doesnt show anything when i keep mouse over that view print view shows.... try ...if you dont know leave it.. sorry for disturbance... anyway thanks a lot....

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin

    I'm really sorry I can't help, but without a test case showing the issue I simply can't.

This discussion has been closed.