Here is a sample of the code where the error seems to be occuring (line 975 in the error message). It seems to be occuring with the subroutine that performs export to ePDF (which is not needed by my project anyway).
================================================================================
====
pdf.AddPage()
' write data rows
iNumberOfRows = 0
while (nPageSize=0 or iNumberOfRows<nPageSize) and not rs.EOF
pdf.maxheight=pdf.rowheight
x=pdf.leftmargin
pdf.SetY(pdf.y0)
pdf.SetX(x)
pdf.MultiCell pdf.GetColWidth("Order"),pdf.rowheight,GetData(rs,"Order","")
x=x+pdf.GetColWidth("Order")
if pdf.GetY()-pdf.y0>pdf.maxheight then
pdf.maxheight=pdf.GetY()-pdf.y0
end if
pdf.SetY(pdf.y0)
pdf.SetX(x)
pdf.MultiCell pdf.GetColWidth("CSC_Code"),pdf.rowheight,GetData(rs,"CSC_Code","")
x=x+pdf.GetColWidth("CSC_Code")
if pdf.GetY()-pdf.y0>pdf.maxheight then
pdf.maxheight=pdf.GetY()-pdf.y0
end if
pdf.SetY(pdf.y0)
pdf.SetX(x)
pdf.MultiCell pdf.GetColWidth("Customer_Name"),pdf.rowheight,GetData(rs,"Customer_Name","")
x=x+pdf.GetColWidth("Customer_Name")
if pdf.GetY()-pdf.y0>pdf.maxheight then
pdf.maxheight=pdf.GetY()-pdf.y0
end if
pdf.SetY(pdf.y0)
pdf.SetX(x)
if len(rs("Country_Description"))>0 then
strdata = make_db_value("Country_Description",rs("Country_Description"),"","")
LookupSQL="SELECT "
LookupSQL=LookupSQL & "[Country_Name]"
LookupSQL=LookupSQL & " FROM [Country] WHERE [Country_Name] = " & strdata
LogInfo(LookupSQL)
rss.Open LookupSQL,dbConnection
if not rss.EOF then
pdf.Cell pdf.GetColWidth("Country_Description"),pdf.rowheight,rss(0)
else
pdf.Cell pdf.GetColWidth("Country_Description"),pdf.rowheight,GetData(rs,"Country_Description", "")
end if
rss.Close
x=x+pdf.GetColWidth("Country_Description")
if pdf.GetY()-pdf.y0>pdf.maxheight then
pdf.maxheight=pdf.GetY()-pdf.y0
end if
pdf.SetY(pdf.y0)
pdf.SetX(x)
pdf.MultiCell pdf.GetColWidth("Order_Entry_Date"),pdf.rowheight,GetData(rs,"Order_Entry_Date","")
x=x+pdf.GetColWidth("Order_Entry_Date")
if pdf.GetY()-pdf.y0>pdf.maxheight then
pdf.maxheight=pdf.GetY()-pdf.y0
end if
pdf.SetY(pdf.y0)
pdf.SetX(x)
pdf.MultiCell pdf.GetColWidth("Inventory_Location"),pdf.rowheight,GetData(rs,"Inventory_Location","")
x=x+pdf.GetColWidth("Inventory_Location")
if pdf.GetY()-pdf.y0>pdf.maxheight then
pdf.maxheight=pdf.GetY()-pdf.y0
end if
pdf.SetY(pdf.y0)
pdf.SetX(x)
pdf.MultiCell pdf.GetColWidth("Order_Line_Seq_No"),pdf.rowheight,GetData(rs,"Order_Line_Seq_No","")
x=x+pdf.GetColWidth("Order_Line_Seq_No")
if pdf.GetY()-pdf.y0>pdf.maxheight then
pdf.maxheight=pdf.GetY()-pdf.y0
end if
pdf.SetY(pdf.y0)
pdf.SetX(x)
pdf.MultiCell pdf.GetColWidth("Stock_No"),pdf.rowheight,GetData(rs,"Stock_No","")
x=x+pdf.GetColWidth("Stock_No")
if pdf.GetY()-pdf.y0>pdf.maxheight then
pdf.maxheight=pdf.GetY()-pdf.y0
end if
pdf.SetY(pdf.y0)
pdf.SetX(x)
pdf.MultiCell pdf.GetColWidth("Stock Number Description line 1"),pdf.rowheight,GetData(rs,"Stock Number Description line 1","")
x=x+pdf.GetColWidth("Stock Number Description line 1")
if pdf.GetY()-pdf.y0>pdf.maxheight then
pdf.maxheight=pdf.GetY()-pdf.y0
end if
pdf.SetY(pdf.y0)
pdf.SetX(x)
pdf.MultiCell pdf.GetColWidth("Order_Qty"),pdf.rowheight,GetData(rs,"Order_Qty","Number")
x=x+pdf.GetColWidth("Order_Qty")
if pdf.GetY()-pdf.y0>pdf.maxheight then
pdf.maxheight=pdf.GetY()-pdf.y0
end if
pdf.SetY(pdf.y0)
pdf.SetX(x)
pdf.MultiCell pdf.GetColWidth("Consolidated_Line_Amt"),pdf.rowheight,GetData(rs,"Consolidated_Line_Amt","Number")
x=x+pdf.GetColWidth("Consolidated_Line_Amt")
if pdf.GetY()-pdf.y0>pdf.maxheight then
pdf.maxheight=pdf.GetY()-pdf.y0
end if
pdf.SetY(pdf.y0)
pdf.SetX(x)
pdf.MultiCell pdf.GetColWidth("Allocated Quantity"),pdf.rowheight,GetData(rs,"Allocated Quantity","Number")
x=x+pdf.GetColWidth("Allocated Quantity")
if pdf.GetY()-pdf.y0>pdf.maxheight then
pdf.maxheight=pdf.GetY()-pdf.y0
end if
pdf.SetY(pdf.y0)
pdf.SetX(x)
pdf.MultiCell pdf.GetColWidth("Allocated_Cost"),pdf.rowheight,GetData(rs,"Allocated_Cost","")
x=x+pdf.GetColWidth("Allocated_Cost")
if pdf.GetY()-pdf.y0>pdf.maxheight then
pdf.maxheight=pdf.GetY()-pdf.y0
end if
pdf.SetY(pdf.y0)
pdf.SetX(x)
pdf.MultiCell pdf.GetColWidth("EBC"),pdf.rowheight,GetData(rs,"EBC","")
x=x+pdf.GetColWidth("EBC")
if pdf.GetY()-pdf.y0>pdf.maxheight then
pdf.maxheight=pdf.GetY()-pdf.y0
end if
pdf.SetY(pdf.y0)
pdf.SetX(x)
pdf.MultiCell pdf.GetColWidth("EBU"),pdf.rowheight,GetData(rs,"EBU","")
x=x+pdf.GetColWidth("EBU")
if pdf.GetY()-pdf.y0>pdf.maxheight then
pdf.maxheight=pdf.GetY()-pdf.y0
end if
pdf.SetY(pdf.y0)
pdf.SetX(x)
pdf.MultiCell pdf.GetColWidth("Commodity_Basic"),pdf.rowheight,GetData(rs,"Commodity_Basic","")
x=x+pdf.GetColWidth("Commodity_Basic")
if pdf.GetY()-pdf.y0>pdf.maxheight then
pdf.maxheight=pdf.GetY()-pdf.y0
end if
' draw fames
x=pdf.leftmargin
pdf.Rect x,pdf.y0,pdf.GetColWidth("Order"),pdf.maxheight
x=x+pdf.GetColWidth("Order")
pdf.Rect x,pdf.y0,pdf.GetColWidth("CSC_Code"),pdf.maxheight
x=x+pdf.GetColWidth("CSC_Code")
pdf.Rect x,pdf.y0,pdf.GetColWidth("Customer_Name"),pdf.maxheight
x=x+pdf.GetColWidth("Customer_Name")
pdf.Rect x,pdf.y0,pdf.GetColWidth("Country_Description"),pdf.maxheight
x=x+pdf.GetColWidth("Country_Description")
pdf.Rect x,pdf.y0,pdf.GetColWidth("Order_Entry_Date"),pdf.maxheight
x=x+pdf.GetColWidth("Order_Entry_Date")
pdf.Rect x,pdf.y0,pdf.GetColWidth("Inventory_Location"),pdf.maxheight
x=x+pdf.GetColWidth("Inventory_Location")
pdf.Rect x,pdf.y0,pdf.GetColWidth("Order_Line_Seq_No"),pdf.maxheight
x=x+pdf.GetColWidth("Order_Line_Seq_No")
pdf.Rect x,pdf.y0,pdf.GetColWidth("Stock_No"),pdf.maxheight
x=x+pdf.GetColWidth("Stock_No")
pdf.Rect x,pdf.y0,pdf.GetColWidth("Stock Number Description line 1"),pdf.maxheight
x=x+pdf.GetColWidth("Stock Number Description line 1")
pdf.Rect x,pdf.y0,pdf.GetColWidth("Order_Qty"),pdf.maxheight
x=x+pdf.GetColWidth("Order_Qty")
pdf.Rect x,pdf.y0,pdf.GetColWidth("Consolidated_Line_Amt"),pdf.maxheight
x=x+pdf.GetColWidth("Consolidated_Line_Amt")
pdf.Rect x,pdf.y0,pdf.GetColWidth("Allocated Quantity"),pdf.maxheight
x=x+pdf.GetColWidth("Allocated Quantity")
pdf.Rect x,pdf.y0,pdf.GetColWidth("Allocated_Cost"),pdf.maxheight
x=x+pdf.GetColWidth("Allocated_Cost")
pdf.Rect x,pdf.y0,pdf.GetColWidth("EBC"),pdf.maxheight
x=x+pdf.GetColWidth("EBC")
pdf.Rect x,pdf.y0,pdf.GetColWidth("EBU"),pdf.maxheight
x=x+pdf.GetColWidth("EBU")
pdf.Rect x,pdf.y0,pdf.GetColWidth("Commodity_Basic"),pdf.maxheight
x=x+pdf.GetColWidth("Commodity_Basic")
pdf.y0 = pdf.y0+pdf.maxheight
iNumberOfRows=iNumberOfRows+1
rs.MoveNext
wend -----------------------------------------------------------------------------------------> This is line 975!