Skip to content

Set-RsRestItemDataSource fails to update linked data sources in reports #398

@danubie

Description

@danubie

Do you want to request a feature or report a bug?

A bug request.

What is the current behavior?

If a report is configured with a linked data source, updating the datasource of the report throws an error.
Message is "Failed to update data sources for ... Invalid data source specified: @{...}"

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

A demo of that case is already documented in #383.

What is the expected behavior?

Updating a linked datasource of a report is possible.
The cause is, that the property "IsReference" is not checked when checking datasource, connectionstring ... (lines180 ff)

Which versions of Powershell and which OS are affected by this issue? Did this work in previous versions of our scripts?

Both PS5.1 and PS7 show the same behaviour (not OS dependent). Due to the files history I would guess, that it failed ever since (e.g. see also #383).

Proposed fix

Add a check to $ds.IsReference when checking datasource, etc.
I would like to provide a PR showing a test case and the fixed version - if you agree

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions