Hi Guys,
I am running crystal reports 2011 and have issues when doing financial reports. my scenario is as follows:
I have a 3 sql commands that displays results in seperate crosstabs and does not return same result set e.g
1.
Select period,site,type_id,type_name, sum(total) total from table_types where period >={?period_from} and period <= {?period_to} and site={?site_id} group by period,site,type_id,type_name
2.
Select period,site,gateway,currency, sum(net_credit) net_credit,sum(credit) credit from table_gateway where period >={?period_from} and period <= {?period_to} and site={?site_id} group by period,site,gateway,currency
3.
Select period,site,sum(total_amount) amount ,sum(total_available_credits) available,sum(credits_owe) owe from table_rollout where period >={?period_from} and period <= {?period_to} and site={?site_id}
all of these tables have millions of rows minimum is 7million rows, they all share same parameters.
when I run these report I get Invalid argument or sometimes commands out of sync. when running them on the database directly one by one all queries work
I can't combine them as the queries takes long to run. reason all these have to be in same report is that I need to add totals from types with totals from rollouts for specific period example 201310 and calculate averages and moving averages.
all these totals and averages when calculated are displayed in a new crostab which means I must use arrays
.
how can I solve this, just to solve command out of sync or invalid argument and be able to run a Cartesian query
all your input highly appreciated
Regards
Themba