Sub reports with relative file path

Stimulsoft Reports.NET discussion
Post Reply
ctusch
Posts: 2
Joined: Thu Nov 09, 2023 5:29 pm

Sub reports with relative file path

Post by ctusch »

Hey, I cannot find a way to embed a sub report using a relative path to a local file. Only absolute paths seem to work. The reason I need this is so that the report files can be moved to another directory.
Lech Kulikowski
Posts: 6312
Joined: Tue Mar 20, 2018 5:34 am

Re: Sub reports with relative file path

Post by Lech Kulikowski »

Hello,

Could you explain your task in more detail? How do you run the report - is it viewer, designer, from code, etc?

Thank you.
ctusch
Posts: 2
Joined: Thu Nov 09, 2023 5:29 pm

Re: Sub reports with relative file path

Post by ctusch »

We have reports that we deliver to our customers. They are referencing sub reports. The sub reports always are in the same folder in relation to the main report. But the absolute path can be different for every customer installation. That's why the path to the sub report cannot be saved as an absolute path, but must be relative instead. But Stimulsoft cannot resolve relative paths, I think because it's using WebClient internally even for local files.

We run the report both in the designer as well as from code (to export it to PDF).
Lech Kulikowski
Posts: 6312
Joined: Tue Mar 20, 2018 5:34 am

Re: Sub reports with relative file path

Post by Lech Kulikowski »

Hello,

We need some additional time to investigate the issue, we will let you know about the result.

Thank you.
Toms
Posts: 1
Joined: Tue Dec 26, 2023 5:45 am

Re: Sub reports with relative file path

Post by Toms »

Hello,

Your situation with Stimulsoft reminds me a bit of the way one organizes personal letters and intimate texts that are often stored in specific folders, and their location changes depending on the context, but their value and content remain constant. Perhaps a similar approach might be useful here - considering sub-reports as independent but related elements, whose relative relationship needs to be dynamically resolved, much as one would do to find an important personal letter in a set of folders.
Visit my website here
Lech Kulikowski
Posts: 6312
Joined: Tue Mar 20, 2018 5:34 am

Re: Sub reports with relative file path

Post by Lech Kulikowski »

Hello,

Thank you for the suggestion.
Noramila
Posts: 6
Joined: Wed Dec 20, 2023 6:39 am
Location: India

Re: Sub reports with relative file path

Post by Noramila »

Use relative paths for sub reports in the main report to enable flexible file movement.

Thank you.
Lech Kulikowski
Posts: 6312
Joined: Tue Mar 20, 2018 5:34 am

Re: Sub reports with relative file path

Post by Lech Kulikowski »

Hello,

Thank you for the suggestion.
Post Reply