Hi everyone having an issue with trying to get a pdf report on a dialog the following is the error, and the form events.
I would actually love to have this report in excel instead of pdf does anyone know if its just as simple as
changing the extensions to xls. and changing the type to excel.
Thanks in advance.
Errors in: event.AfterValidate code:
Variable type mismatch: attempt to pass data of type 'P' to argument 'LayoutName ' is of type 'C'.
Here is the Initialize code
dim reports as c
reports = <<%text%
A5 Sales Aug08|A5 Sales Aug08@[PathAlias.ADB_Path]\bdi tracking.ddd
A5 Sales Dec08|A5 Sales Dec08@[PathAlias.ADB_Path]\bdi tracking.ddd
A5 Sales Nov08|A5 Sales Nov08@[PathAlias.ADB_Path]\bdi tracking.ddd
A5 Sales Oct08|A5 Sales Oct08@[PathAlias.ADB_Path]\bdi tracking.ddd
A5 Sales Sep08|A5 Sales Sep08@[PathAlias.ADB_Path]\bdi tracking.ddd
%text%
Here is the after validate code
store = CurrentForm.Controls.Store
reports = CurrentForm.Controls.ReportChoice
IF eval_valid("store") = .f. Then
goto skipreport
end if
dim filter as c
dim order as c
dim filename as c
Filter = "Store = \""+store+"\""
Order = ""
filename = session.session_folder + "tempreport.pdf"
filename = report.saveas(reports,"pdf",filter,order,filename,.f.)
if file.exists(filename)
currentform.RedirectTarget = session.session_url + "tempreport.pdf?" + time("hms3")
end if
skipreport:
I would actually love to have this report in excel instead of pdf does anyone know if its just as simple as
changing the extensions to xls. and changing the type to excel.
Thanks in advance.
Errors in: event.AfterValidate code:
Variable type mismatch: attempt to pass data of type 'P' to argument 'LayoutName ' is of type 'C'.
Here is the Initialize code
dim reports as c
reports = <<%text%
A5 Sales Aug08|A5 Sales Aug08@[PathAlias.ADB_Path]\bdi tracking.ddd
A5 Sales Dec08|A5 Sales Dec08@[PathAlias.ADB_Path]\bdi tracking.ddd
A5 Sales Nov08|A5 Sales Nov08@[PathAlias.ADB_Path]\bdi tracking.ddd
A5 Sales Oct08|A5 Sales Oct08@[PathAlias.ADB_Path]\bdi tracking.ddd
A5 Sales Sep08|A5 Sales Sep08@[PathAlias.ADB_Path]\bdi tracking.ddd
%text%
Here is the after validate code
store = CurrentForm.Controls.Store
reports = CurrentForm.Controls.ReportChoice
IF eval_valid("store") = .f. Then
goto skipreport
end if
dim filter as c
dim order as c
dim filename as c
Filter = "Store = \""+store+"\""
Order = ""
filename = session.session_folder + "tempreport.pdf"
filename = report.saveas(reports,"pdf",filter,order,filename,.f.)
if file.exists(filename)
currentform.RedirectTarget = session.session_url + "tempreport.pdf?" + time("hms3")
end if
skipreport:
Comment