|
|
Forums » .NET » .NET »
|
Dataset to Crystal Report.... |
Posted Date: 20 Aug 2012 Posted By:: Lawrence Member Level: Gold Member Rank: 321 Points: 5
Responses:
3
|
Hi Everyone, I would like to bind dataset values to crystal report or Report viewer..... Here is my coding...I bind dataset then how how to bind dataset to crystal report..... Just tell me... Here is my coding....
Coding: cn.Open(); cmd = new SqlCommand("select standard, Section, Medium, sum(distinct Male) as Boys, sum( distinct Female) as Girls, sum(Male)+sum(Female) AS Total from (select Standard,[Section], Medium,(case when Sex='M' then count(Sex) else '0' end) as Male, (case when Sex='F' then count(Sex) else '0' end) as Female from student WHERE Medium='" + DropMedi.SelectedItem.Text + "' AND Standard IN(" + value + ") GROUP BY Standard,[Section],sex,Medium) a group by Standard,Section,Medium", cn); SqlDataAdapter da = new SqlDataAdapter(cmd); DataSet ds = new DataSet(); da.Fill(ds);
How to do...Just tell me....
Thanks In Advanced
|
Responses
|
#684766 Author: RayalaHariKishore Member Level: Gold Member Rank: 52 Date: 20/Aug/2012 Rating:  Points: 0 | hi, go through this article so you can do it by yourself , this is step by step tutorial.
Rayala HariKishore
try..try..try...you achieved it. http://rayalaharikishore.wordpress.com/
| #684767 Author: saravanakumar Member Level: Gold Member Rank: 196 Date: 20/Aug/2012 Rating:  Points: 4 | hi see this,
SqlDataAdapter da = new SqlDataAdapter("select * from out_gatematerial where gatepass_no='" + passno.Trim() + "'", con); DataSet ds = new DataSet(); da.Fill(ds, "table"); con.Close(); Gate_Material_out cry = new Gate_Material_out(); cry.SetDatabaseLogon("asp_apps", "asp_apps", "SUNARKSBS", "MM", true); cry.RecordSelectionFormula = "{out_gatematerial.gatepass_no}=" + passno.Trim() + ""; cry.SetDataSource(ds.Tables[0]); crys_viewer.ReportSource = cry; crys_viewer.DataBind();
|
|
| Post Reply |
|
|
|
You must Sign In to post a response.
|
|
|
|
|
Active MembersTodayLast 7 Daysmore... Talk to Webmaster Tony John
|