Hi
I have a fairly complex report which is based upon a stored procedure. It requires two inputs to run:
1. a numeric storecode
2. a date value
This runs just fine from a dialog component which sets the two variables into session.variables.
My problem is that I am trying to save the report to a pdf on the server and it just does not run! I managed to find potential solutions on the forum but no luck.
The relevant part of my xbasic script is:
in debug as soon as the report.saveas line is executed I receive an error message (See attached image)
I have tried a variety of combinations on variable types without success. If anyone has any pointers, gratefully received.
Kind regards
Glen
I have a fairly complex report which is based upon a stored procedure. It requires two inputs to run:
1. a numeric storecode
2. a date value
This runs just fine from a dialog component which sets the two variables into session.variables.
My problem is that I am trying to save the report to a pdf on the server and it just does not run! I managed to find potential solutions on the forum but no luck.
The relevant part of my xbasic script is:
Code:
dim reportLayoutName as c reportLayoutName = "[EMAIL="[email protected]"][email protected][/EMAIL]" dim vStorecode as N vStorecode = convert_type(rs.data("cs_id"),"N") dim vSalesWeek as t vSalesWeek = session.salesweek dim reportFileName as c reportFileName = remspecial(dtoc(session.salesweek,"12-"))+"_WSM_"+rs.data("cgc")+"_"+remspecial(rs.data("store"))+".pdf" dim reportSavePath as c reportSavePath = "D:\Reports\\"+reportFileName DIM args as SQL::arguments args.Set("salesweek",vSalesWeek) args.Set("storecode",vStorecode) dim options as p options.filter = "@SALESWEEK = :salesweek, @STORECODE = :storecode" report.saveas(reportLayoutName, "PDF", "" , "" , reportSavePath,.F.,.F.,args,options)
I have tried a variety of combinations on variable types without success. If anyone has any pointers, gratefully received.
Kind regards
Glen
Comment