13 Replies - 55064 Views - Last Post: 10 May 2010 - 12:49 AM
#1
How to display records from multiple Tables using Crystal Report in a
Posted 08 April 2008 - 03:04 AM
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.
More Than Two. etc.
Its Urgent , pls help me
Thanks,
Kamlakar
Replies To: How to display records from multiple Tables using Crystal Report in a
#2
Re: How to display records from multiple Tables using Crystal Report in a
Posted 10 April 2008 - 07:42 AM
Hope this helps! If you have any other questions just ask.
#3
Re: How to display records from multiple Tables using Crystal Report in a
Posted 11 April 2008 - 12:55 AM
JasonMcAuley, on 10 Apr, 2008 - 07:42 AM, said:
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.
Tel me the Procedure.
Its Urgent , Help Me !!!
Bye,
Kamlesh
#4
Re: How to display records from multiple Tables using Crystal Report in a
Posted 11 April 2008 - 07:37 AM
CREATE PROCEDURE My_Stored_Procedure AS 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 April 2008 - 07:45 AM
#5
Re: How to display records from multiple Tables using Crystal Report in a
Posted 14 April 2008 - 09:51 PM
JasonMcAuley, on 11 Apr, 2008 - 07:37 AM, said:
CREATE PROCEDURE My_Stored_Procedure AS 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
#6
Re: How to display records from multiple Tables using Crystal Report in a
Posted 14 April 2008 - 09:59 PM
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.
Thanks,
Kamlesh.
#7
Re: How to display records from multiple Tables using Crystal Report in a
Posted 17 April 2008 - 05:42 AM
kamlesh, on 14 Apr, 2008 - 09:51 PM, said:
JasonMcAuley, on 11 Apr, 2008 - 07:37 AM, said:
CREATE PROCEDURE My_Stored_Procedure AS 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 .
Send me pls , Its Urgent.
Bye.
#8
Re: How to display records from multiple Tables using Crystal Report in a
Posted 17 April 2008 - 09:15 AM
Post your code like this:
Thanks.
#9
Re: How to display records from multiple Tables using Crystal Report in a
Posted 17 April 2008 - 11:34 PM
jayman9, on 17 Apr, 2008 - 09:15 AM, said:
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.
//*********************************************************//
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);
// myReportdocument.SetDataSource(ds.Tables[0].ToString());
CrystalReportViewer1.ReportSource = myReportDocument;
// CrystalReportViewer1.Zoom(1);
CrystalReportViewer1.DataBind();
//myReportdocument.Database.Tables["preview"].SetDataSource(myDS);
////myReportdocument.Database.Tables[0].SetDataSource(myDS);
////myReportdocument.SetDataSource(myDS);
//CrystalReportViewer1.ReportSource = myReportDocument;
//CrystalReportViewer1.DataBind();
}
//********************************************************//
Plsssssssss Help me ?
Bye,
Kamlakar.
EDIT: Code tags added
This post has been edited by PsychoCoder: 18 April 2008 - 12:33 AM
#10
Re: How to display records from multiple Tables using Crystal Report in a
Posted 21 April 2008 - 09:43 PM
kamlesh, on 17 Apr, 2008 - 11:34 PM, said:
jayman9, on 17 Apr, 2008 - 09:15 AM, said:
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.
//*********************************************************//
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);
// myReportdocument.SetDataSource(ds.Tables[0].ToString());
CrystalReportViewer1.ReportSource = myReportDocument;
// CrystalReportViewer1.Zoom(1);
CrystalReportViewer1.DataBind();
//myReportdocument.Database.Tables["preview"].SetDataSource(myDS);
////myReportdocument.Database.Tables[0].SetDataSource(myDS);
////myReportdocument.SetDataSource(myDS);
//CrystalReportViewer1.ReportSource = myReportDocument;
//CrystalReportViewer1.DataBind();
}
//********************************************************//
Plsssssssss Help me ?
Bye,
Kamlakar.
EDIT: Code tags added
Hi,
Thanks for ur reply.
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.
Pls send reply asap.
Thanks,
Kamlakar.
#11
Re: How to display records from multiple Tables using Crystal Report in a
Posted 03 May 2008 - 05:18 AM
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++)
{
DropDownList dl1 = new DropDownList();
dl1.ID = "Appt2" + i.ToString();
dl1.Width = Unit.Pixel(104);
TextBox T1 = new TextBox();
T1.ID = "Majadd" + i.ToString();
T1.Width = Unit.Pixel(100);
Button b1 = new Button();
b1.ID = "btnMaj" + i.ToString();
b1.Width = Unit.Pixel(100);
b1.Text = "MajAdd";
// PopulateCourses(dl1, dl2);
//dl = (DropDownList)PlaceHolder_Courses.FindControl("dl1");
//Response.Write(dl.SelectedItem.Text);
PlaceHolder_Major.Controls.Add(dl1);
PlaceHolder_Major.Controls.Add(new LiteralControl(" "));
PlaceHolder_Major.Controls.Add(T1);
PlaceHolder_Major.Controls.Add(new LiteralControl(" "));
PlaceHolder_Major.Controls.Add(b1);
PlaceHolder_Major.Controls.Add(new LiteralControl(" "));
}
}
Please tell me how to Bind value to Dropdown when i will enter some string in Textbox(Dynamically Created) click on Button (Dynamically Created) .
Pls Tell me Its Very Very Urgent?
Thanks,
Kamlesh
#12
Re: How to display records from multiple Tables using Crystal Report in a
Posted 04 May 2008 - 09:23 PM
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++)
{
DropDownList dl1 = new DropDownList();
dl1.ID = "Appt2" + i.ToString();
dl1.Width = Unit.Pixel(104);
TextBox T1 = new TextBox();
T1.ID = "Majadd" + i.ToString();
T1.Width = Unit.Pixel(100);
Button b1 = new Button();
b1.ID = "btnMaj" + i.ToString();
b1.Width = Unit.Pixel(100);
b1.Text = "MajAdd";
// PopulateCourses(dl1, dl2);
//dl = (DropDownList)PlaceHolder_Courses.FindControl("dl1");
//Response.Write(dl.SelectedItem.Text);
PlaceHolder_Major.Controls.Add(dl1);
PlaceHolder_Major.Controls.Add(new LiteralControl(" "));
PlaceHolder_Major.Controls.Add(T1);
PlaceHolder_Major.Controls.Add(new LiteralControl(" "));
PlaceHolder_Major.Controls.Add(b1);
PlaceHolder_Major.Controls.Add(new LiteralControl(" "));
}
}
Please tell me how to Bind value to Dropdown when i will enter some string in Textbox(Dynamically Created) click on Button (Dynamically Created) .
Pls Tell me Its Very Very Urgent?
Thanks,
Kamlesh
[/quote]
#13
Re: How to display records from multiple Tables using Crystal Report in a
Posted 16 December 2008 - 04:10 AM
#14 Guest_ARVIND KUMAR*
Re: How to display records from multiple Tables using Crystal Report in a
Posted 10 May 2010 - 12:49 AM
I HAVE A PROBLEM THAT I HAVE TO SHOW .XSD FILES IN ASP.NET BY DROP DOWN LIST IN CRYSTAL REPORT VIEWER. SO PLZ HELP ME ITS VERY URGENT FOR MY JOB.
PLZ PLZ ... HELP ME.
:- KUMAR
|
|

New Topic/Question
Reply




MultiQuote




|