Error : Could not find a part of the path

Stimulsoft Reports.WEB discussion
Post Reply
ecpmiranda
Posts: 52
Joined: Sun Jun 05, 2016 9:35 pm

Error : Could not find a part of the path

Post by ecpmiranda »

I am using trial version and made some tests. We are interested to buy a license of Reports.Web.
I have found the following problem:

I create a Webform called "Viewer.aspx" and put a MobileViewer to run some tests.
When I open this form on the browser I pass in the url some parameters like this:

http://localhost:55006/Views/Viewer/1/2/3/4/5 and at the page load event I get these parameters via segments.

When I do this way I got the error " Could not find a part of the path c:\apps\Views\Viewer\1\2\3\4\5

The I made another test opening the form without the parameters and works fine.
Once I have opened the form without parameters, I can call the form again with parameters and then it works fine.

What am I doing wrong or is this a bug?

Regards,
Edson
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Error : Could not find a part of the path

Post by Alex K. »

Hello,

Can you please send us a simple project which reproduces the issue for analysis.

Thank you.
ecpmiranda
Posts: 52
Joined: Sun Jun 05, 2016 9:35 pm

Re: Error : Could not find a part of the path

Post by ecpmiranda »

This sample was created with Visual Studio 2013 and I added the Default and Report webforms used in a Stimulsoft sample.
I made simple modifications in these forms so we could reproduce the problem.

Run application and you will see three buttons.
- The first button opens Report webform without url segments and shows invoice1.mrt
- The second button opens Report webform with url segments and shows invoice1.mrt
- The third button opens Report webform with url segments and shows invoice2.mrt

To reproduce the problem run the application and follow this sequence:
- Click second button to Open Report webform with urlsegments. The problem occurs.
- Go back to Default page.
- Click third button to Open Report webform with urlsegments. The problem occurs.
- Go back to Default page.
- Click first button to Open Report webform without urlsegments. The problem occurs.

Now close the solution, run the application and follow this sequence:
- Click first button to Open Report webform without urlsegments. The report invoice1.mrt shows ok
- Go back to Default page.
- Click second button to Open Report webform with urlsegments. The report invoice1.mrt shows ok
- Go back to Default page.
- Click third button to Open Report webform with urlsegments. The report invoice2.mrt shows ok

Hope this sample helps reproduce the problem!

Regards
Edson
Attachments
StimulsoftEvaluation.zip
(5.26 MiB) Downloaded 306 times
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Error : Could not find a part of the path

Post by Alex K. »

Hello,

Please try to set the following option:
StiOptions.Engine.AllowSetCurrentDirectory = false;

Thank you.
ecpmiranda
Posts: 52
Joined: Sun Jun 05, 2016 9:35 pm

Re: Error : Could not find a part of the path

Post by ecpmiranda »

Problem solved!! Thank you very much!!
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Error : Could not find a part of the path

Post by Alex K. »

Hello

We are always glad to help you!
Let us know if you need any additional help.

Thank you.
Post Reply