Uncaught TypeError: Cannot read property 'records' of undefined pdfmake.min.js
Uncaught TypeError: Cannot read property 'records' of undefined pdfmake.min.js
**hi to all,
the following is my jsp file.while i click the pdf button i got pdfmake.min.js:20 Uncaught TypeError: Cannot read property 'records' of undefined.screenshot for this is attached.Please help me.i'm tired to solve this issue.Thanks in advance**
<%@page import="java.util."%>
<%@page import="java.text."%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="logic" uri="/WEB-INF/struts-logic.tld"%>
<%@ taglib prefix="html" uri="/WEB-INF/struts-html.tld"%>
<%@ taglib prefix="bean" uri="/WEB-INF/struts-bean.tld"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Report List</title>
<link href="css1/jquery.dataTables.min.css" rel="stylesheet">
<link href="css1/buttons.dataTables.min.css" rel="stylesheet">
<link href="css1/jquery-ui.css" rel="stylesheet">
</head>
<html:form action="/loadinvoicereportwithfilter">
<body>
<div id="dialog" title="Item Detail">
<br> Invoice Number : <input type="text" id="invid_js"
readonly="readonly" /> Date : <input type="text"
id="invdate_js" readonly="readonly" /> <br> <br> <br>
<div id="demo">
<table id="tableInvdetail" class="display" border="0"
cellpadding="0" cellspacing="0">
<thead>
<tr>
<th>S.No</th>
<th>Part Number</th>
<th>Description</th>
<th>Quantity</th>
<th>Serial Numbers</th>
</tr>
</thead>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
</div>
</div>
<logic:notPresent name="reportinvoiceList">
<h1>Cannot Connect with Database</h1>
</logic:notPresent>
<logic:empty name="reportinvoiceList">
<h2>No Records Found</h2>
</logic:empty>
<logic:present name="reportinvoiceList">
<fieldset>
<legend>Filter</legend>
<div id="controlgroup">
<input type="checkbox" id="yrAll" property="yrAllcheck"
styleId="yrAllcheck" name="yrAllcheck" id="yrAllcheck"
onclick="countChecked();" onchange="countChecked();"> <label
for="insurance">Show All</label> <label
for="transmission-automatic"> OR </label> <label
for="insurance"> Years From</label> <select
id="yrFrom" name="showinvreportformwithfilter">
<logic:notEmpty name="yList">
<logic:iterate id="year1" name="yList">
<option value='${year1.years}'>
<bean:write name="year1" property="years" />
</option>
</logic:iterate>
</logic:notEmpty>
</select> <label for="insurance"> To</label> <select
id="yrTo" name="showinvreportformwithfilter">
<logic:notEmpty name="yList">
<logic:iterate id="year1" name="yList">
<option value='${year1.years}'>
<bean:write name="year1" property="years" />
</option>
</logic:iterate>
</logic:notEmpty>
</select> <label for="insurance"> Client</label> <select
id="client" name="showinvreportformwithfilter">
<logic:notEmpty name="reportclientList">
<option value='0000'>Select Client</option>
<logic:iterate id="client" name="reportclientList">
<option value='${client.clientId}'>
<bean:write name="client" property="clientName" />
</option>
</logic:iterate>
</logic:notEmpty>
</select>
<button id="button" onclick="checkYears();">Filter</button>
</div>
</fieldset>
<div>
<br>
<br>
</div>
<div id="demo1">
<table id="tableRepdetail" class="display nowrap" cellspacing="0"
width="100%">
<thead>
<tr>
<th align="left" colspan="2"></th>
<th align="center" colspan="8">
<%
Calendar calendar = Calendar.getInstance();
SimpleDateFormat dateFormat = new SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss aaa");
String date = dateFormat.format(calendar.getTime());
%>
<h1>Invoice Report</h1> <%=date%>
<div align="left">
<h3>
Client :
<bean:write name="clientfilter" />
<bean:write name="yearfilter" />
</h3>
<span> </span>
</div>
</th>
</tr>
<tr>
<th align="center" rowspan="2">S.No</th>
<th align="center" rowspan="2">Customer</th>
<th align="center" colspan="2">Invoice</th>
<th align="center" rowspan="2">D.C No.</th>
<th align="center" rowspan="2">PO Number</th>
<th align="center" colspan="3">Warranty</th>
<th align="center" rowspan="2">Item <br />Details
</th>
</tr>
<tr>
<th align="center">Number</th>
<th align="center">Date</th>
<th align="center">Terms<br />(In Months)
</th>
<th align="center">Start</th>
<th align="center">End</th>
</tr>
</thead>
<tbody>
<logic:iterate id="invoice" name="reportinvoiceList"
indexId="invreportindex">
<tr>
<td align="left"><%=invreportindex + 1%></td>
<td align="left"><bean:write name="invoice"
property="custName" /></td>
<td align="left"><bean:write name="invoice"
property="invoiceNumber" /></td>
<td align="left"><bean:write name="invoice"
property="invoiceDate" /></td>
<td align="left"><bean:write name="invoice"
property="delChalanNum" /></td>
<td align="left"><logic:iterate id="po" name="invoice"
property="po">
<bean:write name="po" property="purchaseNumber" />
<br>
</logic:iterate></td>
<td align="center"><bean:write name="invoice"
property="varrentyTerm" /></td>
<td align="center"><bean:write name="invoice"
property="varrentyDate" /></td>
<td align="center"><bean:write name="invoice"
property="expairy_date" /></td>
<td align="left">
<button id="button"
onclick="goModify('${invoice.invoice_ID}','${invoice.invoiceNumber}','${invoice.invoiceDate}');">Show</button>
</td>
</tr>
</logic:iterate>
</tbody>
</table>
</div>
</logic:present>
</body>
</html:form>
</html>