Click here to Skip to main content
15,897,090 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
I'm working with vs2010 and sqlserver 2008 and i have installed sap srystal report now i have to create two different crystal report from two different tables of same database only one table in one report and another table in another report can any one help me plz?
Posted
Comments
JoCodes 26-Jan-14 9:16am    
Can you tell where are you stuck? It seems not much a complicated scenario
thatraja 27-Jan-14 3:31am    
Confusing. Explain clearly.

1 solution

Not sure exactly what you are looking for.

But if its 2 different table ( without any relation ) and 2 different Reports then simply use 2 different SqlAdapter with separate StoredProcedure and fill to Different Datatables.
These two DataTables can be in a single Dataset and can be accessed separately to serve specific Reports .


Something like

SqlDataAdapter adptr1 = new SqlDataAdapter("sp1",connection);
SqlDataAdapter adptr2 = new SqlDataAdapter("sp2",connection);
DataSet dataset = new DataSet();
adptr1.Fill(dataset, "Table1");
adptr2.Fill(dataset, "Table2");

//Can be accessed like
dataset.Tables["Table1"] // for report 1
dataset.Tables["Table2"]//for report 2


Above approach is based on your need but can be done with different ways too.

Please specify if anything else your requirement is.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900