.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

how to generating crystal report using sqlquery(behind the code) in aspnet with c# using sqlserver.

Posted By: kavitha     Posted Date: January 10, 2011    Points:2   Category :ASP.Net
hi friends,

how to generating crystal report using sqlquery(behind the code) in aspnet with c# using sqlserver.

please give the code & detail.

thanks in advance.


Responses
Author: suwarna             
Posted Date: January 12, 2011     Points: 5   

Try

myConnection = New SqlConnection("Data Source=MCA-16E44B82E4D\SQLEXPRESS;Integrated Security=True;" & _
"Initial Catalog=master;")
MyCommand.Connection = myConnection
MyCommand.CommandText = "SELECT * FROM prog_desig where desig='" & ComboBox1.Text & "'"
MyCommand.CommandType = CommandType.Text
myDA.SelectCommand = MyCommand

myDA.Fill(myDS, "prog_desig")
rpt.SetDataSource(myDS)
CrystalReportViewer1.ReportSource = rpt

Catch Excep As Exception
MsgBox(Excep.ToString())
End Try


this report for vb.net u cAN MODIFY IN ASP




Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend