Page 1 of 1

Error : Could not find a part of the path

Posted: Sun Jun 05, 2016 9:57 pm
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

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

Posted: Mon Jun 06, 2016 12:58 pm
by Alex K.
Hello,

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

Thank you.

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

Posted: Thu Jun 09, 2016 4:19 pm
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

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

Posted: Fri Jun 10, 2016 11:08 am
by Alex K.
Hello,

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

Thank you.

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

Posted: Fri Jun 10, 2016 12:55 pm
by ecpmiranda
Problem solved!! Thank you very much!!

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

Posted: Fri Jun 10, 2016 1:18 pm
by Alex K.
Hello

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

Thank you.