Join 117,573 Programmers for FREE! Ask your question and get quick answers from experts. There are 2,004 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!
i want to use crystal reports for displaying records from multiple tables in asp.net 2.0, i know how to display records using dataset in with crystal reports. Can anybody tell me hoe i will display records on crystal report from multiple Tables.
With SQL Server; I simply just call my stored procedures in Crystal Reports. With the stored procedures you can write queries that grab data from multiple tables.
Hope this helps! If you have any other questions just ask.
With SQL Server; I simply just call my stored procedures in Crystal Reports. With the stored procedures you can write queries that grab data from multiple tables.
Hope this helps! If you have any other questions just ask.
Hi, Thank fro reply. Can u tel me how to write sql statements in Stored Procedure in SQL 2000. Can u send me the code sample, how u wrote the code for displaying records from multiple tables using SP.
Select a.UserID, a.UserName, b.User_FontColour From [Users] a Inner Join User_preference b on a.UserID = b.UserID
GO
That is a simple stored procedure that will select the userID and UserName from the Users table and will select the User_FontColour from the User_preference table
You would do this in your SQL Server Enterprise manager. Open your database, right click on the stored procedures folder click "Create new stored procedure" and write your query.
When you are in crystal reports; you can then make reference to that stored procedure and it will automatically add the fields in your select statement as fields you can place on the report.
Hope that helps
This post has been edited by JasonMcAuley: 11 Apr, 2008 - 07:45 AM
Select a.UserID, a.UserName, b.User_FontColour From [Users] a Inner Join User_preference b on a.UserID = b.UserID
GO
That is a simple stored procedure that will select the userID and UserName from the Users table and will select the User_FontColour from the User_preference table
You would do this in your SQL Server Enterprise manager. Open your database, right click on the stored procedures folder click "Create new stored procedure" and write your query.
When you are in crystal reports; you can then make reference to that stored procedure and it will automatically add the fields in your select statement as fields you can place on the report.
Can u send the code for Crystal Report retriving records from multiple Tables using Asp.net2.0 with C# ,Its Urgent.
Can u also send the Design of Crystal Report for selecting records from multiple Tables. My Query work in Query Analyzer but in code it onlt returns all records from Tables.
Can u show me the code exactly how to fetch the Records from multiple Tables send me the code.Help me plsssssss, Its Urgent.
Select a.UserID, a.UserName, b.User_FontColour From [Users] a Inner Join User_preference b on a.UserID = b.UserID
GO
That is a simple stored procedure that will select the userID and UserName from the Users table and will select the User_FontColour from the User_preference table
You would do this in your SQL Server Enterprise manager. Open your database, right click on the stored procedures folder click "Create new stored procedure" and write your query.
When you are in crystal reports; you can then make reference to that stored procedure and it will automatically add the fields in your select statement as fields you can place on the report.
Hope that helps
Hi, Thanks for Reply can u send me some code sample with Crystal Reports showing selected record from multiple Tables using C#.net and ASP.net 2.0 .
Dream.In.Code has a policy by which we prefer to see a good faith effort on your part before providing source code for homework assignments. Please post the code you have written in an effort to resolve the problem, and our members would be happy to provide some guidance. Be sure to include a description of any errors you are encountering as well.
Dream.In.Code has a policy by which we prefer to see a good faith effort on your part before providing source code for homework assignments. Please post the code you have written in an effort to resolve the problem, and our members would be happy to provide some guidance. Be sure to include a description of any errors you are encountering as well.
Post your code like this:
Thanks.
Thanks Buddy, Here is the code i m posting , but remember that when i am retriving records from two, three or more tables it is returing all records when we bind to crystal Reports.
//see The code .
Plssssssssssss Help me out. I m new to Crystal Reports. //*********************************************************//
csharp
SqlConnection con = new SqlConnection(ConfigurationManager.AppSettings["ConnectionString"]); DataSet ds; protected void Page_Load(object sender, EventArgs e) { ds = new DataSet(); ds= (DataSet)Session["data"];
//da = new SqlDataAdapter("select* From salesummary", con); //ds = new DataSet(); //da.Fill(ds); CrystalDecisions.CrystalReports.Engine.ReportDocument myReportDocument; myReportDocument = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
//myReportDocument.Load(@"C:\Documents and Settings\Administrator\Desktop\MaitreeGiftShop _New\CrystalReport.rpt");
// // any of these three methods should work to fill the document // // //// myReportDocument.Database.Tables[0].SetDataSource(ds); myReportDocument.Database.Tables[0].SetDataSource(ds);
Dream.In.Code has a policy by which we prefer to see a good faith effort on your part before providing source code for homework assignments. Please post the code you have written in an effort to resolve the problem, and our members would be happy to provide some guidance. Be sure to include a description of any errors you are encountering as well.
Post your code like this:
Thanks.
Thanks Buddy, Here is the code i m posting , but remember that when i am retriving records from two, three or more tables it is returing all records when we bind to crystal Reports.
//see The code .
Plssssssssssss Help me out. I m new to Crystal Reports. //*********************************************************//
csharp
SqlConnection con = new SqlConnection(ConfigurationManager.AppSettings["ConnectionString"]); DataSet ds; protected void Page_Load(object sender, EventArgs e) { ds = new DataSet(); ds= (DataSet)Session["data"];
//da = new SqlDataAdapter("select* From salesummary", con); //ds = new DataSet(); //da.Fill(ds); CrystalDecisions.CrystalReports.Engine.ReportDocument myReportDocument; myReportDocument = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
//myReportDocument.Load(@"C:\Documents and Settings\Administrator\Desktop\MaitreeGiftShop _New\CrystalReport.rpt");
// // any of these three methods should work to fill the document // // //// myReportDocument.Database.Tables[0].SetDataSource(ds); myReportDocument.Database.Tables[0].SetDataSource(ds);
But paste only that code u have changed i m not getting all. I need to fetch only those records i have selected with condition not all records from database.
I am developing a asp.net application with C#. I have one dropdownlist with 10 nos. I have one button when i select 1,2,3 ......etc from dropdownlist and click on button then dynamically one dropdownlist ,ont Textbox and one Button will generate.
My Question is that when i add some Int or String value to text (dynamically created) Then the value should be bind to Dropdownlist on Button click(Dynamically Created).
Can anybody tell me how to do this?
Its very Very Urgent.
I am posting the code here.
private void AddMajor() { int MajCount = int.Parse(DropDown_Major.SelectedValue); for (int i = 0; i < MajCount; i++) {
I am developing a asp.net application with C#. I have one dropdownlist with 10 nos. I have one button when i select 1,2,3 ......etc from dropdownlist and click on button then dynamically one dropdownlist ,ont Textbox and one Button will generate.
My Question is that when i add some Int or String value to text (dynamically created) Then the value should be bind to Dropdownlist on Button click(Dynamically Created).
Can anybody tell me how to do this?
Its very Very Urgent.
I am posting the code here.
private void AddMajor() { int MajCount = int.Parse(DropDown_Major.SelectedValue); for (int i = 0; i < MajCount; i++) {