I\'ve an asp button on an aspx :
Your method must be declared as static and decorated with [WebMethod]. So, your method should be:
[WebMethod]
public static void GetReport()
{
// Your code here
}
For more information, please take a look at this post.
EDIT!!!
I see you use some controls in your code (like txtInvoiceFrom, txtInvoiceTo). After making your method static, you cannot access those controls anymore. To solve this problem, please follow these steps (take txtInvoiceTo as an example):
txtInvoiceTo.Text or something similar. Pass it as a parameter.txtInvoiceTo data from client-side, using jQuery or something else (your choice), and pass it to the Ajax to post to server.txtInvoiceTo data by jQuery, you can do: $('#<%= txtInvoiceTo.ClientID %>').val()