using result from a stored procedure with parameters as value for gauge chart - crystal reports in asp.net application

无人久伴 提交于 2019-12-19 09:03:43

问题


I have a stored procedure that takes in 2 parameters and returns an integer value. I would like this value to be the value for a gauge chart on the page. The 2 parameters will change depending on the attributes of the selected item. Is there a simple way to pass the one value from the stored procedure to the chart to display? This will be embedded in an asp.net application (vb) - so depending on the previously selected item, the values for the parameters and result will change. thank you for your help.


回答1:


  1. Create the package

    CREATE OR REPLACE PACKAGE REPORTING AS
    
    type query_results is ref cursor;
    
    PROCEDURE barfoo (one IN INTEGER, two IN INTEGER, three IN OUT REPORTING.query_results);
    

    END REPORTING;

  2. Create the stored procedure

    CREATE OR REPLACE PROCEDURE BARFOO ( one IN INTEGER DEFAULT NULL, two IN INTEGER DEFAULT NULL, three IN OUT reporting.query_results ) AS BEGIN

    open three for select one + two total from dual ;

    END BARFOO;

  3. Build the report

3a. Ensure that stored procedures will be visible in the Database 'Expert'

3b. Add the stored procedure to the report

3c. Add Chart

Insert | Chart... | Type tab | Gauge, then Data tab

  1. The result



来源:https://stackoverflow.com/questions/10953789/using-result-from-a-stored-procedure-with-parameters-as-value-for-gauge-chart

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!