This topic is locked

Exporting error

3/4/2007 3:50:41 AM
ASPRunnerPro General questions
F
Faizan author

Hi,
I am creating a simple project using ASP Runner Pro 4.1 (Build 212). There are many pages that are created (about 8 or so), but only one of them has an Export error when I click on the link. For the remainder of the pages, the Export option works fine. the error that I see is as follows:
HTTP 500.100 - Internal Server Error - ASP error

Internet Information Services
--------------------------------------------------------------------------------
Technical Information (for support personnel)
Error Type:

Microsoft VBScript compilation (0x800A0400)

Expected statement

/Reporting_View/Open_Orders_Details_export.asp, line 975

wend
Browser Type:

Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; 3M/IE 6.0;; 3M/MSIE 6.0;; .NET CLR 1.1.4322; InfoPath.1)
Page:

GET /Reporting_View/Open_Orders_Details_export.asp
Time:

Sunday, March 04, 2007, 12:47:32 PM
Regards,

Faizan Rashid.

F
Faizan author 3/4/2007

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!

J
Jane 3/5/2007

Please zip and send generated ASP files to [email=support@xlinesoft.com]support@xlinesoft.com[/email] along with project file and your sample database for investigation.

I'll find what's wrong with your project running it on my test box.