Dear All,
I am using C# Express 2005 and SQL Server Express 2005 as well. I am planning to use no-touch deployment as well. At the moment, I am stuck as I cannot find any report designer to make my report work in the enviroment of C# Express. Is there any way or extension that I can include into the C# Express so that I can use to build the report
Highly appreciate your advice.
Regards,
LG

C# Express 2005 and Report
Gregory A. Beamer - MVP
Install Visual Web Developer 2005 Express Edition (http://msdn.microsoft.com/vstudio/express/vwd/download/). Then install the Report Designer and Report Viewer control from http://download.microsoft.com/download/4/4/D/44DBDE61-B385-4FC2-A67D-48053B8F9FAD/SQLServer2005_ReportAddin.msi). You can edit the .rdlc files using Web Developer while working with the report control in C# express.
Hope this helps.
TankVB
Check out http://www.gotreportviewer.com/ as a starting point.
Yeah, there is manual intervention required when designing reports for Windows forms applications using the Express versions. But once you understand the basics, it becomes easy to work arround the constraints.
If you are using the express Editions, and want to use the drag-and-drop data binding support for the report designer, you'll need to create a web project using VWD and add your datasources to that project first. Then replicate the creation of the data sources in your C# Express project and then add the rdlc files to the C# Express project.
As an option, you can edit the report definition directly in your C# project. In the solution explorer, right click the added rdlc file and select Open. Select to open the file using the XML editor. This will give you the option to edit the report definition from within the same C# Express project, but will not let you edit the report using the designer as in VWD Express.
If you take a look at the samples provided in the gotreportviewer site you'll see several C# examples that are good starting points.
Unless support for the designer becomes available in the Express versions of VB or C#, we're stuck with using VWD Express - or you could get VS 2005
ORE
Hi again Paully...
Sorry if I am being a bit stupid here, but I cannot get your solution to work properly.
I can get the report to design and render 100% in VWD. If I F5 the page displays the report 100%.
I then copied the .rdlc file to my C# WinForm apps folder, and added it to the project. I then used the SmartTag of the ReportViewer to set the report name to the copied .rdlc.
After that, I created a datasources with the same name as the one I used in VWD, hit F5 to run it and nada. No report renders. Just a blank page.
If you don't mind Paully, could you detail the steps for me
TIA
grshore
Alfonso Larriva
Hi Hagen.
This is what I did to get it working.
Now in your Visual C# application, you have to replicate the data source you created in 3 above exactly. Then dump a ReportViewer control on your WinForm, set the report name to the report you have been working on, then click "Datasources" in the SmartTag to set the datasource you have created in Visual C#.
That is it. You should be away now. It should work 100%. The main key being that the datasource you use in VWD must be EXACTLY the same in Visual C#.
HTH
iCore
JGHolmes
There is still alittle problem with I test-run my app, though. I am getting a "A data source instance has not been supplied for the data source 'dstInventory_tblStok'" error message on the reportviewer control.
I am sure I am getting it wrong somewhere, but just can't figure it out. Maybe I should just follow suit and get VS.NET 2005 instead of the express ed.
someone who cares
No worries. I got it working correctly. I was omitting the "RefreshReport()" method call in my forms Load event. After doing that it displayed the errors I needed to see to get it working.
IE: I have it funcional now. It is just a bit of a pain having to work in VWD then switch to my app and run it to test the report. If I use only ONE datasource in the report, then I can test it right there in VWD by hitting F5. As soon as I add a second datasource I get errors when viewing the report in the browser, but it works 100% from my app.
I think I am going to just take the plunge and purchase VS 2005 Prof. At least I will be able to design my reports properly :)
fzane
NimeshNedungadi
Thanks for the quick response Paully.
I am looking at getting Visual Studio 2005, but am a little reluctant. I just recently (about 8 months ago) purchased the professional version of Delphi 2005. I have been an avid Borland supported since the Pascal 6 days (which is a loooong time). When .NET 2.0 was released, I went looking for an update so I could code on the new release, but nada. They reckon I must purchase the newer version of Borland Studio to get it. That is a complete rip-off if you ask me. Thankfully, I had been coding all newer projects in C# Builder (part of Delphi 2005) so when I got completely fed-up I clicked that kewl little link in the IDE "Export to Visual Studio", installed C# Express and VWD and re-compiled with a few mods to make.
So ye, taking my time a bit to decide if I want to fork out cash again for another IDE. Quite honestly, VWD and C# Express meet all my needs. Just no decent support for reporting. My Delphi came with Rave Reports which is brilliant. And ye - I know - VS 2005 has decent reporting using ReportViewer - just a bit tight with my cash at the moment :)
I am sure, using your solution, I will get things working. Time will tell, and then perhaps I will take the plunge and start buying MS products to see me into the future :)
Sanct
That error indicates that the report definition is looking for an instance of a datasource that is bound to "dsInventory_tblStok".
Click the Smart Tag of the report and select "Choose Data Sources".
You will see 2 columns in the dialog that pops up.
Report Data Source: One of the values in here will be "dsInventory_tblStok".
DataSource Instance: This column (related to "Report Data Source") will probably say "None". Click the dropdown and navigate to the datasource that represents the report datasource. The relevant components will be created on the design surface of you WinForm and you should now be away.
When the report fires up, it will then know that the "dsInventory_tblStok" is bound to the new instance you just created and will draw the data. Just remember to call ReportViewer.RefreshReport() in the Load event of the Winform else nothing will happen. This is where I got caught :)
HTH
John Wadlow
Thanks for redirecting me to this thread.
I am confused though. After creating the report in VWD, and transfering the .rdlc file into the C# project folder, do I need to make another reportviewer control in the WinForm to display the .rdlc file
trustfundbaby
Is it possible to point us to some examples and tutorial type steps please Paully.
I have done as you suggested, and can indeed edit the .rdlc file in VWD, but cannot find out how to bind a textbox to a field name, or add a report datasource to the project etc...
I am assuming, with the lack of support in C# Express, that there is a lot of manual intervention. Just taking a guess though.
Can you help out please
EricGu
The report is a simple report with one label on it that binds to a single field. I am just getting the feel for how I am supposed to do the design in VWD yet use in Visual C#.
In VWD, I dropped a table onto the design surface of the report. Created a datasource, then dragged the field "ScaleTicketNo" onto the "Details" part of the table. Built then ran and it displayed.
There is not much to send really. It is just getting it to work in C# that confuses me.