Monday, March 26, 2012

Invalid Report Source

I developed a project with a form one main report and three subreports.

I was able to run this report well in this project.

But if i include it in my main project it throws an error "Invalid Report Source" and my viewer is blank but the "Main Report" tab is there present.

I use dataset as the datasource for my crystal report.
If i use the dataset to fill my datagrid it is giving the value.

So with the situation i understand that the dataset is getting filled and the report is also geting the data. The error comes in the line

RptViewer.ReportSource = Rpt_Doc. '(Report Document Object)

One main thing is i have not used any error handler but the code still continue to work properly without being crashed.

If i give 'Try catch' error handler also i the same error is only prompted.

The main project was first developed in vs.net 2000 and the project was upgraded to 2003.

Will this be the reason for the report being giving the errorI got the solution through one of my friend.

she got it from another friend.

So that was a long chani to get the solution

the solution is

The error message appears because the incorrect versions of the Crystal DLL files are referenced.

To correct this behavior reference the correct version of Crystal DLL files.

Adding the Correct References
----------

1. Open the VS .NET project.

2. In the 'Solution Explorer' window, right-click the 'References' folder and choose the 'Add Reference' command. The 'Add Reference' window appears.

3. Verify the References for all Crystal DLLs are version 9.1.5000. If they are not version 9.1.5000, select the 9.1.5000 version DLLs and click the 'Select' button.

4. Click the 'OK' button.

5. Save and run your application.

If running the application you find the DLLs revert to the version observed prior to your updates, complete the following steps:

Reverting DLLs Back to Version 9.1.5000
------------

1. Right-click the project name in the solution explorer and select the 'Properties' command. The 'Properties' window appears.

2. Under the 'Common Properties' folder, select 'References Path'. The 'Reference Path' window appears.

3. Delete all entries in this window and click 'OK'.

4. Repeat steps 2 through 4 of the 'Steps to Add the Correct References Section'.

Upon completing the listed steps, the application runs and reflects the correct References.

she send me this thru my mail i have copied and pasted it here

so it may be helpful to other who visit this forum

Thanks a lot for all those who tried to solve this problem.

dont forget to rate my post

No comments:

Post a Comment