I'm new to this Java topic and I run into a problem, I have a form where gender reports PDF in which I have several options to generate them, full report of the table, detailed report by date, report with just a search using SQL LIKE statements and reports by columns of the table, well finally I can generate the reports and queries, the problem is that I only have one button to generate the 4 reports in different ways, depending on the data you enter in the boxes text (String, all data is of this type).
How do I make the condition to select the appropriate report depending on what you enter in the text boxes?
This is the condition I use
String a = funciones.getFecha(fechad);
String b = funciones.getFecha(fechaa);
String c = txtbusqueda.getText();
if ((a != null) && (!a.equals("")) && (b != null) && (!b.equals("")) && (c!=null) && (!c.equals(""))) {
mi reporte 1
}
else if ((c != null) && (!c.equals(""))) {
reporte2
}
else{
reporte3
}
I just want to evaluate if the variables contain values or not but I do not know how: '(