Shared WinForm and ASP.net
Hello,
our Project has a winform and web version, we need the same reports on both environments, so we'd like to know what is the best way to share all possible code and resources on both projects.
Our idea is
- make .frx files and put them on win and web projects.
- make a procedure that return a dataset to the caller: Win or web.
- register the dataset and use
is that possible? what is the best way to do it?
our Project has a winform and web version, we need the same reports on both environments, so we'd like to know what is the best way to share all possible code and resources on both projects.
Our idea is
- make .frx files and put them on win and web projects.
- make a procedure that return a dataset to the caller: Win or web.
- register the dataset and use
is that possible? what is the best way to do it?
Comments
Yes, it is possible. Store reports in .frx files. Register data before running a report. In winforms, use the code -
Report report = new Report();
report.Load("frxfile");
report.RegisterData(your_data);
report.Show();
In webforms, use WebReport component. Create WebReport.StartReport event handler and write the following code -
WebReport1.Report.RegisterData(your_data);