Click to See Complete Forum and Search --> : Crystal does not display anything when there is a Empty table


Solidad
June 2nd, 2009, 03:03 AM
I notice that when i query my DB and it resulted to no data (when there is no data matching my query). all the other reports will not be displayed as well.

For example: the example tables are being used to generate a report.
Table1
Table2
Table3

When i do a SQL to find what i need here are the number of result entries.
Table1 = 3
Table2 = 3
Table3 = 0

Table 1 generated 3 results, Table 2 has 3 results and Table 3 has no results.

The resulting output will be nothing being displayed on the report. since Table 3 is empty affecting all the other table on the report to not display as well?

How can i display the remaining two tables but keep the table in case there is a matching entry?

thanks.

jawadhashmi
June 3rd, 2009, 01:14 AM
Still the report will run once if there is no data but you have to remove the inner joins while joining the tables. The inner join enforces the tables to show only when there is matching data.

Keep your main report simple and put a table there which always has a single record. put other tables in subreports and put these subreports in the main report.

If you want to put all these tables in a the main report then you have to check the tables links. The links should be left outer join. The inner join will not work.

Solidad
June 6th, 2009, 10:54 PM
That actually that's what i did. i just did a on-demand subreport.

And i did something on my program to produce a entry when intRowMax on that dataset returned a 0 number. this way i can prevent a empty table.

thanks.