On April 27, 2024, our Sign-in and Create Account options will be unavailable from 9am-12pm ET. During this maintenance window, developer account access and free trial registration will be unavailable.
Questions regarding queryText (Stored Procedure)
lpurba
Junior Member
Hi all,I have a question about queryText.Here is the problem that I have.I have <oda-data-set-extensionID="org.eclipse.birt.report.data.oda.jdbc.SPSelectDataSet" name="StudentId" id="11">, and inside this element I have:<property name="queryText">{call tm.display_student()}</property>.In this case, I am accessing the data thru stored procedure, instead of directly using SELECT statement.And in my <method name="beforeOpen"> I have this for my report parameter (StudentId):<![CDATA[StudentId = reportContext.getParameterValue("StudentId");if (StudentId != '' && StudentId ! = null) { queryString = "SELECT student_id, fname, lname FROM students WHERE student_id = '" + StudentId + "'"; this.queryText = queryString;}]]>So, by having this 'beforOpen', this queryText will be executed if there is a value for "StudentId" report parameter.My question is: is it possible to call or to have stored procedure (display_student()) on "beforeOpen" method instead of accessing the data directly by having SELECT statement?Regards-Laurent
Comments
-
Sorry, I am going to re-post the same question, because the beforeOpen method was not able to display:
Hi all,I have a question about queryText.Here is the problem that I have.I have <oda-data-set-extensionID="org.eclipse.birt.report.data.oda.jdbc.SPSelectDataSet" name="StudentId" id="11">, and inside this element I have:<property name="queryText">{call tm.display_student()}</property>.In this case, I am accessing the data thru stored procedure, instead of directly using SELECT statement.And in my <method name="beforeOpen"> I have this for my report parameter (StudentId):StudentId = reportContext.getParameterValue("StudentId");if (StudentId != '' && StudentId ! = null) { queryString = "SELECT student_id, fname, lname FROM students WHERE student_id = '" + StudentId + "'"; this.queryText = queryString;}So, by having this 'beforOpen', this queryText will be executed if there is a value for "StudentId" report parameter.My question is: is it possible to call or to have stored procedure (display_student()) on "beforeOpen" method instead of accessing the data directly by having SELECT statement?Regards-Laurent -
Hi Laurent,Let me know if I an not understanding correctly. You want to pass a parameter into the report in the reportContext, and use that value to pass into your stored procedure to affect the results you get back. Correct?It appears you have successfully done this using a SQL Select statement. I have been successful there as well. I will try this with a Stored Procedure.In the mean time, is there any reason that you cannot pass in the value as a parameter instead of through the reportContext? I have done this with a stored procedure and it works great. Let me know...Rob
Categories
- All Categories
- Cloud Editions
- 1 Thrust Services
- cat as link
- 1 Core SaaS Application development
- 10 Developer Announcements
- 15 General Questions
- 33.4K TeamSite
- 141 Application Governance & Archiving
- 15.2K Designing Analytics Reports
- 1K DevShare Downloads
- Core SaaS Applications
- nested parent
- 4.3K Developing Analytics Applications
- 8.8K Documentum Developer Forum
- Media Management developer
- 159 Transactional Content Processing (TCP)
- 1.7K Web Experience Management
- 55 Tempo Social
- 1 XM Fax