By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,360 Members | 3,011 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,360 IT Pros & Developers. It's quick & easy.

How To Create Customizable Reports(Dynamic Reports) using CrossTab Query

P: 11
I want to create a custormizable report . For an example, there's a form with four combo boxes and two of them having database tables columns/field names as values in the combo box(one for select row filed and other one for select column filed in the report) when u select items in that combo boxes and press a Button then selected items should go to the crosstab query as parameters and execute the query. upto that i have done my coding part but at the moment im stuck with my work cos i dont know how to generate the report related to that crosstab query... here's the code for the crosstab query :-
-----------------------------------------------------
(cboColumns/cboProjectTitle/cboRows/cboIndicator)
These are the combobox parameters pass to the crosstab query after button's being clikced.
------------------------------------------------------------

(sSql = "TRANSFORM Max(IndicatorData.nValue) AS MaxOfnValue " + _
"SELECT " + Trim(Replace(cboRows, "_", ".")) + " " + _
"FROM [Indicator], IndicatorData, Region, Project " + _
"WHERE Project.tProjTitle='" + Trim(cboProjectTitle) + "' AND Project.nProjId=Indicator.nProjId AND Indicator.tIndicatorName='" + cboIndicator + "' AND Indicator.nIndicatorId=IndicatorData.nIndicatorId AND Region.nRegionId=IndicatorData.nRegionId " + _
"GROUP BY IndicatorData.nRegionId, " + Trim(Replace(cboRows, "_", ".")) + " " + _
"PIVOT Format(" + Trim(Replace(cboColumns, "_", ".")) + ",'yyyy') "
)

pls someone help me out to do this report or guide me to do this or is it possible to do customizable reports using crosstab query like dis?
Apr 6 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.