Click here to Skip to main content
15,887,477 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
dear friends i am doing a desktop application for my company.
Actually i need to display some content in windows report.I have a dataset and a datatable(reporttable) with in dataset.I use this dataset as source of the report.

Query = "SELECT Item_Description,Stock FROM Inventory_Control";
.
.
.
public DataTable table = new DataTable();
LogInDBAdapter.Fill(table);

from the filled table i need to get the data for the dataset(datatable-reporttable) to display it in windows report.

kindly help me complete this project.
Thank you
Posted
Updated 15-Jul-10 7:33am
v3
Comments
saloni15 15-Jul-10 12:43pm    
Couldn't get 2nd part of ur problem...plz elaborate or write the code u r running...also for report r u using crystal reports or anydng else

2 Options:

1: Instead of using public DataTable table = new DataTable();
Use: DataSet table = new DataSet(); Keep rest of code as it is and you can directly use this dataset now.
Use table in your report.

2: Create a new dataset and add this table to it.
DataSet myDS = new DataSet();<br />
myDS.Tables.Add(table);


Use myDS in your report.
 
Share this answer
 
thank sandeep,
I got some idea now,but even i am not clear about the issue,

In the project i am using the class(icclass) where i am filling the table using the query.
In my form i declared a dataset dset= new dataset();
dset.tables.add(icclasss.table);
I Added a new dataset named dataset1,and i create a datatable1 in that.i planned to create a report using this datatable1.
Now i created a object dataset1 ds = new dataset1();
Now i want to assign the dset table values to the ds table(datatable1).
or otherwise i want to create a report directly from the filled table.
You help is needful!
thank you!
 
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