Click here to Skip to main content
15,895,084 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hello, I've basically created a datatable purely out of codes i.e: columns added manually info in columns added manually, etc, How can I create a report with a specific design using this datatable?

I've done a lot of research on this via google, but I can't seem to find a solid solution, This is really the dilemma for me as now all the information shown on my application is correct, but I can't seem to create the needed design to print them, it's really quite the concern when it's just printing out the information that halts your application from completion.

At the moment, I've been able to display this information on a datagridview and export that to excel, though the lack of "visuals" is not going to cut it when the export was made to excel.

I recently posted a question though it seemed to be a bit abstract, as a result, I didn't get a solution, I'm hoping that this is a little more informative,

What I've been able to conclude via research was:

dgv.DataSource = ds.Tables[0].DefaultView;
ReportDataSource rs = new ReportDataSource("DS",ds.Tables[0]);
ReportViewer1.LocalReport.DataSources.Clear();
ReportViewer1.LocalReport.DataSources.Add(rs);
ReportViewer1.LocalReport.Refresh();
ReportViewer1.RefreshReport();

despite the fact that ds2.Tables[0] has information it doesn't show anything in the reportviewer shown on the form.


How do I fix the code that's written, Should I try this with crystal reports? What can I do to make this datatable that was purely coded show up in a report?

At the moment the design of the report is actually finished on datagridview, i.e: Row size, fonts etc if my previous questions do have positive answers is there anyway to take the design of the datagridview and use it on the reports somehow?

Thank you.
Posted
Updated 23-Sep-14 1:52am
v2

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