If there's "nothing happening", then there's no data being returned from your first query. You'll need to debug your code to find out why.
NB: Throwing and catching an exception is an extremely poor way of handling a
"missing required field" condition. It would be far better to simply exit the method if the fields are not provided:
if (string.IsNullOrEmpty(from_date.Text))
{
lblError.Text = "Please enter a start date.";
return;
}
if (string.IsNullOrEmpty(to_date.Text))
{
lblError.Text = "Please enter an end date.";
return;
}
if (ddlExpenseType.SelectedValue != "company_expense")
{
lblError.Text = "Please select a company expense type.";
return;
}
Or better yet, use the validation controls to give your users feedback on all validation errors at once:
Walkthrough: Validating User Input in a Web Forms Page | Microsoft Learn[
^]