8 Replies - 10791 Views - Last Post: 24 August 2011 - 12:02 AM Rate Topic: -----

#1 marathehv_512  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 14-August 11

problem to create reports in visual studio 2010

Posted 15 August 2011 - 12:55 AM

- I added report wizard to the solution.
- Then according to instructions i added fields to report.
- But how I can attach the report to the Windows form ?
- In Visual Studio 2005, I used crystal report viewer to attach reports on the forms.
- In Visual Studio 2010, how can I do this report connectivity to forms ?
Is This A Good Question/Topic? 0
  • +

Replies To: problem to create reports in visual studio 2010

#2 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 2241
  • View blog
  • Posts: 9,412
  • Joined: 29-May 08

Re: problem to create reports in visual studio 2010

Posted 15 August 2011 - 03:46 AM

Project -> Add New Item -> Reporting
Was This Post Helpful? 0
  • +
  • -

#3 marathehv_512  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 14-August 11

Re: problem to create reports in visual studio 2010

Posted 15 August 2011 - 11:59 PM

View PostAdamSpeight2008, on 15 August 2011 - 03:46 AM, said:

Project -> Add New Item -> Reporting



Thanks Sir.
Now I had created a report,
But in which way report should be added on the form ?
Guide me.

This post has been edited by marathehv_512: 16 August 2011 - 12:03 AM

Was This Post Helpful? 0
  • +
  • -

#4 Psyguy  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 69
  • View blog
  • Posts: 314
  • Joined: 12-January 11

Re: problem to create reports in visual studio 2010

Posted 16 August 2011 - 08:44 AM

As I understand it, you have an RDLC report file, correct?

IF that is the case then you need to bind that report to a ReportViewer.

1. Add a ReportViewer (from the control list) to your form.
2. Use the drop down menu in the top right hand corner of the ReportViewer to select which report you would like the ReportViewer to display.

That should give you the desired result.

Edited for clarity.

This post has been edited by Psyguy: 16 August 2011 - 08:45 AM

Was This Post Helpful? 0
  • +
  • -

#5 marathehv_512  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 14-August 11

Re: problem to create reports in visual studio 2010

Posted 20 August 2011 - 02:53 AM

Thanks sir,
-Now I have following error.

-"Error 1 The "Microsoft.Reporting.RdlCompile" task could not be loaded from the assembly Microsoft.ReportViewer.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. Could not load file or assembly 'Microsoft.ReportViewer.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. Animal_Database"

- Guide me
------ Harshad
Was This Post Helpful? 0
  • +
  • -

#6 Psyguy  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 69
  • View blog
  • Posts: 314
  • Joined: 12-January 11

Re: problem to create reports in visual studio 2010

Posted 20 August 2011 - 11:43 AM

Is the error during debug? What framework of .NET are you using?

I develop my programs in fw3.5 so I have to make sure that the assemblies for the ReportViewer are included in the build (since ReportViewer didn't come with 3.5). If the computer you are running it on is running with .NET fw 4.0, I'm not really sure why you would be getting that error.

I would try looking at your ReportViewer references and if their "download local" property is set to true or not.
Was This Post Helpful? 0
  • +
  • -

#7 marathehv_512  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 14-August 11

Re: problem to create reports in visual studio 2010

Posted 20 August 2011 - 09:07 PM

- "Error 1 The "Microsoft.Reporting.RdlCompile" task could
not be loaded from the assembly Microsoft.ReportViewer.Common,
Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.
Could not load file or assembly 'Microsoft.ReportViewer.Common,
Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or
one of its dependencies. The system cannot find the file specified.
Confirm that the <UsingTask> declaration is correct, that the
assembly and all its dependencies are available, and that the task
contains a public class that implements
Microsoft.Build.Framework.ITask.Animal_Database".


- This error is found when I run the project.

- .NET framework used by me is fw3.5

- I don't made any changes in "download local" property.

------ Harshad
Was This Post Helpful? 0
  • +
  • -

#8 Psyguy  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 69
  • View blog
  • Posts: 314
  • Joined: 12-January 11

Re: problem to create reports in visual studio 2010

Posted 22 August 2011 - 12:18 PM

By default, the download local property is set to false. You will have to either make sure each computer you will be installing this program on has the dll's for the ReportViewer already OR you will need to set the download local property(s) to true (much easier imo). I generally use ReportViewer version 10, so here is the list of the assemblies I have to include in my projects that have a report:

Project Properties-->References

Name Version Copy Local
Microsoft.ReportViewer.Common 10.0.0.0 True
Microsoft.ReportViewer.DataVisualization 10.0.0.0 True
Microsoft.ReportViewer.WinForms 10.0.0.0 True

Hope this helps.
Was This Post Helpful? 0
  • +
  • -

#9 marathehv_512  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 14-August 11

Re: problem to create reports in visual studio 2010

Posted 24 August 2011 - 12:02 AM

View PostPsyguy, on 22 August 2011 - 12:18 PM, said:

By default, the download local property is set to false. You will have to either make sure each computer you will be installing this program on has the dll's for the ReportViewer already OR you will need to set the download local property(s) to true (much easier imo). I generally use ReportViewer version 10, so here is the list of the assemblies I have to include in my projects that have a report:

Project Properties-->References

Name Version Copy Local
Microsoft.ReportViewer.Common 10.0.0.0 True
Microsoft.ReportViewer.DataVisualization 10.0.0.0 True
Microsoft.ReportViewer.WinForms 10.0.0.0 True

Hope this helps.




Thanks Sir,
I made the changes as per your suggestion. From 3 local properties I made 2 proprieties "True" but one property I could not found which is given below.
In which way it will be added ?
- " Microsoft.ReportViewer.DataVisualization 10.0.0.0 True "
-- Harshad

This post has been edited by marathehv_512: 24 August 2011 - 12:08 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1