Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi, I am trying to pass xml as parameter in embed url as rp variable though my asp.net framework application level.
Please can you help me with this.
string P_ID = '<Pr><id>25</id><id>32</id></Pr>';
string parameters = $"&rp:P_IDS={P_ID}&rp:START_DATE={START_DATE}&rp:END_DATE={END_DATE}";
EmbedUrl = embedInfo.embedUrl + parameters;
DECLARE @xml xml = @P_IDS; SELECT x.i.value('.', 'int') AS ID FROM @xml.nodes('/Pr/id') x(i);
using System.Web; // for HttpUtility var pIdXml = "<Pr><id>25</id><id>32</id></Pr>"; var start = startDate.ToString("yyyy-MM-dd"); // format counts! var end = endDate.ToString("yyyy-MM-dd"); var query = $"rp:P_IDS={HttpUtility.UrlEncode(pIdXml)}" + $"&rp:START_DATE={start}" + $"&rp:END_DATE={end}"; var embedUrlWithParams = $"{embedInfo.embedUrl}?{query}";
Full Microsoft guidance: Paginated Reports – URL parameters
Try building the URL with the encoding applied and refresh the embedded viewer; you should now see the parameter values arriving intact. If parsing or report execution still fails, copy the final URL into a browser address bar to confirm the encoded XML string is complete.
✔️ If my message helped solve your issue, please mark it as Resolved! 👍 If it was helpful, consider giving it a Kudos! |
Hi @Lakshmanan1 ,
Thanks for reaching out to the Microsoft fabric community forum.
It looks like the issue might be due to special characters in your XML string. When passing XML as a parameter in a URL, make sure the value is properly encoded. Also, confirm that your paginated report is set up to accept and handle XML input.
And also please go through the below documents which may help you in resolving the issue
https://learn.microsoft.com/en-us/power-bi/paginated-reports/parameters/pass-report-parameter-url
If I misunderstand your needs or you still have problems on it, please feel free to let us know.
Best Regards,
Community Support Team
User | Count |
---|---|
3 | |
3 | |
2 | |
1 | |
1 |
User | Count |
---|---|
9 | |
4 | |
3 | |
3 | |
2 |