Forum Discussion
Not possible to refresh a web source in Report Server
- 3 years ago
Hi
The suggested solution helped. It was necessary to only have the main Url as the first parameter and then I added Relative Path and Headers as part of second parameter. The Web call now showed up as a Data Source and it was possible to publish it to Report Server.In PBIRS it was not possible to test connection, but I ignored that, since it was possible to define a schedule for the report.
Now, when refreshing the report I got an error where PBI claims that it is not possible to refresh due to dependent data. Holy Moly!!!.
(a simplified report was possible to refresh in PBIRS)Noticed that ithe same has happend for others.
So, original case closed and I will have to look into the refresh issue instead.
Hi! I have the same problem. I've searched through this article and much more, but I can't find why it doesn't work for me. Maybe you can point out the error?
let
url = "http://host:port/resto/api/",
headers = [#"Content-Type"="application/json"],
body = Text.ToBinary("{<query>}"),
token = Text.FromBinary(Web.Contents(url & "auth?login=" & "login" & "&pass=" & "pass")),//here I get a new token every time I update
Source = Json.Document(
Web.Contents(url & "v2/reports/olap?key="& token & "&reportType=SALES",
[Query =[token = Text.FromBinary(Web.Contents(url & "auth?login=" & "login" & "&pass=" & "pass"))] ,
Headers= headers,
Content=body])),
#"Converted to Table" = Record.ToTable(Source)
in
#"Converted to Table"
Rest was good and I was able to find a solution for myself.
let
Source = Json.Document(
Web.Contents("http://host:port/",
[RelativePath = "resto/api/v2/reports/olap?key="&
(Text.FromBinary(Web.Contents("http://host:port/",
[RelativePath = "resto/api/auth?login=" & "login" & "&pass=" & "pass"]))) & "&reportType=SALES",
Headers= [#"Content-Type"="application/json",
Content=body]])),
#"Converted to Table" = Record.ToTable(Source)
in
#"Converted to Table"