Report using PL\SQL
Is one able to use PL\SQL code in a report. I would like to have a procedre which runs off a bind variable if possible?
Thanks
Unfortunately, if you are on 1.5.0 or 1.5.1 this report style won't work (there is a bug that removes all of the ;s from the PL/SQL code). According to Re: Report style plsql-dbms_output - bug this is fixed in 1.5.3, when that is released.
theFurryOne
Similar Messages
-
Report Using PL/SQL Region
Hi,
I have bit experiment create custom reports using PL/SQL region
http://dbswh.webhop.net/apex/f?p=BLOG:READ:0::::ARTICLE:97800346956448
I would like have from you tips and ideas how enhance this.
Because I'm not so good with SQL,
I really appreciate if you have tips enhance performance for query used for cursor.
/* Report query */
l_sql := '
SELECT * FROM(
SELECT a.*, row_number() OVER (ORDER BY '
|| l_sort_col
|| ' '
|| l_sort_ord
|| ') rn, COUNT(1) over() mrn
FROM(' || l_sql || ') a
) WHERE rn BETWEEN ' || l_start_row || ' AND ' || l_last_row
; Regards,
JariHi Jari
I'm guessing you're trying to do paginated grid data or somewthing similar? You could try something like this...
l_sql := 'SELECT * '||
'FROM ('||
'SELECT /*+ FIRST_ROWS(n) */ '||
'a.*, ROWNUM rnum '||
'FROM ('||l_sql||' '||
'ORDER BY '||l_sort||' '||l_dir||') a '||
'WHERE ROWNUM <= '||l_max_row||') '||
'WHERE rnum >= '||l_start;The variables would be initialized in the procedure as follows...
l_max_row := p_start + p_limit;
l_start := p_start + 1;
l_sort := NVL(p_sort,'1');
l_dir := NVL(p_dir, 'ASC');My application process would be called something like follows, to spit out a JSON object...
BEGIN
htp.p(wwv_flow.g_widget_num_return||'(');
munky_extjs.grid_json(p_app_id => wwv_flow.g_x01,
p_app_page_id => wwv_flow.g_x02,
p_region_id => TO_NUMBER(wwv_flow.g_x03),
p_start => NVL(wwv_flow.g_x04,0),
p_limit => NVL(wwv_flow.g_x05,10),
p_sort => wwv_flow.g_x06,
p_dir => wwv_flow.g_x07);
htp.p(')');
END;I think your use of analytics in the inner query may be slowing you down if you have a lot of data?
Cheers
Ben -
DBI Reports Using PL/SQL Procedure
Hi all,
Is there anyone who worked on Creating a DBI report using a PL/SQL Procedure.
I want to customize a Report that is using Data Source as of type PL/SQL Procedure.
Please Reply to me If anyone has any Idea on this..
Thanks in Advance..Hi Blushadow
Now if i want to update say only 10 records at a time what should i put into my Proc?
Please go thru my Proc below..
CREATE OR REPLACE PROCEDURE PRTS.UPDT_ISSUE_USR_ROLE
As
Cursor cur_user_role Is
Select a.org_id,a.user_id
from prts_user a,issue_user_role b
where a.user_id=b.user_id;
upd_rec cur_user_role%rowtype;
v_rows_processed Number:=0;
Begin
Open cur_user_role;
Loop
Fetch cur_user_role into upd_rec;
If cur_user_role%NOTFOUND
Then
Exit;
Else
update Issue_user_role
set User_org_nm=(Select full_org_nm from VW_Org where org_id=upd_rec.org_id)
Where Issue_User_Role.rowid in
(select issue_user_role.rowid
FROM issue_user_role,issue,issue_workflow,Issue_step_dtl_wrkflw
Where Issue_User_Role.Issue_Id=Issue.Issue_id
And Issue_User_Role.Issue_id=issue_workflow.issue_id
And Issue_User_Role.Workflow_compnt_id=Issue_Workflow.CURR_STEP_WORKFLOW_COMPNT_ID
And Issue_User_Role.Workflow_compnt_id=Issue_Step_Dtl_wrkflw.Workflow_compnt_id
And Issue_User_Role.Issue_id=Issue_Step_Dtl_wrkflw.Issue_Id
And Issue.Issue_id=Issue_workflow.Issue_Id
And Issue.Issue_id=Issue_Step_Dtl_Wrkflw.Issue_id
And Issue_workflow.Issue_id=Issue_Step_Dtl_Wrkflw.Issue_id
And Issue_Workflow.CURR_STEP_WORKFLOW_COMPNT_ID=Issue_Step_Dtl_wrkflw.Workflow_compnt_id
And issue_workflow.primry_workflow_flag='Y'
And issue_user_role.user_id = upd_rec.user_id
And issue.issue_status_id in (1636,50738,275,50737,2090)
And issue_step_dtl_wrkflw.Issue_step_status_id in (61248,61249,61250));
v_rows_processed :=v_rows_processed + SQL%ROWCOUNT;
If Mod (v_rows_processed,v_rows_processed)=10
then
COMMIT;
End if;END IF;
End Loop;
Commit;
dbms_output.enable(1000000);
dbms_output.put_line('There were '||v_rows_processed||' rows updated');
Close cur_user_role;
End;
I would appreciate if you can let me know any other alternative way to meet this requirment.
Cheers
Vineet -
Creating XML report using PL/SQL Stored Procedure
Hi Friends,
I am working on an xml report with the xml source as PL/SQL Stored Procedure.
I am referring the exercise shown in the following link to understand the process:
http://orclapp.blogspot.com/2012/02/developing-xml-publisher-report-using.html
In the example shown in the above link I could not understand the following:
1) In the following procedure, the out parameter 'retcode' is not used at all.
What is the importance of this parameter.
PROCEDURE REPORT (errbuf OUT VARCHAR2, retcode OUT VARCHAR2, p_product_id IN NUMBER)
2) After the xml data is prepared and put to 'l_result' Clob variable, the following
Loop is executed. I am not able to appreciate why the following loop is required.
LOOP
EXIT WHEN l_length = l_retrieved;
IF (l_length - l_retrieved) < 32000
THEN
SELECT SUBSTR (l_result, l_retrieved + 1) INTO l_xmlstr FROM DUAL;
l_retrieved := l_length;
fnd_file.put_line (fnd_file.output, l_xmlstr);
ELSE
SELECT SUBSTR (l_result, l_retrieved + 1, l_offset)
INTO l_xmlstr
FROM DUAL;
l_retrieved := l_retrieved + l_offset;
fnd_file.put_line (fnd_file.output, l_xmlstr);
END IF;
END LOOP;
3) In the example it is not explained how the concurrent program gets the xml data?
I assume it is written to a file using the following line of code:
fnd_file.put_line (fnd_file.output, l_xmlstr);
I would appreciate if anyone can throw some light into my above queries so that I can understand the process clearly.
Thanks & Regards
HawkerHi 32000 in the code is a 'safe' size smaller than the max available 32767, the loops purpose is to move through the entire thing in chunks that will be manageable in the limits of the data type.
Btw; if you are in Oracle e-business suite then you can also use Oracle reports very simply to create XML output.
If you have reports developer all you need to do is put raw sql (without any 'artifice' to create XML) in the report SQL and then set the reports output to XML in the program definition in Oracle e-business.
best regards,
Robert. -
Building a report using "PL/SQL Dynamic Content" can I have it output PDF?
Hi,
I build several reports using the "PL/SQL Dynamic Content" region and htp.p().
The output is exactly what the customer wants but they would now like to have it go into PDF document.
Is there a way to do it?
BillBill,
You can integrate APEX with Oracle BI Publisher and have your report generated to PDF.
If you're just interested in saving what is on a web page in PDF, have a look at CuteFTP (Windows), which is a free print driver that allows you to "print" to a PDF file as if it were a printer. On the Mac, you can save to PDF and do not need any additional software.
Thanks,
– Scott –
http://spendolini.blogspot.com/
http://sumnertech.com/ -
4.1EA2 User-Defined-Report strips CRLF when using PL/SQL DBMS Output
Hi,
I have a report with a child report.
That child report uses pl/sql to print to the screen. (dbms output)
When i use the procedure manually it prints fine.
When i copy this output to a text editor i can see the CRLF in there.
If i call the same procedure tru the reports section of SQLDeveloper the output is stripped of any CRLF characters.
This is causing it to be useless for me: i am using it to generate code and it all appears as one big line on the screen.
Copying this to a text editor indeed shows all CRLFs gone.
Is this intentional or a bug ?Jeff,
Thnx for the answer.
I don't have a problem writing html in my code being a former webdeveloper with experience in apex as well.
The problem is that the option presents itself as a standard plsql dbmsoutput, which suggests identical output as a dbmsoutput pane in sqldeveloper.
From your answer i gather it really is supposed to do html formatting.
Your "solution" of inserting br tags would be fine if it weren't for the fact that when i do a copy of the output in this report pane sqldeveloper strips away the br tags but doesn't replace them with crlf's.
And since the crlfs that were in the output are also stripped in this result pane i get a single line of text when i copy over a page of text from the result pane into a normal texteditor.
As such it behaves differently then say a browser when i copy a page of text from the browser and paste it in a text editor. There i see the crlfs that were present in the original source.
Is there a listing somewhere that explains what tags are supported?
Or CSS ?
Does it support stuff like white-space: pre ?
I understand the usefullness of a html-aware plsql dbmsoutput output option in the reports list of a user-defined report.
However i would like to use this opportunity to advocate to include , as an extra option or tick box etc., an option to just display the output as the normal dbmsoutput pane displays it.
That is without extra formatting.
I like the idea of being able to click in the table section above and to have bottom pane generate the appropriate code as output.
That use-case can not happen right now since it formats as html (and not even the correct way) or, when going along with this route, strips everything to a single line of text when copying the data from the result pane.
rgrds mike -
Integrating BiP scheduler using PL/SQL
Excuse me, I am relatively new to this, but I have a requirement to integrate BiP scheduler with a batch job scheduler running on Windows that uses the corporate calendar. The batch job scheduler can call pl/sql , Java, JS , VB.. code , but I am more interested in the pl/sql option.
Could you please confirm that it is possible to call the BiP scheduler Webservices using pl/sql code ? are there any issues or porblems doing that ? I am familiar with PL/SQL web services but not sure about the BiP interface and how easy it is to integrate to it using web services.
Thanks.Yes, I did that kind of integration but not with BIP, so I got the background to call web services from PL/SQL but not sure about the BIP API and parameters, this is why I asked if somebody already did something close to this it will help to understand the BIP webservices API . I would really appreciate if you can show some sample code, does not need to be complete.
And Vetsrini , did you have the same requirement? ( to run or schedule BIP reports using pl/sql code ) -
Can we use Dynamic SQL in Oracle Reports ?
Hi ,
Can we use Dynamic SQL in Oracle Reports ?
If yes please give some examples .
Thanx
sriniI believe the built-in package SRW.Do_Sql is what you are looking for
Example from the document:
/* Suppose you want to create a "table of contents" by getting the
** first character of a columns value, and page number on which its
** field fires to print. Assume that you want to put the "table of
contents"
** into a table named SHIP. You could write the following construct:
DECLARE
PAGE_NO NUMBER;
PAGE_FOR INDEX NUMBER;
SORT_CHAR CHAR(1);
CMD_LINE CHAR(200);
BEGIN
SORT_CHAR := :SORT_NAME ;
IF :CALLED = Y THEN
SRW.GET_PAGE_NUM(PAGE_FOR_INDEX);
SRW.USER_EXIT(RWECOP PAGE_FOR_INDEX
P_START_PAGENO);
SRW.MESSAGE(2,TO_CHAR(:P_START_PAGENO));
END IF;
SRW.GET_PAGE_NUM(PAGE_NO);
CMD_LINE := INSERT INTO SHIP VALUES
(||SORT_CHAR||,||TO_CHAR(PAGE_NO)||);
SRW.MESSAGE(2,CMD_LINE);
SRW.DO_SQL(CMD_LINE);
COMMIT;
EXCEPTION
WHEN DUP_VAL_ON_INDEX THEN
NULL;
WHEN SRW.DO_SQL_FAILURE THEN
SRW.MESSAGE(1,FAILED TO INSERT ROW INTO SHIP TABLE);
WHEN OTHERS THEN
COMMIT;
END; -
Report using ref cursor or dynamic Sql
Hi,
I never create a report using a ref cursor or a dynamic sql. Could any one help me to solve the below issue.
I have 2 tables.
1. Student_Record
2. Student_csv_help
Student_Record the main table where the data is stored.
Student_csv_help will contain the all the column names of the Student_record.
CREATE TABLE Student_CSV_HELP
ENTRY_ID NUMBER,
RAW_NAME VARCHAR2(40 BYTE),
DESC_NAME VARCHAR2(1000 BYTE),
IN_OUTPUT_LIST VARCHAR2(1 BYTE)
SET DEFINE OFF;
Insert into TOA_CSV_HELP
(ENTRY_ID, RAW_NAME, DESC_NAME, IN_OUTPUT_LIST)
Values
(1, 'S_ID', 'Student ID', 'Y');
Insert into TOA_CSV_HELP
(ENTRY_ID, RAW_NAME, DESC_NAME, IN_OUTPUT_LIST)
Values
(2, 'S_Name', 'Student Name', 'Y');
Insert into TOA_CSV_HELP
(ENTRY_ID, RAW_NAME, DESC_NAME, IN_OUTPUT_LIST)
Values
(3, 'S_Join_date', 'Joining Date', 'Y');
Insert into TOA_CSV_HELP
(ENTRY_ID, RAW_NAME, DESC_NAME, IN_OUTPUT_LIST)
Values
(4, 'S_Address', 'Address', 'Y');
Insert into TOA_CSV_HELP
(ENTRY_ID, RAW_NAME, DESC_NAME, IN_OUTPUT_LIST)
Values
(5, 'S_Fee', 'Tution Fee', 'N');
commit;
CREATE TABLE Student_record
S_ID NUMBER,
S_Name VARCHAR2(100 BYTE),
S_Join_date date,
S_Address VARCHAR2(360 BYTE),
S_Fee Number
Insert into Student_record
(S_ID, S_Name, S_Join_date, S_Address,S_Fee)
Values
(101, 'john', TO_DATE('12/17/2009 08:00:00', 'MM/DD/YYYY HH24:MI:SS'), 'CA-94777', 2000);
Insert into Student_record
(S_ID, S_Name, S_Join_date, S_Address,S_Fee)
Values
(102, 'arif', TO_DATE('12/18/2009 08:00:00', 'MM/DD/YYYY HH24:MI:SS'), 'CA-94444', 3000);
Insert into Student_record
(S_ID, S_Name, S_Join_date, S_Address,S_Fee)
Values
(103, 'raj', TO_DATE('12/19/2009 08:00:00', 'MM/DD/YYYY HH24:MI:SS'), 'CA-94555', 2500);
Insert into Student_record
(S_ID, S_Name, S_Join_date, S_Address,S_Fee)
Values
(104, 'singh', TO_DATE('12/20/2009 08:00:00', 'MM/DD/YYYY HH24:MI:SS'), 'CA-94666', 2000);
Commit;
Now my requirement is:
I have a form with Student_record data block. When i Click on print Button on this form. It will open another window which has Student_CSV_HELP.DESC_NAME and a check box before this.
The window look like as below:
check_box DESC_NAME+
X S_ID+
-- S_Name+
X S_Join_date+
X S_Address+
-- S_Fee+
X means check box checked.+
-- means check box Unchecked.+
After i selected these check boxes i will send 2 parameters to the report server
1. a string parameter to the report server which has the value 'S_ID,S_Join_date,S_Address' (p_column_name := 'S_ID,S_Join_date,S_Address');
2. the s_id value from the student_record block (p_S_id := '101');
Now my requirement is when i click on run. I need a report like as below:
Student ID : 101+
Joining Date : 12/17/2009 08:00:00+
Address : CA-94777+
This is nothing but the ref cursor should run like as below:
Select S_id from student_record block S_id = :p_S_id;
Select S_Join_date from student_record block S_id = :p_S_id;
Select S_Address from student_record block S_id = :p_S_id;
So, according to my understanding i have to select the columns at the run time. I dont have much knowledge in creating reports using ref cursor or dynamic sql.
So please help me to solve this issue.
Thanks in advance.Plain sql should satisfy your need. Try ....
Select S_id, S_Join_date, S_Address
from student_record
where S_id = :p_S_id -
Report To Show SQL Used In A Report
I am creating a set of quality reports using the apex views.
I would like to create a report to check the sql used in classic reports, but can't seem to find the right view to use.
If it was a interactive report I would use the SQL_QUERY column in the APEX_APPLICATION_PAGE_IR view, but this does not seem to exist for classic reports
Help appreciated.
GusGus C wrote:
I am creating a set of quality reports using the apex views.
I would like to create a report to check the sql used in classic reports, but can't seem to find the right view to use.
If it was a interactive report I would use the SQL_QUERY column in the APEX_APPLICATION_PAGE_IR view, but this does not seem to exist for classic reports
You can use the Data dictionary view APEX_APPLICATION_PAGE_REGIONS. There's a field called "REGION_SOURCE" - just filter for the appropriate region type.
Help appreciated.Really? What about Re: Validate Date and Time? If you want to show genuine appreciation for help given, why not award "correct/helpful" points to posts which helped you solve your problem, as per the forum introduction post:
>
* It is considered good etiquette to reward answers with points (as "helpful" - 5 pts - or "correct" - 10pts).
>
Having a brief look through your list of recently answered questions, you don't seem to award helpful points, even when you've explicitly saying (paraphrasing) "Thanks for your help". Maybe it's a tipping thing - perhaps you subscribe to the doctrine of Mr. Pink but, hey if it helps you get your question answered and it literally costs you nothing but a few seconds of effort, why not throw us a bone by awarding a point now and then? -
Simple PL/SQL Report - Using Break on and Compute Sum - Not So Simple
Good morning, All:
I have a simple pl/sql report that is not so simple. Basic on the code below, would like to add a blank line/row after the resulting "sum" row to make it easier to read. Any and all help would be appreciated.
Thank you.
Preston@Large
Code:
=======================
BREAK ON ALM_OG_CAMPAIGN_CODE
COMPUTE SUM OF ALM_OG_AMOUNT ON ALM_OG_CAMPAIGN_CODE
set linesize 1024
set pagesize 60
set newpage 0
set serveroutput on
SPOOL &so_outfile;
ttitle center 'Wayne State University' skip 1 Left 'WSU Online Giving Essentials Report' skip 2
select TO_CHAR(sysdate, 'mm/dd/yyyy hh:mm AM') "Report Date" from dual;
CLEAR COLUMNS
column ALM_OG_ACCI_CODE heading "ACCI|CODE" format a10
column ALM_OG_AMOUNT heading "AMOUNT|DONATED" format $999,999,999.99
column ALM_OG_CAMPAIGN_CODE heading "CAMPAIGN|CODE" format a14
select
ALM_OG_CAMPAIGN_CODE,
ALM_OG_ACCI_CODE,
ALM_OG_AMOUNT
From WSUALUMNI.WSU_ONLINE_GIVING_TABLE
ORDER BY ALM_OG_CAMPAIGN_CODE;
CLEAR COLUMNS
spool off
Output:
WSU Online Giving Essentials Report
Report Date
======================
06/05/2009 10:06 AM
1 row selected.
Wayne State University
WSU Online Giving Essentials Report
CAMPAIGN ACCI AMOUNT
CODE CODE DONATED
====== ======== ==========
sum $560.00
NUR 444814 $10.00
***** =======
sum $10.00
PHS 445216 $10.00
***** =======
sum $10.00
PRES 445211 $450.00
445211 $60.00
445211 $250.00
***** =======
sum $760.00
SBA 444216 $10.00
***** =======
sum $10.00
SSW 444469 $10.00
***** =======
sum $10.00Prestone,
Welcome to the Forum!
I have used skip 2 lines you can use 1
SQL> break on job report skip 2
SQL> compute sum of sal on job report
SQL> select job , sal from emp order by job ;
JOB SAL
ANALYST 3000
3000
sum 6000
CLERK 1300
950
800
1100
sum 4150
MANAGER 2850
2975
2450
sum 8275
PRESIDENT 5000
sum 5000
SALESMAN 1500
1250
1250
1600
sum 5600
14 rows selected.READ
Quick SQL*Plus Guide
http://download.oracle.com/docs/cd/B14117_01/server.101/b12171/toc.htm
SQL*Plus Reference
http://download.oracle.com/docs/cd/B14117_01/server.101/b12170/toc.htm
SS -
Good day,
I searched through the forum and cant find anything.
I have around 300 published reports on SSRS and we are busy migrating to a new system.
They have already setup their tables on the new system and I need to provide them with a list of table names and column names that are being used currently to generate the 300 reports on SSRS.
We use various tables and databases to generate these reports, and will take me forever to go through each query to get this info.
Is it at all possible to write a query in SQL 2008 that will give me all the table names and columns being used?
Your assistance is greatly appreciated.
I thank you.
Andre.There's no straightforward method for that I guess. There are couple of things you can use to get these details
1. query the ReportServer.dbo.Catalog table
for getting details
you may use script below for that
http://gallery.technet.microsoft.com/scriptcenter/42440a6b-c5b1-4acc-9632-d608d1c40a5c
2. Another method is to run the reports and run sql profiler trace on background to retrieve queries used.
But in some of these cases the report might be using a procedure and you will get only procedure. Then its upto you to get the other details from procedure like tables used, columns etc
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
SAP Crystal Report using SQL Server Authentication and Windows Authenticati
I'm a SAP Crystal Report, version for Visual Studio 2010 Beginner
my ingredients are
1.windows 7 ultimate service pack1
2.sql server 2008 standard edition
3.visual studio 2010 pro
4.SAP Crystal Report, version for visual studio.net
I was created a report named customersByCity.rpt using OLE DB (ADO) -> Microsoft OLE DB Provider for SQL Server -> I'm supply Server, User ID, Password and Database. I assume me using SQL Server Authentication for my report
Then, my ASP.NET files as following
//ASP.NET
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="viewCustomersByCity.aspx.cs" Inherits="viewCustomersByCity" %>
<%@ Register Assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"
Namespace="CrystalDecisions.Web" TagPrefix="CR" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div><asp:Label ID="lblMsg" runat="server" BackColor="Yellow" ForeColor="Black"></asp:Label>
<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" AutoDataBind="true"></CR:CrystalReportViewer>
</div>
</form>
</body>
</html>
//code-behind
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
public partial class viewCustomersByCity : System.Web.UI.Page
private const string PARAMETER_FIELD_NAME = "city";
private ReportDocument customersByCityReport;
private void ConfigureCrystalReports()
ConnectionInfo connectionInfo = new ConnectionInfo();
connectionInfo.ServerName = @"WKM1925-PCWKM1925";
connectionInfo.DatabaseName = "Northwind";
connectionInfo.UserID = "sa";
connectionInfo.Password = "sysadmin25";
SetDBLogonForReport(connectionInfo);
private void SetDBLogonForReport(ConnectionInfo connectionInfo)
TableLogOnInfos tableLogOnInfos = CrystalReportViewer1.LogOnInfo;
foreach (TableLogOnInfo tableLogOnInfo in tableLogOnInfos)
tableLogOnInfo.ConnectionInfo = connectionInfo;
private void SetCurrentValuesForParameterField(ReportDocument reportDocument, ArrayList arrayList)
ParameterValues currentParameterValues = new ParameterValues();
foreach (object submittedValue in arrayList)
ParameterDiscreteValue parameterDiscreteValue = new ParameterDiscreteValue();
parameterDiscreteValue.Value = submittedValue.ToString();
currentParameterValues.Add(parameterDiscreteValue);
ParameterFieldDefinitions parameterFieldDefinitions = reportDocument.DataDefinition.ParameterFields;
ParameterFieldDefinition parameterFieldDefinition = parameterFieldDefinitions[PARAMETER_FIELD_NAME];
parameterFieldDefinition.ApplyCurrentValues(currentParameterValues);
protected void Page_Load(object sender, EventArgs e)
customersByCityReport = new ReportDocument();
string reportPath = Server.MapPath("customersByCity.rpt");
customersByCityReport.Load(reportPath);
ConfigureCrystalReports();
ArrayList arrayList = new ArrayList();
arrayList.Add("paris");
arrayList.Add("Madrid");
arrayList.Add("Marseille");
arrayList.Add("Buenos Aires");
arrayList.Add("Sao Paulo");
ParameterFields parameterFields = CrystalReportViewer1.ParameterFieldInfo;
SetCurrentValuesForParameterField(customersByCityReport, arrayList);
CrystalReportViewer1.ReportSource = customersByCityReport;
1st scenario
When in a runtime, it's keep appear a dialog box. This dialog box ask me to suppy Server, User ID, Password and Database. Once all information is supplied, my report display the data as expected
2nd scenario
I change my report using OLE DB (ADO) -> Microsoft OLE DB Provider for SQL Server -> checked on Integrated Security. I just choose Server, and Database. I assume me using Windows Authentication
When in a runtime, there's no dialog box as above. My report display the data as expected. really cool
Look's like, when report using SQL Server Authentication there's some problem. but, when report using Windows Authentication, it's fine.
I'm looking for comment. Please help meHello,
MS SQL Server 2008 requires you to install the MS Client Tools for 2008.
Once install then update all of your reports to use the SQL Native 10 as the OLE DB driver.
The try again, if it still fails search, lots of sample log on code in this forum.
Don -
Create statspack report using sql*developer
Hello,
While connecting with PERFSTAT user I can not create statspack report using SQL*Developer:
@?/rdbms/admin/awrrpt
Error starting at line 1 in command:
@?/rdbms/admin/awrrpt
Error report:
Unable to open file: "?/rdbms/admin/awrrpt.sql"
Actually, my problem or question is that how can PERFSTAT user can generate statspack reports from a Client side. What is the other way a non-dba can see the snapshots histroy and generate report (by using perfstat user ) while joing tables or using views?
Thanks a lot.
Best RegardsHi,
for awr reports @?/rdbms/admin/awrrpt (you need EE+Diagnostic Pack) there is a solution.
Grant execute dbms_workload_repository to <user>;
Grant select_catalog_role to <user>;
get all SNAP_IDs
SELECT TO_CHAR(s.startup_time,'YYYY.MM.DD HH24:MI:SS') INSTART_FMT,
di.instance_name INST_NAME,
di.db_name DB_NAME,
s.snap_id SNAP_ID,
TO_CHAR(s.end_interval_time,'YYYY.MM.DD HH24:MI:SS') SNAPDAT,
s.snap_level LVL
FROM dba_hist_snapshot s,
dba_hist_database_instance di
WHERE di.dbid = s.dbid
AND di.instance_number = s.instance_number
AND Di.Startup_Time = S.Startup_Time
ORDER BY snap_id desc;
Select * From Table(Sys.Dbms_Workload_Repository.Awr_Report_Html(DBID, 1, BEGIN_SNAP_ID, END_SNAP_ID));
For statspack i don't know a solutuion. I think the best idea is, create a job to make the statspack report on the server side and access it via external tables or mail them forward to you.
Best regards
Thomas -
Can one generate a report in Word document using PL/SQL?
We have a weekly status report application created in APEX, is there a way to generate a report in MS Word document (including formatting the doc) using PL/SQL by pulling data from Oracle database? Please shed some lights on this and any info and experience would be greatly appreciated.
We use Oracle11g and apex version 3.1.1.00.09
Thanks!Hi Tony,
you are right, the NEW format isn't necessarily improved, also the user would need at least Office 2007 or higher.
Still it is possible to do that ;-)
And yes, there are other possibilities, but this question is dealing with Word documents (.doc i assume).
Also my Statement "docx = XML" isn't clear enough. Docx is a zipped file which contains a xml file. Details: http://en.wikipedia.org/wiki/Docx
sorry for the confusions,
Peter
Blog: http://www.oracle-and-apex.com
ApexLib: http://apexlib.oracleapex.info
Work: http://www.click-click.at
Maybe you are looking for
-
How can I install CS5 on a new/replacement laptop? I paid full price in 2011 and have the key (and it shows up in my Adobe account under products), but it was a downloaded product and I can't find a download of that version online and my key doesn't
-
Transformations not occuring properly using PIVOT operator in OWB mapping.
Hi , In our project we have a OWB Map UII_D_MAP_SPC_CUST_FAULT_NATTR which is used to populate UII_CUSTOMER_FAULT table in our target side. The source table which populate UII_CUSTOMER_FAULT is SR_S_TABLE_N_ATTRIBUTEVALUE (a materialized view in anot
-
How to change Redo group from archive to noarchive
Hi guys i am having a dummy database it's in noarchive mode. but i have added one more redo group (earlier there were two). now it shows that this group is in archive mode. how to change it.
-
Good receipt - invoice receipt
Hi gurus, Do you know if exist a table that contain the link good receipt document - invoice receipt document? If not, do you know the way to link this documents? Thanks in advance Regards
-
How to set input "Description" to mandatory?
Hi all, How to set input "description", from infrastructure blueprint request form, to mandatory? Thanks in advance.