I have a grid which suppose to print a report. When I press the Printlink on the grid it suppose to open up new windows which suppose to print a pdf report.
The page which suppose to print report is below:
<%a5
if (eval_valid("BILLKEY") = .F.) then
goto skipreport
else
'?"There is a parameter pass. By SEAMS"
if (Scholarship_type.value = 'SC' ) = .T. then
dim vFilter as c
dim vOrder as c
dim vFilename as c
report = "rptBillMonthlySchola_Web"
vFilter= "BILLKEY = "
vFilter = vFilter + alltrim(str( BILLKEY ))
' vfilter=""
vOrder = ""
vFilename = session.session_folder + chr(92) + "BillPrintStudent.pdf"
vFilename = report.saveas(report,"pdf",vFilter,vOrder,vFilename,.f.)
IF file.exists(vFilename)
response.redirect(session.session_url + "BillPrintStudent.pdf?" + time("hms3"))
END IF
else
dim vFilter as c
dim vOrder as c
dim vFilename as c
report = "rptBillMonthlyLoan_Web"
vFilter= "BILLKEY = "
vFilter = vFilter + alltrim(str( BILLKEY ))
' vfilter=""
vOrder = ""
vFilename = session.session_folder + chr(92) + "BillPrintStudent.pdf"
vFilename = report.saveas(report,"pdf",vFilter,vOrder,vFilename,.f.)
IF file.exists(vFilename)
response.redirect(session.session_url + "BillPrintStudent.pdf?" + time("hms3"))
END IF
end if
goto ReportEnd
end if
skipreport:
?"There was an error. Unable to print report. By SEAMS"
ReportEnd:
%>
But when I press the print link I got the following error:
500 Internal Server Error
"Script Error
Error:line:6 Expected value"
I really appreciate for any help provided.
Note: if these is no if condition, it print
The page which suppose to print report is below:
<%a5
if (eval_valid("BILLKEY") = .F.) then
goto skipreport
else
'?"There is a parameter pass. By SEAMS"
if (Scholarship_type.value = 'SC' ) = .T. then
dim vFilter as c
dim vOrder as c
dim vFilename as c
report = "rptBillMonthlySchola_Web"
vFilter= "BILLKEY = "
vFilter = vFilter + alltrim(str( BILLKEY ))
' vfilter=""
vOrder = ""
vFilename = session.session_folder + chr(92) + "BillPrintStudent.pdf"
vFilename = report.saveas(report,"pdf",vFilter,vOrder,vFilename,.f.)
IF file.exists(vFilename)
response.redirect(session.session_url + "BillPrintStudent.pdf?" + time("hms3"))
END IF
else
dim vFilter as c
dim vOrder as c
dim vFilename as c
report = "rptBillMonthlyLoan_Web"
vFilter= "BILLKEY = "
vFilter = vFilter + alltrim(str( BILLKEY ))
' vfilter=""
vOrder = ""
vFilename = session.session_folder + chr(92) + "BillPrintStudent.pdf"
vFilename = report.saveas(report,"pdf",vFilter,vOrder,vFilename,.f.)
IF file.exists(vFilename)
response.redirect(session.session_url + "BillPrintStudent.pdf?" + time("hms3"))
END IF
end if
goto ReportEnd
end if
skipreport:
?"There was an error. Unable to print report. By SEAMS"
ReportEnd:
%>
But when I press the print link I got the following error:
500 Internal Server Error
"Script Error
Error:line:6 Expected value"
I really appreciate for any help provided.
Note: if these is no if condition, it print
Comment