I would love some help in trying to figure out why I cannot get a report to print...
I have the code below in an a5w page - however, it fails to print a report. It prints the "New Bonds Report didn't print" error at the end, so I know it is finding my .ALB file with the report definition in it. I just have no idea how to debug/find out why it isn't printing. Can anyone give me hints on how to figure this out? Here is my code:
I have the code below in an a5w page - however, it fails to print a report. It prints the "New Bonds Report didn't print" error at the end, so I know it is finding my .ALB file with the report definition in it. I just have no idea how to debug/find out why it isn't printing. Can anyone give me hints on how to figure this out? Here is my code:
Code:
if eval_valid("off_id") if off_id[1] = "" goto OffenseidNotSpecified end if dim whatoffice as n = session.office_id dim args as sql::arguments args.Add("whatOffice",whatOffice) dim filter as c dim order as c filter = off_id.dump() filter = *for_each(x,"offense_id = " + x,filter) filter = strtran(alltrim(filter), crlf()," .or. ") order = "" dim filename as c filename = session.session_folder + chr(92) + "tempreport.pdf" dim reportname as c dim libfolder as c libfolder = a5_removetrailingbackslash(Request.ApplicationRoot) + chr(92) dim libname as c libname = libfolder + "BBOOMS.alb" if file.exists(libname) = .f. then ?libname + "<br>" + "Database Library not found. It is possible that you have not yet published the Datbase Library. If so, then re-publish the project and check the 'Publish database library' checkbox." end end if reportname = "New_Bonds_Rpt@" + libname filename = report.saveas(reportname,"pdf",filter,order,filename,.f.,null_value(),args) if file.exists(filename) response.redirect(session.session_url + "tempreport.pdf?" + time("hms3")) else ?"'New_Bonds_Rpt' report did not print" end if else OffenseidNotSpecified: %> <html> <head> <title>Labels</title> </head> <body> <p>Error: You have not chosen a vaild Offense.</p> </body></html> <%A5 end if %>
Comment