Question about Cursor in Reports

Hello I new in this forum
I need some help, i've started using Reports and I need to show in a Jsp report the result of a stored Procedure this procedure returns a cursor , so my question is How I can to show this selection (result of the cursor) in the report? ' cause when creating a Report with the wizard or manually the application asks for the selection

inolau :
Thanks for the link, it's was very useful.
Well a have another question I need to display a report but pl/sql sends an error because the sql sentece is dynamic and do not allow to use a record
example
type v_record is record (deptos.no_folio%type,deptos.dependencia%type,empleado.name%type);
type depto_ref is ref cursor return v_record
create or replace function fnc_depto (idempl in varchar2) return depto_ref
is
v_cursor depto_ref;
v_select varchar2(2000);
begin
v_select ='select deptos.no_folio,deptos.dependencia,empleado.name
from deptos join empleado on (deptos.no_folio=empleados.no_folio)
where empleados.idempleado in (' || idempl || ' ) ';
open v_cursor for
v_select;
return v_cursor;
end;
when I create the function it's good but when you execute it returns an error that says
PL/SQL: Statement ignored
PLS-00455: el cursor 'V_CURSORDETALLE' cannot use it in a sentece OPEN of Dynamic SQL
Do you know some solution for it?
thanks for your time
cheers!
best regards

Similar Messages

  • Question about Missing Timecard Report

    Hi,
    I have a question about Missing Timecard Report. As I aware when we run it it will only pull employee who has Timecard required = 'Yes' in the GRE of assignment.
    I just run it and it pull all employee regardless they have Timecard required = 'Yes' set or not.

    Rao , Thanks for your reply.
    After I Changed locale to chinese in Linux, I can not seen chinese in Oracle Enterprise manager. So, I think my lunux box can not support Chinese .
    When I run my report on windows2000 (Chinese version) application server, I can not see chinese character. But after I edit the uifont.ali and copy ARIALUNI.TTF to $reports_path, I can see chinese character.
    Do you get my means?
    Any question, Contact me.
    Thank you very much !

  • Question about witholding tax report S_PL0_09000447

    Hi,
    I have a question about the witholding tax report: S_PL0_09000447
    For some vendors, no deductions are made, but the payments to those vendors should appear on the witholding tax report.
    How is the report being created?
    Kind regards,
    Linda

    Thank you.
    Kind regards,
    Linda

  • Question about sets in report painter.

    Hi, everybody. Please, could someone help me in this matter?.
    I wanna delete a set with the GS04 transaction in Report Painter but I cannot.
    When I put the set's id (XXX) in the set's name and push Delete-Set-F8 button, I get the following error:
    The XXX set cannot be deleted.I consult the error with the help and SAP tells me that  I need to use the set-usage option to view where the set is used in the system.
    I select this set-usage option under the utilities menu and SAP tells me that the set is being used in a report.
    The thing is that the report doesnt exist. I deleted the report before. Why the error is then.
    However, I created, generated and compiled the report again in report painter with other different set so that I confirmed that the report was not using the XXX set  and the error continues with report or without it.
    That I tried to say was that the XXX set is not being used anywhere and the question then is why report painter is telling me that the set is being used in a report. Thing that is not true.
    Thanks and I hope someone can help me out!!

    Hi, everybody. Please, could someone help me in this matter?.
    I wanna delete a set with the GS04 transaction in Report Painter but I cannot.
    When I put the set's id (XXX) in the set's name and push Delete-Set-F8 button, I get the following error:
    The XXX set cannot be deleted.I consult the error with the help and SAP tells me that  I need to use the set-usage option to view where the set is used in the system.
    I select this set-usage option under the utilities menu and SAP tells me that the set is being used in a report.
    The thing is that the report doesnt exist. I deleted the report before. Why the error is then.
    However, I created, generated and compiled the report again in report painter with other different set so that I confirmed that the report was not using the XXX set  and the error continues with report or without it.
    That I tried to say was that the XXX set is not being used anywhere and the question then is why report painter is telling me that the set is being used in a report. Thing that is not true.
    Thanks and I hope someone can help me out!!

  • Question about cursors in a function and how to return the results

    Hi all,
    Some tech info:
    I'm using Oracle 11G database and APEX 4.0.2.00.06
    I use three cursors in a function. My function is called in an APEX standard report, like this by example:
    SELECT fnc_exp(tab.arg1, tab,arg2) FROM table_exp tab;
    My question is: how can I return the values calculated from my function to a standard APEX report? Before, this function was used like this by Oracle Forms to fetch the cursors in the right table columns:
    open c_a;
    fetch c_a into :loc.arg1;
    close c_a;
    open c_b;
    fetch c_b into :loc.arg2, :loc.arg3, :loc.arg4, :loc.arg5;
    close c_b;
    Thanks for your advices!
    Maybe my solution is not right, if you have better ideas, please suggest :)
    PS: If you need more details, please ask which you need.

    Hi,
    I don't think you can do exactly like that in APEX.
    Go for a pipelined function if you want the value be returned from the function.

  • Question about making printible reports by reading data from database

    We have a pressure test system which we want analyze and plot the instant pressure values in a pre-defined time interval. After each test we want the record the test results along with the other information(date, time, operator name, test no, product type, product number, etc.) added by the system operator. The data will be recorded to an access data base. Doing that, we want to make test results archive which we can make search within, to list the past test results, searching by date, seraching by product number, or searching by any other information in the database. Plus, in the future, we want to be able to take reports of these past test results, including the pressure/time graph and other information added by the system operator. Also we want to set the report format.
    My question is, is it possible to do this with LABVIEW 8.2? Do we need any toolkits or add-ons?
    Regards

    Hi, Hasan.
    That would be an excellent use of LabVIEW. At the very least, you'll probably want to get the Database Connectivity Toolkit, and depending on your needs you may also want the Report Generation Toolkit. There are a lot of tools in the LabVIEW Development Environment for generating reports dynamically, but the Report Generation Toolkit includes a lot of advanced functionality not included in regular LabVIEW installations.
    That said, however, I really recommend you speak with one of our sales representatives to make sure you have everything you need. Since I know so little about how you'd be implementing each step of that process, I'm reluctant to guarantee it, and one of our representatives can tell you with much more certainty. You can get in touch with one from ni.com/contact.
    Good luck! Have a nice evening.
    Sarah K.
    Search PME
    National Instruments

  • 2 questions about my Html report

    Dear All,
    I've created this Html reporting VI as a template for future work. As you can probably see on the VI i'm saving at a set time so that i can save the report once a day. I'm doing this by comparing the current time to the time input it works but it creates 2 folders one for the right set time and one for the second later somehow i've tried various solutions but i still cannot manage to obtain only one folder. Could someone help with this please?
    Another issue is when i'm appending front panel images (in sequence 2). Is there a way to insert a space or tab between them because at the moment they are one after the other? I found the tab for reports but it doesnt work for html only for excel by the look of things.
    Thank you in advance,
    Frederic. 
    Attachments:
    html DZ 2010.vi ‏136 KB
    html DZ 8_5.vi ‏175 KB

    For your specific questions:
    The reason you are getting 2 folders is that you are comparing the time to the resolution of seconds. Your save is occurring so fast that when the loop iterates again less than a second has passed, so the comparison you are performing to test whether to generate the report is still true. Instead of doing all those conversions just compare the current time with the set time to save using a simple Greater or Equal? function.
    Normally extra spaces and tabs in HTML are ignored by browsers. If you want to insert a space you have to use a non-breaking space or create a table.
    Other comments:
    Do yourself a favor and get rid of the sequence structure. All those sequence locals just make a mess. Use a state machine or create subVIs that logically break up your report generation.
    The outermost while loop is not necessary. You can place the update of the current time in the small loop.
    Do not hard-code paths in your code as you are doing with the directory where the reports will be saved.
    Is the intention to save the report "on-demand" by allowing the user to change the time when the report will be saved, or where you intending to save this automatically once a day?
    Attachments:
    Example_VI_BD.png ‏10 KB

  • Question about chinese character report

    Hi, I will print some report contain chinese character. My OS is RedHat Linux Advanced server & Application server is oracle 9ias 9.0.2.0.1
    I have already set NLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16GBK" in reports.sh. And have add
    helvetica = "ARIALUNI.TTF"(ARIALUNI.TTF is in my reports_path )
    in uifont.ali file under [ PDF:Subset ] section.
    But I still can not see chinese character in my report(PDF), How to solve it ?
    thanks .

    Rao , Thanks for your reply.
    After I Changed locale to chinese in Linux, I can not seen chinese in Oracle Enterprise manager. So, I think my lunux box can not support Chinese .
    When I run my report on windows2000 (Chinese version) application server, I can not see chinese character. But after I edit the uifont.ali and copy ARIALUNI.TTF to $reports_path, I can see chinese character.
    Do you get my means?
    Any question, Contact me.
    Thank you very much !

  • Question about the role Reporting Developer

    Hi Experts,
    I created a role for reporting developer. With this role a user can create queries without problem. But I faced an error when I tried to attach the map.
    The error messages are:
    "System error when downloading shape files from BDS."
    "Data connection for map "cntry200" could not be established."
    "Query can not be displayed on a map."
    another question is, what does authorization object Broadcast Settings mean? It would be more helpfull with examples.
    Thanks a lot!
    Ziyang

    Hi,
    With your help I've got the authorization object Broadcast Settings. Thank you very much!
    In transaction RRMX l get this message.
    For instance, now I am working as a reporting developer or a reporting user.
    step 1: run RRMX Analyzer
    step 2: open a query
    step 3: now I want to attach a map into the report. Layout -> attach map
    And then I get this message.
    However, it is no problem when I run Layout -> attach chart.
    Thanks

  • Question about OLD Crystal Reports

    Hello all,
    I've inherited a bunch of old crystal reports files.  I'm using Visual Studio 2003 (I know...) for the project.  It can open the .rpt files, but can't make changes.
    I've downloaded Crystal Reports 2008, and it edits them fine but saves in a new format.  They seem to work OK, but the file size is MUCH smaller - one went from 116k to 33k.
    I don't know much about Crystal Reports, trying to get up to speed without breaking any legacy reports.
    Thanks much for any suggestions,
    - Mark

    rikku12345 wrote:
    Does sp 4 runtime include all the previous FixPacks ?
    Yes.
    Does sp 4 runtime include all the previous FixPacks ?
    If you already have the SP2 runtimes installed and you try to install SP 4 runtimes on top of that , it will throw the error you have mentioned in your post.
    Bhushan.

  • Question about creating a report with variable columns

    Post Author: Archmage
    CA Forum: General
    Hi,
    Is there a way to create a  Crystal report based on the following situation?
    Run a stored procedure with two date parameters:
    If you run from 9/1/07 to 9/30/07, then the data result would be as follows: (example only) and the report format would follow
    Cust        Sept 07       
    AB100     2000
    If run from 8/01/07 to 9/30/07
    Cust       Aug 07       Sept 07  
    AB100     1000          2000 
    if run from 7/01/07 to 9/30/07
    Cust       July 07      Aug 07       Sept 07  
    AB100     1000         1000          2000 
    So Basically, based on the parameters chosen, it could be a report with one, two, three, or even 40 columns, each column representing the month.
    Thanks for any ideas

    Post Author: Archmage
    CA Forum: General
    Does this require that the stored procedure has already created the different columns by month first?  Or can the raw data be a three column source
    like
    CUSTNO  DATE     AMT
    AA100      8/1/07    1000
    AA100      9/1/07     2000
    AA100      10/1/07  2500
    And checking the format with multiple columns will create the Crystal report like:
    CustNo     Aug 07        Sept 07        Oct 07
    AA100      1000            2000            2500

  • Question about the interavtive Reports in APEX 3.1

    Hi,
    I have tested the nice interactive reports feature on the evaluation instance of APEX 3.1
    I hope the new APEX 3.1 will be released soon.
    Is the SQL-Query stored in the apex tables, if I save my customized report? For example I have a report and I create a new feature. Then I guess the APEX generates a new SQL feature and when I store the report with the filter, the SQL-Query must be stored, too...
    Will that SQL be stored in the APEX tables, so I can select it over the apex-views?
    That would be very nice. So that the user of an application can create their own reports and download it with scotts example: http://spendolini.blogspot.com/2006/04/custom-export-to-csv.html
    Will that be possible and should I wait for the APEX 3.1 would be released or must I build an own solution?
    Thank you,
    Tim

    Hey Marco,
    I can`t find a view that is named like "APEX_APPLICATION_PAGE_IR%". Is it not available on the evaluation instance.
    I don`t want to use the build-in CSV download, becaus I want to export thousands of data sets. I got this already to work with APEX 3.0 and I get the sql from the application views. The procedure which creates the file runs a few hours and after that it is inserted into a table from which the user can download the file. In the procedure there happens a few other things, which are very import, so I have to create my custom solution.
    And for that I thought it would be very very very cool if I can get the sql behind the interactive report with the filters ant those things.
    Don`t you think that would be possible? I guess the APEX create a SQL although, or am I wrong?
    Thank you,
    Tim

  • Question about customer aging report

    Greetings,
    One of our Business One consultants needs the information from the customer aging report under the financials\accounting\aging section of Business One. I am trying to help him do this but I do not know how to find the query or stored procedure that is executed to produce this report. Does anyone know the answer to this or maybe know how I can find out what query is executed?
    Thanks.

    As you know there is two ways of generating customer recevieable report:
    1. By Journal Entry
    2. By Sales Documents
    I can not find a stored procedure also, but after analyze SBO-application queries it uses this query:
    SBO query to get customer with balance
    SELECT T0.CardCode, T0.CardName, T0.Balance, T0.BalanceFC, T0.BalanceSys, T0.Currency, T0.DunTerm, T1.MonthDays, T1.YearDays, T1.YearlyRate, T1.MaxLevel FROM  [dbo].[OCRD] T0   LEFT OUTER  JOIN [dbo].[ODUT] T1  ON  T1.TermCode = T0.DunTerm   WHERE T0.CardType = N'C'  AND  (((T0.Currency = N'NOK'  OR  T0.Currency = N'##' ) AND  T0.Balance <> 0 ) OR  (T0.Currency <> N'NOK'  AND  T0.Currency <> N'##'  AND  T0.BalanceFC <> 0 ))  ORDER BY T0.CardCode
    Then send CardCode variable to this query that retreives selected customer:
    SELECT T0.BatchNum, T0.TransId, T0.TransType, T0.CreatedBy, T1.RefDate, T1.DueDate, T1.LineMemo, T0.Ref1, T1.Credit, T1.Debit, T1.FCCredit, T1.FCDebit, T1.SYSCred, T1.SYSDeb, T1.SourceLine, T1.Ref1, T1.Account FROM  [dbo].[OJDT] T0  INNER  JOIN [dbo].[JDT1] T1  ON  T1.TransId = T0.TransId   WHERE T1.ShortName = N'10001' AND T1.IntrnMatch = 0   ORDER BY T1.DueDate
    Antoher easy way is ot create a query like this
    (ref.SAP Note 740241 - User Report for days over duedate on AR Invoice):
    SELECT T0.CardCode, T0.CardName, T0.DocDueDate, Convert(numeric, GetDate()) - convert(numeric, T0.DocDueDate ) as 'Days After DueDate', T0.DocTotal, T0.PaidToDate, (T0.DocTotal - T0.PaidToDate) as 'Debt' FROM OINV T0 WHERE T0.DocStatus = 'O' and Convert (char, T0.DocDueDate, 103) <= convert(char, GetDate(),103) FOR BROWSE
    Hope this helps
    Brgs,
    Geir

  • Question about PL/SQL Function in report

    Hi all. I have a (basic) question about using a PL/SQL function in a report. In my report page I have an item (PL/SQL function) that has the following syntax:
    return username from t1
    where username like 'Le%'
    I reference this item in an email process. Ideally this function would return all usernames that begin with 'Le' in the drafted email; however, its not looping so I'm only getting a return on the first name.
    I have a few books on PL/SQL but I'm not exactly sure where to start - I imagine there is a loop process I need to integrate into the function but, like I said, I'm not sure.
    I would have posted this to the PL/SQL forum but also wanted some feedback on whether or not using this method is the best way forward. Essentially I have a table with usernames and just want to send email messages based on some simple logic.
    Thanks!
    Len

    Hi Sergio,
    First, it's an honor to have you reply to my post. Thanks!
    To be more specific,
    T1 is a table containing the results from a user security scan. Username is a column in this table containing user names. What I have done is create a page in HTML DB with the following elements:
    1. An 'Item' containing the PL/SQL function that is hidden. The purpose of this Item is to generate information from T1 that meets the simple logic parameters - in this case, the user names that begin with "Le". I have called this Item P145_TT
    2. A 'Process' containing references to HTMLDB_MAIL. The 'Process' looks similar to this:
    HTMLDB_MAIL.SEND(
    P_TO => '[email protected]',
    P_FROM => 'Anon Email Account',
    P_BODY => 'Note: This message was automatically generated. Do not attempt to reply to this email.
    These are the users that begin with Le: '||:P145_TT||' ',
    P_SUBJ => 'Summary');
    3. A 'Button' to submit the process and (hopefully) send the message containing all users that adhere to the logic in the function.
    4. If I use 'return username from t1...' I will get a username generated, but like I said previously, it only gives me the first and does not loop.

  • Question about reports in sap fs-cd

    Dear all,
    I have got a question about SAP FS-CD (collection and disbursement)
    If I make changes to the master data (FPP2) is there a way to view the changes I have made in a report.
    It is possible to view the changes via tables but I was wondering if there is a standard transcation code in SAP-CD to view the changes
    Thanks

    You can find it in Information system from easy menu
    under this check for masters, you can find a report.
    Rgds
    Murali. N

Maybe you are looking for