RDLC Actions: Configure RDLC action to open a file in a disk(PDF) by providing the relative path

Avinash Rao 1 Reputation point
2022-02-23T11:29:22.463+00:00

I was trying to configure a Text box action to open a file in a disk.
I was able to achieve this by setting the absolute path to the file through textbox properties -> Actions -> Jump to URL and then provide a absolute path to the file
(Eg: "file:///C:/Users/H462586/Downloads/PDFGenerator/PDFGenerator/bin/Debug/Comments.pdf")
But, I will not always have the absolute path. I will have the relative path. How can I configure textbox properties -> Actions -> Jump to URL and then provide a relative path to the file?

SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
2,911 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Joyzhao-MSFT 15,576 Reputation points
    2022-02-24T05:54:26.313+00:00

    Hi @Avinash Rao ,
    An absolute URL uses the following format: scheme://server/path/resource
    A relative URL typically consists only of the path, and optionally, the resource, but no scheme or server. The following tables define the individual parts of the complete URL format.

    scheme
    Specifies how the resource is to be accessed.

    server
    Specifies the name of the computer where the resource is located.

    path
    Specifies the sequence of directories leading to the target. If resource is omitted, the target is the last directory in path.

    resource
    If included, resource is the target, and is typically the name of a file. It may be a simple file, containing a single binary stream of bytes, or a structured document, containing one or more storages and binary streams of bytes.

    To view a report that uses relative paths to external items, save the report to the report server, and run the report from there.

    Best Regards,
    Joy


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.