PDA

View Full Version : Dialog Builder Print Question


ABC123

seidel1
09-27-2004, 10:37 AM
I have a Dialog builder I am trying to get to work, called Aa-test.

The dropdown control within Aa-test is named DB1. It’s supposed to execute a predefined report called WEDCWO. The filtering from the dialog should put the selection from the dropdown into the filter, i.e. if I select “NC1” from the dropdown, it should be part of the filter.

When I hit the submit button I get the following message:

Errors in: event.AfterValidate code:
Invalid report filter expression: 'Parea_List ="NC1"'.

However if we put the same variables in native A5 it runs fine.

Here is the code that is running:

dim filter as c
dim order as c
Filter = "Parea_List =" +quote(DB1)
Order = "Pclient+Pproperty"
Dim filename as c
filename = session.session_folder + chr(92) + "tempreport.pdf"

report.saveas("WEDCWO","pdf",filter,order,filename,.f.)
if file.exists(filename)

currentform.RedirectTarget = session.session_url + "tempreport.pdf?" + time("hms3")

end if

Q1; What would cause this error?

Q2; can I combine two filters, i.e. I want this report to be prefilterd on todo = .t. + "Parea_List =" +quote(DB1), is this possible?

Question 3: Am I using the proper syntax for the order as I have stated above

Thanks in advance

Jim