cancel
Showing results for 
Search instead for 
Did you mean: 

Invalid Path for Report File after scrolling through some pages of an Report

Former Member
0 Kudos

Hello,

I'm publishing an report with CrystalReports Runtime Engine for .NET-Framework 4.0 (32-bit) on an aspx-Page  (DotNet 2.0) using IIS 7. When I creating an report, everything is fine, but after scrolling through several pages of the report, i get the error-message: "invalid path for report file", but the path should be fine. Reloading the Website won't solve the problem. The only way to solve this, is at the moment to overwrite the dll-file, there the bussiness-logic and the xml-Dataset for Report is contained. Then i can create reports untill the error occurs again. It is reproducable.

perhaps you've got an idea.

Here's some code:

Here I have my strongly typed DataSet in my dll-File:

There I store the data that I use in my report.

Then I create a new instance of that DataSet:

private StraBeVerzDS strDS = new StraBeVerzDS();

Afterwards I fill it:

strDS.DataTable1.Rows.Add(strRow);

Here I fill it with a DataRow.

Finally I pass it to my report to display the data:

ReportDocument document = new ReportDocument();

document.Load(serverPath);

document.SetDatabaseLogon("user", "pass", @"server_name", "db_name");

document.SetDataSource(straDS);

Then the report is shown in my website, I can scroll through its pages, until I did this 74 times, then I get the error message “Invalid path for report file”. It’s not at the same page it’s everytime after 74 pages I scrolled over.

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

A question:

If you are passing a dataset to the report, why are you also logging it on to the database? The whole point of using datasets (as far as CR is concenred) is that you can forget about the database permissions, logon params, etc., etc. E.g.; remove:

document.SetDatabaseLogon("user", "pass", @"server_name", "db_name");

See if that helps. You may also want to look into placing the report into a session.

- Ludek

Follow us on Twitter

Got Enhancement ideas? Try the SAP Idea Place

Share Your Knowledge in SCN Topic Spaces

Answers (0)