I'm trying to print a report (pdf) that has three filters: Start Date, End Date and ID No of the person running the report. In my code, the Start Date is "vdate," the End Date is "vdate2," and the ID No is "vidno."
In the actual report, the Date field is called "date" and the ID No. field is called "Idno_Bhpd."
With all three filters in the code nothing happens upon clicking on the Submit Button, but if I remove one of the date filters, it works fine. (Of course it limits the report to just that one day.)
Here's the code that works with two filters:
And here's the code with all three filters that DOESN'T work:
What am I doing wrong with the second string of code?
In the actual report, the Date field is called "date" and the ID No. field is called "Idno_Bhpd."
With all three filters in the code nothing happens upon clicking on the Submit Button, but if I remove one of the date filters, it works fine. (Of course it limits the report to just that one day.)
Here's the code that works with two filters:
HTML Code:
dim cFilter as c cFilter = "dtoc(date) = '" + vdate + "' .and. Idno_bhpd = '" + vidno + "'" filename = session.session_folder + chr(92) + "foo.pdf" report.saveas("timesheet@[PathAlias.ADB_Path]\admin_bhpd.dbf", "pdf", cfilter,"", filename, .f.) if file.exists(filename) response.redirect(session.session_url + "foo.pdf?" + time("hms3")) end if
And here's the code with all three filters that DOESN'T work:
HTML Code:
dim cFilter as c cFilter = "dtoc(date) = '" + vdate + "' .and. '" + vdate2 + "' .and. IDNo_bhpd = '" + vidno + "'" filename = session.session_folder + chr(92) + "foo.pdf" report.saveas("timesheet@[PathAlias.ADB_Path]\admin_bhpd.dbf", "pdf", cfilter,"", filename, .f.) if file.exists(filename) response.redirect(session.session_url + "foo.pdf?" + time("hms3")) end if
Comment