<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Getting data using Procedure by using the  SYS_REFCURSOR. in Report Server</title>
    <link>https://community.fabric.microsoft.com/t5/Report-Server/Getting-data-using-Procedure-by-using-the-SYS-REFCURSOR/m-p/4690793#M40682</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;I am stuck, for passing the value&amp;nbsp;:prSubscriber from Power BI to Oracle procedure.&lt;/P&gt;&lt;P&gt;When i am passing the value to the Procedure it is giving error as&amp;nbsp;&lt;/P&gt;&lt;P&gt;there is an error.&amp;nbsp;ORA-01008: not all variables bound or&amp;nbsp;&lt;/P&gt;&lt;P&gt;ORA-06550: line 5, column 6:&lt;BR /&gt;PLS-00306: wrong number or types of arguments in call to 'XYZ_COLLECTIONS_SELECT_TEST'&lt;BR /&gt;ORA-06550: line 5, column 6:&lt;BR /&gt;PL/SQL: Statement ignored.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;:prSubscriber is a multivalue parameter and is ihave only one value, i get the data back. if more than 1 values are selected, it gives the above error&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Basically,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;:prSubscriber is not going as a single parameter to the Oracle Procedure.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I feel I missign some steps here. Any suggetions&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;TIA&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Sobha&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 13 May 2025 12:19:05 GMT</pubDate>
    <dc:creator>Sobha</dc:creator>
    <dc:date>2025-05-13T12:19:05Z</dc:date>
    <item>
      <title>Getting data using Procedure by using the  SYS_REFCURSOR.</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Getting-data-using-Procedure-by-using-the-SYS-REFCURSOR/m-p/4656048#M40331</link>
      <description>&lt;P&gt;Have a &lt;STRONG&gt;Oracle procedure&lt;/STRONG&gt;, which will insert data to the global temparary table and&amp;nbsp; selecting the data from the table using&amp;nbsp;SYS_REFCURSOR as the output parameter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;My procedure is as below&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;CREATE OR REPLACE PROCEDURE DORIS.XYZ(&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;prBeginDate IN Varchar2 := '2024',&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;pGroupID IN Varchar2:= NULL ,&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;c_direct_reports OUT SYS_REFCURSOR)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;AS&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;BEGIN&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Insert into Sub_ids_list_xyz values ('10002521' );&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;OPEN c_direct_reports FOR &lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;select * from Sub_ids_list_xyz;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;END;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;/&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Calling the procedure as below in the &lt;STRONG&gt;Text&lt;/STRONG&gt; in the &lt;STRONG&gt;Query Type&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Declare xx SYS_REFCURSOR;&lt;BR /&gt;Begin&lt;BR /&gt;DORIS.XYZ(&lt;BR /&gt;'2024',&lt;BR /&gt;NULL ,&lt;BR /&gt;xx);&lt;BR /&gt;DBMS_SQL.RETURN_RESULT(xx);&lt;BR /&gt;End;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I am getting blow error while running&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ORA-08103: object no longer exists ---------------------------- Cannot read the next data row for the dataset 'DataSet1'.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My actual requirment is to populate the items in the tempary table&amp;nbsp; and use the temp table in the subqurey for IN clause.&lt;/P&gt;&lt;P&gt;The Sp is working fine in Toad.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sobha&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Apr 2025 15:21:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Getting-data-using-Procedure-by-using-the-SYS-REFCURSOR/m-p/4656048#M40331</guid>
      <dc:creator>Sobha</dc:creator>
      <dc:date>2025-04-16T15:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: Getting data using Procedure by using the  SYS_REFCURSOR.</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Getting-data-using-Procedure-by-using-the-SYS-REFCURSOR/m-p/4658893#M40348</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="933477" data-lia-user-login="Sobha" class="lia-mention lia-mention-user"&gt;Sobha&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;H3 class="" data-start="253" data-end="311"&gt;First, here’s &lt;STRONG data-start="274" data-end="294"&gt;what’s happening&lt;/STRONG&gt; with your setup:&lt;/H3&gt;
&lt;UL data-start="313" data-end="922"&gt;
&lt;LI class="" data-start="313" data-end="440"&gt;
&lt;P class="" data-start="315" data-end="440"&gt;In your stored procedure &lt;CODE data-start="340" data-end="351"&gt;DORIS.XYZ&lt;/CODE&gt;, you are inserting into &lt;CODE data-start="376" data-end="394"&gt;Sub_ids_list_xyz&lt;/CODE&gt;, which is a &lt;STRONG data-start="407" data-end="439"&gt;global temporary table (GTT)&lt;/STRONG&gt;.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI class="" data-start="441" data-end="510"&gt;
&lt;P class="" data-start="443" data-end="510"&gt;You then open a SYS_REFCURSOR selecting from the GTT and return it.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI class="" data-start="511" data-end="635"&gt;
&lt;P class="" data-start="513" data-end="635"&gt;&lt;span class="lia-unicode-emoji" title=":white_heavy_check_mark:"&gt;✅&lt;/span&gt; In Toad or SQL Developer, this works perfectly because they maintain the &lt;STRONG data-start="588" data-end="604"&gt;same session&lt;/STRONG&gt; for the insert and the select.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI class="" data-start="636" data-end="922"&gt;
&lt;P class="" data-start="638" data-end="738"&gt;&lt;span class="lia-unicode-emoji" title=":cross_mark:"&gt;❌&lt;/span&gt; But when calling it from &lt;STRONG data-start="665" data-end="675"&gt;Fabric&lt;/STRONG&gt;, &lt;STRONG data-start="677" data-end="685"&gt;SSRS&lt;/STRONG&gt;, &lt;STRONG data-start="687" data-end="699"&gt;Power BI&lt;/STRONG&gt;, or even some external Oracle clients:&lt;/P&gt;
&lt;UL data-start="741" data-end="922"&gt;
&lt;LI class="" data-start="741" data-end="766"&gt;
&lt;P class="" data-start="743" data-end="766"&gt;The &lt;STRONG data-start="747" data-end="757"&gt;Insert&lt;/STRONG&gt; happens.&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="" data-start="771" data-end="922"&gt;But when trying to &lt;STRONG data-start="790" data-end="816"&gt;Open Cursor and select&lt;/STRONG&gt;, the temporary table &lt;STRONG data-start="838" data-end="870"&gt;no longer exists or is empty&lt;/STRONG&gt; because &lt;STRONG data-start="879" data-end="902"&gt;a different session&lt;/STRONG&gt; is used internally.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P class="" data-start="924" data-end="941"&gt;Thus ➔ the error:&lt;/P&gt;
&lt;BLOCKQUOTE data-start="943" data-end="981"&gt;
&lt;P class="" data-start="945" data-end="981"&gt;&lt;CODE data-start="945" data-end="981"&gt;ORA-08103: object no longer exists&lt;/CODE&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P class="" data-start="983" data-end="1102"&gt;appears.&lt;BR data-start="991" data-end="994" /&gt;(Not because the table "physically" vanished — but because the session's private copy of the table is gone.)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;H3 class="" data-start="1552" data-end="1653"&gt;&lt;STRONG data-start="1560" data-end="1653"&gt;Avoid GTT completely inside the procedure. Use PL/SQL collections (like TABLE OF RECORDS)&lt;/STRONG&gt;&lt;/H3&gt;
&lt;P class="" data-start="1654" data-end="1770"&gt;Instead of inserting into a temp table, populate a PL/SQL collection (in memory) and open cursor directly from that.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;H3 class="" data-start="1827" data-end="1895"&gt;&lt;STRONG data-start="1835" data-end="1895"&gt;Create a pipelined table function instead of a procedure&lt;/STRONG&gt;&lt;/H3&gt;
&lt;P class="" data-start="1896" data-end="2016"&gt;Use a Pipelined Function (&lt;CODE data-start="1922" data-end="1933"&gt;PIPELINED&lt;/CODE&gt;) instead of a procedure ➔ that outputs rows directly without needing a temp table.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;H3 class="" data-start="2084" data-end="2163"&gt;&lt;STRONG data-start="2092" data-end="2163"&gt;Use Global Temp Table but wrap everything inside a single procedure&lt;/STRONG&gt;&lt;/H3&gt;
&lt;P class="" data-start="2164" data-end="2322"&gt;Instead of using a cursor output, &lt;STRONG data-start="2198" data-end="2268"&gt;do the entire select and return result set inside a single session&lt;/STRONG&gt;.&lt;BR data-start="2269" data-end="2272" /&gt;Meaning — &lt;STRONG data-start="2282" data-end="2321"&gt;avoid exposing REFCURSOR externally&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P class="" data-start="2324" data-end="2424"&gt;If your tool expects a simple query instead of SYS_REFCURSOR, it stays within one session and works.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;H3 class="" data-start="2431" data-end="2507"&gt;&lt;STRONG data-start="2439" data-end="2507"&gt;Force session consistency using WITH HOLD cursors (if supported)&lt;/STRONG&gt;&lt;/H3&gt;
&lt;P class="" data-start="2508" data-end="2675"&gt;Some clients support &lt;STRONG data-start="2529" data-end="2550"&gt;WITH HOLD cursors&lt;/STRONG&gt; to keep cursors open across transactions.&lt;BR data-start="2592" data-end="2595" /&gt;But &lt;STRONG data-start="2599" data-end="2674"&gt;Oracle itself doesn't natively support "WITH HOLD" like PostgreSQL does&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P class="" data-start="2677" data-end="2731"&gt;So this usually is &lt;STRONG data-start="2696" data-end="2703"&gt;NOT&lt;/STRONG&gt; a clean solution in Oracle.&lt;BR /&gt;&lt;BR /&gt;You could &lt;STRONG data-start="2939" data-end="2996"&gt;directly open cursor selecting from a CTE or subquery&lt;/STRONG&gt;, like:&lt;BR /&gt;&lt;BR /&gt;OPEN c_direct_reports FOR&lt;BR /&gt;SELECT '10002521' AS sub_id&lt;BR /&gt;FROM dual;&lt;BR /&gt;&lt;BR /&gt;example:&lt;BR /&gt;CREATE OR REPLACE PROCEDURE DORIS.XYZ(&lt;BR /&gt;prBeginDate IN Varchar2 := '2024',&lt;BR /&gt;pGroupID IN Varchar2:= NULL ,&lt;BR /&gt;c_direct_reports OUT SYS_REFCURSOR)&lt;BR /&gt;AS&lt;BR /&gt;BEGIN&lt;BR /&gt;-- Instead of using temp table:&lt;BR /&gt;OPEN c_direct_reports FOR&lt;BR /&gt;SELECT '10002521' AS Sub_ID&lt;BR /&gt;FROM dual;&lt;BR /&gt;END;&lt;BR /&gt;/&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;FONT color="#800000"&gt;Did I answer your question? Mark my post as a solution! Appreciate your Kudos !!&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P class="" data-start="2677" data-end="2731"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Apr 2025 13:50:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Getting-data-using-Procedure-by-using-the-SYS-REFCURSOR/m-p/4658893#M40348</guid>
      <dc:creator>johnbasha33</dc:creator>
      <dc:date>2025-04-18T13:50:53Z</dc:date>
    </item>
    <item>
      <title>Re: Getting data using Procedure by using the  SYS_REFCURSOR.</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Getting-data-using-Procedure-by-using-the-SYS-REFCURSOR/m-p/4664220#M40402</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="933477" data-lia-user-login="Sobha" class="lia-mention lia-mention-user"&gt;Sobha&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Thanks for reaching out to the Microsoft fabric community forum.&lt;/P&gt;
&lt;P&gt;As&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="585150" data-lia-user-login="johnbasha33" class="lia-mention lia-mention-user"&gt;johnbasha33&lt;/a&gt;&amp;nbsp;already responded to your query, please go through his response and check if it solves your issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would also take a moment to thank &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="585150" data-lia-user-login="johnbasha33" class="lia-mention lia-mention-user"&gt;johnbasha33&lt;/a&gt;, for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I misunderstand your needs or you still have problems on it, please feel free to let us know.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Hammad.&lt;BR /&gt;Community Support Team&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps then please mark it as a solution, so that other members find it more quickly.&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Apr 2025 04:32:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Getting-data-using-Procedure-by-using-the-SYS-REFCURSOR/m-p/4664220#M40402</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-04-23T04:32:40Z</dc:date>
    </item>
    <item>
      <title>Re: Getting data using Procedure by using the  SYS_REFCURSOR.</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Getting-data-using-Procedure-by-using-the-SYS-REFCURSOR/m-p/4672199#M40470</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="933477" data-lia-user-login="Sobha" class="lia-mention lia-mention-user"&gt;Sobha&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;As we haven’t heard back from you, so just following up to our previous message. I'd like to confirm if you've successfully resolved this issue or if you need further help.&lt;/P&gt;
&lt;P&gt;If yes, you are welcome to share your workaround and mark it as a solution so that other users can benefit as well. If you find a reply particularly helpful to you, you can also mark it as a solution.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;If you still have any questions or need more support, please feel free to let us know. We are more than happy to continue to help you.&lt;BR /&gt;Thank you for your patience and look forward to hearing from you.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Apr 2025 06:06:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Getting-data-using-Procedure-by-using-the-SYS-REFCURSOR/m-p/4672199#M40470</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-04-29T06:06:56Z</dc:date>
    </item>
    <item>
      <title>Re: Getting data using Procedure by using the  SYS_REFCURSOR.</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Getting-data-using-Procedure-by-using-the-SYS-REFCURSOR/m-p/4677415#M40521</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But Idea of collections works.&lt;/P&gt;&lt;P&gt;My Issue is not really solved.I have some difficulty in populating the collection variable&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 May 2025 10:58:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Getting-data-using-Procedure-by-using-the-SYS-REFCURSOR/m-p/4677415#M40521</guid>
      <dc:creator>Sobha</dc:creator>
      <dc:date>2025-05-02T10:58:34Z</dc:date>
    </item>
    <item>
      <title>Re: Getting data using Procedure by using the  SYS_REFCURSOR.</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Getting-data-using-Procedure-by-using-the-SYS-REFCURSOR/m-p/4678653#M40529</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="933477" data-lia-user-login="Sobha" class="lia-mention lia-mention-user"&gt;Sobha&lt;/a&gt;,&lt;BR /&gt;Can you please confirm if its the original question you are struck with or where you able to move forward with the response provided by&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="585150" data-lia-user-login="johnbasha33" class="lia-mention lia-mention-user"&gt;johnbasha33&lt;/a&gt;. Also if you were able to move forward then what is the exact issue you are facing right now.&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Hammad.&lt;/P&gt;</description>
      <pubDate>Sun, 04 May 2025 05:23:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Getting-data-using-Procedure-by-using-the-SYS-REFCURSOR/m-p/4678653#M40529</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-05-04T05:23:54Z</dc:date>
    </item>
    <item>
      <title>Re: Getting data using Procedure by using the  SYS_REFCURSOR.</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Getting-data-using-Procedure-by-using-the-SYS-REFCURSOR/m-p/4681665#M40575</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;The Idea of Collection Works and I am able to populate the collection in the Stored procedure.&lt;/P&gt;&lt;P&gt;Now i want to call the procedure from from Power BI paginated report as dataset&lt;/P&gt;&lt;P&gt;&amp;nbsp;like below&lt;/P&gt;&lt;P&gt;DECLARE&lt;BR /&gt;sub_ids SYS_REFCURSOR;&lt;BR /&gt;xyz varchar2(100);&lt;/P&gt;&lt;P&gt;BEGIN&lt;BR /&gt;DORIS.XYZ_collections_select_test(&lt;BR /&gt;'2024',&lt;BR /&gt;NULL ,&lt;BR /&gt;:prSubscriber,&lt;BR /&gt;sub_ids );&lt;BR /&gt;&lt;BR /&gt;DBMS_SQL.RETURN_RESULT(sub_ids);&lt;BR /&gt;END;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;:prSubscriber is the parameter which accepts Multiple values of type text,&lt;/P&gt;&lt;P&gt;for example&amp;nbsp;prSubscriber&amp;nbsp; = 1234, 678,15674&lt;/P&gt;&lt;P&gt;if i pass only one value(prSubscriber&amp;nbsp; = 1234) , i get the value back. if i pass more than one value(&amp;nbsp;prSubscriber&amp;nbsp; = 1234, 678,15674), there is an error.&amp;nbsp;ORA-01008: not all variables bound or&amp;nbsp;&lt;/P&gt;&lt;P&gt;ORA-06550: line 5, column 6:&lt;BR /&gt;PLS-00306: wrong number or types of arguments in call to 'XYZ_COLLECTIONS_SELECT_TEST'&lt;BR /&gt;ORA-06550: line 5, column 6:&lt;BR /&gt;PL/SQL: Statement ignored&lt;/P&gt;&lt;P&gt;I think, the "," in&amp;nbsp;prSubscriber&amp;nbsp; &amp;nbsp;is interpreted as set of parameters to the Procedure.&lt;/P&gt;&lt;P&gt;Any idea what is the workaround?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TIA&lt;/P&gt;&lt;P&gt;Sobha&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 May 2025 09:45:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Getting-data-using-Procedure-by-using-the-SYS-REFCURSOR/m-p/4681665#M40575</guid>
      <dc:creator>Sobha</dc:creator>
      <dc:date>2025-05-06T09:45:44Z</dc:date>
    </item>
    <item>
      <title>Re: Getting data using Procedure by using the  SYS_REFCURSOR.</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Getting-data-using-Procedure-by-using-the-SYS-REFCURSOR/m-p/4686128#M40624</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="933477" data-lia-user-login="Sobha" class="lia-mention lia-mention-user"&gt;Sobha&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;To handle multiple values passed as a comma-separated string, you can modify your stored procedure to parse this string into individual elements and process them accordingly.&lt;/P&gt;
&lt;P&gt;Create a Function to Split the Comma-Separated String:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;CREATE OR REPLACE FUNCTION split_string(p_list IN VARCHAR2)
  RETURN SYS.ODCIVARCHAR2LIST
AS
  l_list SYS.ODCIVARCHAR2LIST := SYS.ODCIVARCHAR2LIST();
  l_index PLS_INTEGER := 1;
  l_pos PLS_INTEGER := 0;
  l_str VARCHAR2(4000) := p_list;
  l_item VARCHAR2(4000);
BEGIN
  LOOP
    l_pos := INSTR(l_str, ',', l_index);
    EXIT WHEN l_pos = 0;
    l_item := TRIM(SUBSTR(l_str, l_index, l_pos - l_index));
    l_list.EXTEND;
    l_list(l_list.COUNT) := l_item;
    l_index := l_pos + 1;
  END LOOP;
  l_item := TRIM(SUBSTR(l_str, l_index));
  IF l_item IS NOT NULL THEN
    l_list.EXTEND;
    l_list(l_list.COUNT) := l_item;
  END IF;
  RETURN l_list;
END;
/
&lt;/LI-CODE&gt;
&lt;P&gt;This function takes a comma-separated string and returns a collection (SYS.ODCIVARCHAR2LIST) of individual values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Modify Your Stored Procedure to Use the Split Function:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;CREATE OR REPLACE PROCEDURE DORIS.XYZ_collections_select_test(
  prBeginDate IN VARCHAR2 := '2024',
  pGroupID IN VARCHAR2 := NULL,
  prSubscriber IN VARCHAR2,
  c_direct_reports OUT SYS_REFCURSOR
)
AS
  l_subscribers SYS.ODCIVARCHAR2LIST;
BEGIN
  l_subscribers := split_string(prSubscriber);

  OPEN c_direct_reports FOR
    SELECT *
    FROM your_table
    WHERE subscriber_id IN (SELECT COLUMN_VALUE FROM TABLE(l_subscribers));
END;
/
&lt;/LI-CODE&gt;
&lt;P data-start="2452" data-end="2470"&gt;In this procedure prSubscriber is the comma-separated string of subscriber IDs. "split_string" function is used to convert this string into a collection and the SELECT statement uses this collection to filter records where subscriber_id matches any of the provided IDs.&lt;/P&gt;
&lt;P data-start="2452" data-end="2470"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-start="2733" data-end="2793"&gt;Calling the Procedure from Power BI Paginated Report:&lt;/P&gt;
&lt;P data-start="2795" data-end="2866"&gt;When setting up your dataset in Power BI Paginated Report, ensure that the parameter :prSubscriber is defined as a multi-value parameter and the values selected are concatenated into a comma-separated string before being passed to the stored procedure.&lt;/P&gt;
&lt;P data-start="3053" data-end="3093"&gt;For example, your query might look like:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;DECLARE
  sub_ids SYS_REFCURSOR;
BEGIN
  DORIS.XYZ_collections_select_test(
    '2024',
    NULL,
    :prSubscriber,
    sub_ids
  );
  DBMS_SQL.RETURN_RESULT(sub_ids);
END;
&lt;/LI-CODE&gt;
&lt;P&gt;Ensure that :prSubscriber is passed as a single string like '1234,678,15674'.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I misunderstand your needs or you still have problems on it, please feel free to let us know.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Hammad.&lt;BR /&gt;Community Support Team&lt;/P&gt;</description>
      <pubDate>Fri, 09 May 2025 07:25:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Getting-data-using-Procedure-by-using-the-SYS-REFCURSOR/m-p/4686128#M40624</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-05-09T07:25:38Z</dc:date>
    </item>
    <item>
      <title>Re: Getting data using Procedure by using the  SYS_REFCURSOR.</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Getting-data-using-Procedure-by-using-the-SYS-REFCURSOR/m-p/4690518#M40676</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="933477" data-lia-user-login="Sobha" class="lia-mention lia-mention-user"&gt;Sobha&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution so that other community members can find it easily.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 13 May 2025 10:03:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Getting-data-using-Procedure-by-using-the-SYS-REFCURSOR/m-p/4690518#M40676</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-05-13T10:03:21Z</dc:date>
    </item>
    <item>
      <title>Re: Getting data using Procedure by using the  SYS_REFCURSOR.</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Getting-data-using-Procedure-by-using-the-SYS-REFCURSOR/m-p/4690793#M40682</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;I am stuck, for passing the value&amp;nbsp;:prSubscriber from Power BI to Oracle procedure.&lt;/P&gt;&lt;P&gt;When i am passing the value to the Procedure it is giving error as&amp;nbsp;&lt;/P&gt;&lt;P&gt;there is an error.&amp;nbsp;ORA-01008: not all variables bound or&amp;nbsp;&lt;/P&gt;&lt;P&gt;ORA-06550: line 5, column 6:&lt;BR /&gt;PLS-00306: wrong number or types of arguments in call to 'XYZ_COLLECTIONS_SELECT_TEST'&lt;BR /&gt;ORA-06550: line 5, column 6:&lt;BR /&gt;PL/SQL: Statement ignored.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;:prSubscriber is a multivalue parameter and is ihave only one value, i get the data back. if more than 1 values are selected, it gives the above error&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Basically,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;:prSubscriber is not going as a single parameter to the Oracle Procedure.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I feel I missign some steps here. Any suggetions&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;TIA&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Sobha&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 May 2025 12:19:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Getting-data-using-Procedure-by-using-the-SYS-REFCURSOR/m-p/4690793#M40682</guid>
      <dc:creator>Sobha</dc:creator>
      <dc:date>2025-05-13T12:19:05Z</dc:date>
    </item>
    <item>
      <title>Re: Getting data using Procedure by using the  SYS_REFCURSOR.</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Getting-data-using-Procedure-by-using-the-SYS-REFCURSOR/m-p/4691808#M40688</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="933477" data-lia-user-login="Sobha" class="lia-mention lia-mention-user"&gt;Sobha&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;You areusing a multi-value parameter ":prSubscriber" in Power BI, which works fine when a single value is selected. However, when multiple values are selected, you're encountering these errors.&lt;/P&gt;
&lt;P&gt;This happens because Power BI passes each selected value as a separate parameter. So, if you select three values, Power BI tries to pass them as three separate parameters, but your stored procedure expects a single parameter. This mismatch leads to the errors you're seeing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To handle multiple values, you can modify your stored procedure to accept a comma-separated string and then parse it into individual values within the procedure. You can do it by :&lt;BR /&gt;* First create a function to split the Comma-Separated string.&lt;/P&gt;
&lt;P&gt;CREATE OR REPLACE FUNCTION split_string(p_list IN VARCHAR2)&lt;BR /&gt;RETURN SYS.ODCIVARCHAR2LIST&lt;BR /&gt;AS&lt;BR /&gt;l_list SYS.ODCIVARCHAR2LIST := SYS.ODCIVARCHAR2LIST();&lt;BR /&gt;l_index PLS_INTEGER := 1;&lt;BR /&gt;l_pos PLS_INTEGER := 0;&lt;BR /&gt;l_str VARCHAR2(4000) := p_list;&lt;BR /&gt;l_item VARCHAR2(4000);&lt;BR /&gt;BEGIN&lt;BR /&gt;LOOP&lt;BR /&gt;l_pos := INSTR(l_str, ',', l_index);&lt;BR /&gt;EXIT WHEN l_pos = 0;&lt;BR /&gt;l_item := TRIM(SUBSTR(l_str, l_index, l_pos - l_index));&lt;BR /&gt;l_list.EXTEND;&lt;BR /&gt;l_list(l_list.COUNT) := l_item;&lt;BR /&gt;l_index := l_pos + 1;&lt;BR /&gt;END LOOP;&lt;BR /&gt;l_item := TRIM(SUBSTR(l_str, l_index));&lt;BR /&gt;IF l_item IS NOT NULL THEN&lt;BR /&gt;l_list.EXTEND;&lt;BR /&gt;l_list(l_list.COUNT) := l_item;&lt;BR /&gt;END IF;&lt;BR /&gt;RETURN l_list;&lt;BR /&gt;END;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;* Now modify your stored procedure to use the split function.&lt;/P&gt;
&lt;P&gt;CREATE OR REPLACE PROCEDURE DORIS.XYZ_collections_select_test(&lt;BR /&gt;prBeginDate IN VARCHAR2 := '2024',&lt;BR /&gt;pGroupID IN VARCHAR2 := NULL,&lt;BR /&gt;prSubscriber IN VARCHAR2,&lt;BR /&gt;c_direct_reports OUT SYS_REFCURSOR&lt;BR /&gt;)&lt;BR /&gt;AS&lt;BR /&gt;l_subscribers SYS.ODCIVARCHAR2LIST;&lt;BR /&gt;BEGIN&lt;BR /&gt;l_subscribers := split_string(prSubscriber);&lt;/P&gt;
&lt;P&gt;OPEN c_direct_reports FOR&lt;BR /&gt;SELECT *&lt;BR /&gt;FROM your_table&lt;BR /&gt;WHERE subscriber_id IN (SELECT COLUMN_VALUE FROM TABLE(l_subscribers));&lt;BR /&gt;END;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;* Now adjust your PowerBi report. You will need to concatenate the selected values into a single comma-separated string before passing them to the stored procedure. You can do it in your Power BI report, by creating a new parameter (e.g., prSubscriberString) that concatenates the selected values "Text.Combine(prSubscriber, ",")".&amp;nbsp;Use this prSubscriberString parameter when calling the stored procedure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By modifying your stored procedure to accept a comma-separated string and adjusting your Power BI report to pass the selected values as such, you should be able to handle multi-value parameters without encountering the binding errors.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I misunderstand your needs or you still have problems on it, please feel free to let us know.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Hammad.&lt;BR /&gt;Community Support Team&lt;/P&gt;</description>
      <pubDate>Wed, 14 May 2025 06:16:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Getting-data-using-Procedure-by-using-the-SYS-REFCURSOR/m-p/4691808#M40688</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-05-14T06:16:40Z</dc:date>
    </item>
    <item>
      <title>Re: Getting data using Procedure by using the  SYS_REFCURSOR.</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Getting-data-using-Procedure-by-using-the-SYS-REFCURSOR/m-p/4699293#M40763</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="933477" data-lia-user-login="Sobha" class="lia-mention lia-mention-user"&gt;Sobha&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 20 May 2025 05:44:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Getting-data-using-Procedure-by-using-the-SYS-REFCURSOR/m-p/4699293#M40763</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2025-05-20T05:44:15Z</dc:date>
    </item>
    <item>
      <title>Re: Getting data using Procedure by using the  SYS_REFCURSOR.</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Getting-data-using-Procedure-by-using-the-SYS-REFCURSOR/m-p/4704491#M40809</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thank you very much. The Logic is working. I am able to send the values to Backend ,insert to collections and use the collections in the Query instead of IN clause&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Fri, 23 May 2025 05:33:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Getting-data-using-Procedure-by-using-the-SYS-REFCURSOR/m-p/4704491#M40809</guid>
      <dc:creator>Sobha</dc:creator>
      <dc:date>2025-05-23T05:33:19Z</dc:date>
    </item>
  </channel>
</rss>

