Urgent help! trying to create basic report with prompt.
Hi,
I'm trying to create a report which allows a user to select a item_id value (using either a LOV or manually entering a text_id) and then too display output.
for some reason apex does not like the '&' prompt, in the SQL.
Any help or suggestions, would be great? this is quite straightforward so it must be something I'm doing wrong!
sql statement below:
select i.item_id, i.title, d.date_logged, d.details
from tracking_issues i, tracking_details d
where i.item_id=&item_id
and i.item_id=d.item_id
Smiley,
Apex is building a JSP, so instead of you running the page and it poping up a input box that you might be familar with if you run your sql in TOAD or SQL Nav it is waiting on your input(text box/LOV) to populate the item_id field. You need to build your LOV on something like select item_id d, item_id r from items and then once you select that item in the LOV the page will(should - based on how your branch is set up) to the page you are on and your report is displayed.
Also make sure in your branch you are setting the LOV item name to the value you select for it in the branch since the page needs re-submit.
Your select statement for your report should look like:
select item_id, title
from tracking_issues
where item_id=:p1_LOV
--where p1_lov is the name of your LOV
-David
Similar Messages
-
Help creating a report with Financial Reporting Studio.
Hi,
Im new at Financial Reporting Studio so my question might be something very easy, for beginners.
Im trying to create a report with two columns where in each column there is the year dimension. In the first column there is the current POV for year, but in the second column I would like to set the prevoius year of the POV automatically, without using a prompt. Is there any function or way to do it?
Tanks foy yuour help!
EduUse the relative function.
The first column will be set to use the User POV.
For the second column... see the tab named "Functions". Select the function "RelativeMember". For the Member row - select User POV. For the offset enter -1... that will automatically select the prior year. -
Problem when creating a Report with a schduled date
When I tried to create a report with a Schedule (any option except NOW) I get the error of "First Report Occur Date should be after or equal to Current Date" unless I use a date of 2012-10-01 or later in the First report occurs on field. Today's date is 2012-08-23.
Let me know if you can recreate this and if or when there will be a fix.Hi Tim,
I'm glad to see you've been configuring your On100, but sad to see you've hit another snag. We are looking into this issue now. I'll get back to you with an update.
Thanks,
The OnPlus Team -
Problem while creating XDO Report with PL/SQL
hi,
i am trying to create
1.created XDO Report with the help of PL/SQL which takes two parameters and code for writing XML tags to output file
2.created concurrent program that will call the PL/SQL pkg
here i am trying to create the xml out put bu t i am stuck with some errors below is the code
create or replace
PACKAGE AgentTimeReport_XDO_pkg AS
TYPE srdaterange_rec is RECORD (
fromsrdate varchar2(20 byte),
tosrdate varchar2(20 byte)
Type agent_table IS TABLE OF srdaterange_rec INDEX BY BINARY_INTEGER;
procedure GetAgentTimeList(o_errbuf OUT VARCHAR2
,o_retcode OUT VARCHAR2,p_fromsrdate IN varchar2,p_tosrdate IN varchar2);
END AgentTimeReport_XDO_pkg;
create or replace
PACKAGE BODY AGENTTIMEREPORT_XDO_PKG AS
procedure GetAgentTimeList(o_errbuf OUT VARCHAR2
,o_retcode OUT VARCHAR2,p_fromsrdate IN
VARCHAR2,p_tosrdate IN VARCHAR2 )
IS
cursor cs_agenttime(p_fromdate IN VARCHAR2,p_todate IN VARCHAR2)
is
SELECT
incident.Incident_Number as ServiceRequestNumber,
TO_CHAR (incident.incident_date,'DD-MON-YYYY') as ServiceRequestDate,
incident.Summary as Summary,
agenttime.agentname as AgentName,
to_char(agenttime.agentstarttime,'DD-MM-YYYY HH24:MI') as StartTime,
to_char(to_date('00:00:00','HH24:MI:SS') +
(agenttime.endtime-agenttime.agentstarttime), 'HH24:MI') as TimeSpent
FROM cs_incidents_all_b incident,cs_agenttime_agv agenttime
WHERE agenttime.incident_id=incident.incident_id
AND incident.incident_date between to_date(p_fromsrdate,'DD-MON-YYYY')
AND to_date(p_tosrdate,'DD-MON-YYYY');
BEGIN
/*First line of XML data should be ‘<?xml version="1.0" encoding='utf-8'?>’*/
FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<?xml version="1.0" encoding="utf-8"?>');
FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<AGENTTIME>');
FOR cs_agent IN cs_agenttime(p_fromsrdate,p_tosrdate)
LOOP
/*For each record create a group tag <G_AGENT_TIME> at the start*/
FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<G_AGENT_TIME>');
/*Embed data between XML tags for ex:- <EMP_NAME>Abeesh</EMP_NAME>*/
FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<SERVICEREQUEST_NUMBER>' ||
cs_agent.ServiceRequestNumber
|| '</SERVICEREQUEST_NUMBER>');
FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<SERVICEREQUEST_DATE>' ||
cs_agent.ServiceRequestDate ||
'</SERVICEREQUEST_DATE>');
FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<START_TIME>' || cs_agent.StartTime
||'</START_TIME>');
FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<TIME_SPENT>' || cs_agent.TimeSpent
||'</TIME_SPENT>');
FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'</G_AGENT_TIME>');
END LOOP;
/*Finally Close the starting Report tag*/
FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'</AGENTTIME>');
END GetAgentTimeList;
END AGENTTIMEREPORT_XDO_PKG;any one help me
the log file
Service: Version : 12.0.0
Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.
DEMOXDO module: DemoAgentXDO Report
Current system time is 28-JUL-2009 05:16:46
**Starts**28-JUL-2009 05:16:46
ORACLE error 1861 in FDPSTP
Cause: FDPSTP failed due to ORA-01861: literal does not match format string
ORA-06512: at "APPS.AGENTTIMEREPORT_XDO_PKG", line 9
ORA-06512: at "APPS.AGENTTIMEREPORT_XDO_PKG", line 25
ORA-06512: at line 1
The SQL statement b
Start of log messages from FND_FILE
End of log messages from FND_FILE
Executing request completion options...
Finished executing request completion options.
Concurrent request completed
Current system time is 28-JUL-2009 05:16:46
---------------------------------------------------------------------------Hi,
Please see if these documents help.
Note: 367607.1 - FDPSTP Failed Due to ORA-01861: Literal Does Not Match Format String
Note: 370272.1 - not able to run the report set having unsupported date format of fnd-date4
Note: 376034.1 - How to Handle New Date Formats in SQL*Plus and PL/SQL Procedures?
Regards,
Hussein -
How do I create a report with a search button
All,
This may be a dumb question, but I am trying to create a report in Portal 3.0.9 with
a search button. I created the report using the 'create report by query' option and
that was fine. But what I really want to see is the customization page that shows
a field and 'run report' that a user can insert a record he/she is looking for.
For example:
Employee Id: ________
| Search |
Results if user enters a valid number
Employee Id : 1
Employee Name : John Smith
Employee Address: 111 Anywhere St. Anyplace USA
I can alter the customize page to make the search page fit my needs, but how do I create
a portlet out of the customize page and stick on my main page? When I run my report it
calls and returns all employees.
Thanks,
DanHi,
You cannot publish the customization form as a portlet. The only way you can do this is to call the customization form from the dynamic page in the <oracle> tags. You can then publish this dynamic page as a portlet on the page.
Here is an example which calls the customization form of new_rpt2.
<HTML>
<HEAD>
<TITLE>Example</TITLE>
</HEAD>
<BODY>
<H2>Example of A Dynamic Page</H2>
<ORACLE>
begin
<schema_name>.NEW_RPT2.show_parms;
end;
</ORACLE>
</BODY>
</HTML>
Hope this helps.
Thanks,
Sharmila -
How to create a report with survey data
Hi All,
I need to create a report with survey data in below format. Can anyone help me how to display the summary in this format.
SwapnaHi Swapna,
According to your description, you want to create a report with survey data and display the summary.
Reporting Services is used for rendering the report with data retrieved from datasource. In Reporting Services, we can retrieve data from the datasource then design a report, after the report processed, data is fixed on the report. So it’s not supported
to have the end users selection and do summary. For your requirement, it’s can’t be achieved currently.
If you have any question, please feel free to ask.
Best regards,
Qiuyun Yu
Qiuyun Yu
TechNet Community Support -
Error while trying to create new assignment with supervisor through API
Hi Experts,
I'am trying to create new assignment with supervisor for employee, but i'am facing this error:
=============================================================
ORA-20008: Error While Create new assignment..-20001
ORA-20001: The supervisor assignment that you have entered is invalid.
Please check that you have entered the supervisor,
that the supervisor assignment belongs to this supervisor and that the assignment is effective.
ORA-06512: at line 198
=============================================================
This is my script, (Oracle EBS 12.1.1)(DB 11):
DECLARE
v_user_id NUMBER;
v_res_id NUMBER;
v_res_appl_id NUMBER;
v_org_now_no_manager_warning BOOLEAN;
v_spp_delete_warning BOOLEAN;
v_other_manager_warning BOOLEAN;
v_tax_district_changed_warning BOOLEAN;
v_entries_changed_warning VARCHAR(4000);
v_person_id per_all_assignments_f.person_id %TYPE;
v_business_group_id hr_all_organization_units_tl.organization_id %TYPE;
v_people_group_id per_all_assignments_f.people_group_id %TYPE;
v_object_version_number per_all_assignments_f.object_version_number %TYPE;
v_special_ceiling_step_id per_all_assignments_f.special_ceiling_step_id %TYPE;
v_group_name pay_people_groups.group_name %TYPE;
v_ass_effective_start_date per_all_assignments_f.effective_start_date %TYPE;
v_effective_start_date per_all_assignments_f.effective_start_date %TYPE;
v_effective_end_date per_all_assignments_f.effective_end_date %TYPE;
v_assignment_id per_all_assignments_f.assignment_id %TYPE;
v_sup_assignment_id per_all_assignments_f.assignment_id %TYPE;
v_supervisor_assignment_id per_all_assignments_f.assignment_id %TYPE;
v_job_id per_jobs.job_id %TYPE;
v_grade_id per_grades.grade_id %TYPE;
v_location_id hr_locations_all.location_id %TYPE;
v_payroll_id pay_all_payrolls_f.payroll_id %TYPE;
v_pay_basis_id per_pay_bases.pay_basis_id %TYPE;
BEGIN
v_user_id := FND_GLOBAL.user_id ;
v_res_id := FND_GLOBAL.resp_id ;
v_res_appl_id:= FND_GLOBAL.resp_appl_id;
FND_GLOBAL.apps_initialize(v_user_id, v_res_id, v_res_appl_id);
BEGIN
SELECT organization_id
INTO v_business_group_id
FROM hr_all_organization_units_tl
WHERE name = 'Vision University'
AND language = 'US';
EXCEPTION
WHEN OTHERS THEN
RAISE_APPLICATION_ERROR(-20000,'Error While Retrieving (Business Group ID) Info...'||SQLCODE||' '||SQLERRM);
END;
FOR R IN (SELECT * FROM xx_assignment) LOOP
BEGIN
SELECT assignment_id , ass_f.object_version_number
INTO v_assignment_id , v_object_version_number
FROM per_all_assignments_f ass_f, per_all_people_f p_f
WHERE ass_f.person_id = p_f.person_id
AND ass_f.business_group_id = p_f.business_group_id
AND ass_f.business_group_id = v_business_group_id
AND p_f.employee_number = R.employee_number
AND TRUNC(p_f.effective_start_date)= TRUNC(ass_f.effective_start_date)
AND TRUNC(p_f.effective_end_date) = TRUNC(ass_f.effective_end_date);
EXCEPTION
WHEN OTHERS THEN
RAISE_APPLICATION_ERROR(-20001,'Error While Retrieving (Assignmet_ID) for employee..'||SQLCODE||' '||SQLERRM);
END;
BEGIN
SELECT job_id
INTO v_job_id
FROM per_jobs
WHERE trim(lower(name)) = trim(lower(r.employee_job))
AND business_group_id = v_business_group_id;
EXCEPTION
WHEN OTHERS THEN
RAISE_APPLICATION_ERROR(-20002,'Error While Retrieving (Job_ID) Info...'||SQLCODE||' '||SQLERRM);
END;
BEGIN
SELECT grade_id
INTO v_grade_id
FROM per_grades
WHERE trim(lower(name)) = trim(lower(r.employee_grade))
AND business_group_id = v_business_group_id;
EXCEPTION
WHEN OTHERS THEN
RAISE_APPLICATION_ERROR(-20003,'Error While Retrieving (Grade_ID) Info...'||SQLCODE||' '||SQLERRM);
END;
BEGIN
SELECT location_id
INTO v_location_id
FROM hr_locations_all
WHERE trim(lower(description))= trim(lower(r.employee_location))
AND business_group_id = v_business_group_id;
EXCEPTION
WHEN OTHERS THEN
RAISE_APPLICATION_ERROR(-20004,'Error While Retrieving (Location_ID) Info...'||SQLCODE||' '||SQLERRM);
END;
BEGIN
SELECT payroll_id
INTO v_payroll_id
FROM pay_all_payrolls_f
WHERE trim(lower(payroll_name)) = trim(lower(r.payroll_name))
AND business_group_id = v_business_group_id;
EXCEPTION
WHEN OTHERS THEN
RAISE_APPLICATION_ERROR(-20005,'Error While Retrieving (Payroll_ID) Info...'||SQLCODE||' '||SQLERRM);
END;
BEGIN
SELECT pay_basis_id
INTO v_pay_basis_id
FROM per_pay_bases
WHERE trim(lower(pay_basis)) = trim(lower(r.pay_basis))
AND business_group_id = v_business_group_id;
EXCEPTION
WHEN OTHERS THEN
RAISE_APPLICATION_ERROR(-20006,'Error While Retrieving (Pay_Basis_ID) Info...'||SQLCODE||' '||SQLERRM);
END;
BEGIN
SELECT person_id
INTO v_person_id
FROM per_all_people_f
WHERE employee_number = r.supervisor_number
AND business_group_id= v_business_group_id;
SELECT assignment_id
INTO v_sup_assignment_id
FROM per_all_assignments_f
WHERE person_id = v_person_id
AND business_group_id = v_business_group_id;
EXCEPTION
WHEN OTHERS THEN
RAISE_APPLICATION_ERROR(-20007,'Error While Retrieving (Assignmet_ID) for supervisor..'||SQLCODE||' '||SQLERRM);
end;
BEGIN
hr_assignment_api.update_emp_asg_criteria(p_effective_date => TRUNC(SYSDATE),
p_datetrack_update_mode => 'CORRECTION',
p_assignment_id => v_assignment_id,
p_validate => FALSE,
p_called_from_mass_update => NULL,
p_grade_id => v_grade_id,
p_position_id => NULL,
p_job_id => v_job_id,
p_payroll_id => null,--v_payroll_id,
p_location_id => v_location_id,
p_organization_id => v_business_group_id,
p_pay_basis_id => v_pay_basis_id,
p_segment1 => NULL,
p_segment2 => NULL,
p_segment3 => NULL,
p_segment4 => NULL,
p_segment5 => NULL,
p_segment6 => NULL,
p_segment7 => NULL,
p_segment8 => NULL,
p_segment9 => NULL,
p_segment10 => NULL,
p_segment11 => NULL,
p_segment12 => NULL,
p_segment13 => NULL,
p_segment14 => NULL,
p_segment15 => NULL,
p_segment16 => NULL,
p_segment17 => NULL,
p_segment18 => NULL,
p_segment19 => NULL,
p_segment20 => NULL,
p_segment21 => NULL,
p_segment22 => NULL,
p_segment23 => NULL,
p_segment24 => NULL,
p_segment25 => NULL,
p_segment26 => NULL,
p_segment27 => NULL,
p_segment28 => NULL,
p_segment29 => NULL,
p_segment30 => NULL,
p_employment_category => NULL,
p_concat_segments => NULL,
p_grade_ladder_pgm_id => NULL,
p_supervisor_assignment_id => v_sup_assignment_id,
p_people_group_id => v_people_group_id,
p_object_version_number => v_object_version_number,
p_special_ceiling_step_id => v_special_ceiling_step_id,
p_group_name => v_group_name,
p_effective_start_date => v_ass_effective_start_date,
p_effective_end_date => v_effective_end_date,
p_org_now_no_manager_warning => v_org_now_no_manager_warning ,
p_spp_delete_warning => v_spp_delete_warning,
p_entries_changed_warning => v_entries_changed_warning,
p_tax_district_changed_warning => v_tax_district_changed_warning,
p_other_manager_warning => v_other_manager_warning);
EXCEPTION
WHEN OTHERS THEN
RAISE_APPLICATION_ERROR(-20008,'Error While Create new assignment..'||SQLCODE||' '||SQLERRM);
END;
END LOOP;
COMMIT;
END;
Thank you & Best RegardsI think this is essentially saying that the Supervisor Assignment is wrong or no longer effective. Looking at your SQL to fetch the Supervisor Assignment there are a number of potential issues. This is what you've currently got:
SELECT person_id
INTO v_person_id
FROM per_all_people_f
WHERE employee_number = r.supervisor_number
AND business_group_id= v_business_group_id;
SELECT assignment_id
INTO v_sup_assignment_id
FROM per_all_assignments_f
WHERE person_id = v_person_id
AND business_group_id = v_business_group_id;
Potential Problems/Clarifications
1. What is r.supervisor_number, what does it contain and how is it derived? I can't see that anywhere else in the block...
2. Is there a chance that r.supervisor_number is referencing an employee who has left, ie, now an ex-employee?
3. The SELECT statement that fetches the assignment_id does not perform any date-effective restrictions, which means you might be lucky enough to fetch the person's current assignment. But you might also fetch an old or future-dated assignment.
4. The SELECT statement that fetches the assignment_id does not restrict the type of assignment, so if this manager has applied for a job (ie, they have an applicant assignment) or some other type of non-employee assignment you might be picking that up.
This would work better for you:
SELECT paaf.assignment_id
INTO v_sup_assignment_id
FROM per_all_people_f papf
,per_all_assignments_f paaf
WHERE papf.employee_number = r.supervisor_number
AND papf.business_group_id = v_business_group_id
AND nvl(papf.current_employee_flag, 'N') = 'Y'
AND trunc(sysdate) BETWEEN
papf.effective_start_date AND papf.effective_end_date
AND papf.person_id = paaf.person_id
AND paaf.assignment_type = 'E'
AND paaf.primary_flag = 'Y'
AND trunc(sysdate) BETWEEN
paaf.effective_start_date AND paaf.effective_end_date;
If it doesn't return a row it means that the supervisor (or whatever employee is returned by r.supervisor_number) is not active as at sysdate and cannot be used. Note that this SQL only applies for employees. If you can have Contingent Workers as supervisors in your implementation then this needs tweaking.
Does that help? -
How to create Webi Reports with SAP BW Objects
Hi,
I have no knowledge on creating webi reports with SAP BW Objects like (InfoCube, DSO, MultiProvider, Infoview, MasterData Infoobject).
As per my understanding Webi reports can be developed with universe which is created on BEx Queries or OLAP BAPI interface, unfortunately i don't have BEx App installed. So, i have to create OLAP universe in this case.
Here my question is can we create universe with all the available BW objects like InfoCube, DSO, MultiProvider, Infoview, MasterData Infoobject.
Please, Can anyone suggest a solution
Thanks,
Siva
Edited by: siva@chinni on Apr 25, 2010 4:45 PMHi,
Yes we can create WebI on the top of SAP Objects - InfoCube, DSO, Characteristics etc...
But we have to keep in mind that for WebI we must create Universe.
When we create universe we make direct connection with SAP Objects but we get less functionality - such Calculated Key Figures, Restricted Key Figures, formulas etc. Now you have to achieve all these missing components at Universe Level and at WebI level.
If you are creating your universe on the top of DSO and InfoObject then make sure they set for reporting.
There are some online documentation which tells that what functionality you can achieve.
Check the following document to have a bird's eye view.
[http://www.sdn.sap.com/irj/boc/go/portal/prtroot/docs/library/uuid/100369a7-033e-2c10-94a4-f254f8578153?quicklink=index&overridelayout=true]
There is another document in PPT which I could not find online. It is very helpful document. It is:
II. SAP BusinessObjects BI Solutions XI 3.1 and SAP NetWeaver BW 7 Current risks, approach, and mitigating strategies for Client Partners, License Sales, and Consulting Delivery Managers
Partner Enablement Seminar
Regards,
Bashir Awan -
I want to create a report with more than 64 column's.
I want to create a report with more than 64 column's. I have generated Query the XML.When I tried to create a template for the report.I have Inserted the colum's Wizard and finish it throughing error message. "you cannot create atable with more that 63 coloum's "
Hi ,
Can u Check the below thread
More than 63 columns in rtf template -
I bought my daughter an ipad mini and used my Apple ID to transfer over her favorites. Now I can't use netflix and hulu. So I want create her an id but it won't let saying too young. I tried to create another one with my age and it still says too young.help!!!
iTUNES STORE - TERMS AND CONDITIONS
"This iTunes Service is only available for individuals aged 13 years or older, unless you are under 13 years old and your Apple ID was provided to you as a result of a request by an approved educational institution. If you are 13 or older but under the age of 18, you should review this Agreement with your parent or guardian to make sure that you and your parent or guardian understand it."
Restart the iPad. Tap Settings > iTunes & App Store then sign in your Apple ID. -
I am not having any luck trying to create a brochure with ID in CC
I am not having any luck trying to create a brochure with ID in CC. i thought i remembered it to be something you can use in Bridge also. Can't seem to find that either.
anyone have any help they can offer?If you're starting from scratch learning InDesign, know that it's difficult to learn just by asking a few questions. You'll do much better either by buying an excellent, inexpensive book by Sandee Cohen:
InDesign CC: Visual QuickStart Guide
Or by watching some videos on www.Lynda.com. Here's the best introduction:
InDesign CC Essential Training -
How to create a report with data using the Crystal Reports for Java SDK
Hi,
How do I create a report with data that can be displayed via the Crystal Report for Java SDK and the Viewers API?
I am writing my own report designer, and would like to use the Crystal Runtime Engine to display my report in DHTML, PDF, and Excel formats. I can create my own report through the following code snippet:
ReportClientDocument boReportClientDocument = new ReportClientDocument();
boReportClientDocument.newDocument();
However, I cannot find a way to add data elements to the report without specifying an RPT file. Is this possible? I seems like it is since the Eclipse Plug In allows you to specify your database parameters when creating an RPT file.
is there a way to do this through these packages?
com.crystaldecisions.sdk.occa.report.data
com.crystaldecisions.sdk.occa.report.definition
Am I forced to create a RPT file for the different table and column structures I have?
Thank you in advance for any insights.
Ted JenneyHi Rameez,
After working through the example code some more, and doing some more research, I remain unable to populate a report with my own data and view the report in a browser. I realize this is a long post, but there are multiple errors I am receiving, and these are the seemingly essential ones that I am hitting.
Modeling the Sample code from Create_Report_From_Scratch.zip to add a database table, using the following code:
<%@ page import="com.crystaldecisions.sdk.occa.report.application.*"%>
<%@ page import="com.crystaldecisions.sdk.occa.report.data.*"%>
<%@ page import="com.crystaldecisions.sdk.occa.report.document.*"%>
<%@ page import="com.crystaldecisions.sdk.occa.report.definition.*"%>
<%@ page import="com.crystaldecisions.sdk.occa.report.lib.*" %>
<%@ page import = "com.crystaldecisions.report.web.viewer.*"%>
<%
try {
ReportClientDocument rcd = new ReportClientDocument();
rcd.newDocument();
// Setup the DB connection
String database_dll = "Sqlsrv32.dll";
String db = "qa_start_2012";
String dsn = "SQL Server";
String userName = "sa";
String pwd = "sa";
// Create the DB connection
ConnectionInfo oConnectionInfo = new ConnectionInfo();
PropertyBag oPropertyBag1 = oConnectionInfo.getAttributes();
// Set new table logon properties
PropertyBag oPropertyBag2 = new PropertyBag();
oPropertyBag2.put("DSN", dsn);
oPropertyBag2.put("Data Source", db);
// Set the connection info objects members
// 1. Pass the Logon Properties to the main PropertyBag
// 2. Set the Server Description to the new **System DSN**
oPropertyBag1.put(PropertyBagHelper.CONNINFO_CRQE_LOGONPROPERTIES, oPropertyBag2);
oPropertyBag1.put(PropertyBagHelper.CONNINFO_CRQE_SERVERDESCRIPTION, dsn);
oPropertyBag1.put("Database DLL", database_dll);
oConnectionInfo.setAttributes(oPropertyBag1);
oConnectionInfo.setUserName(userName);
oConnectionInfo.setPassword(pwd);
// The Kind of connectionInfos is CRQE (Crystal Reports Query Engine).
oConnectionInfo.setKind(ConnectionInfoKind.CRQE);
// Add a Database table
String tableName = "Building";
Table oTable = new Table();
oTable.setName(tableName);
oTable.setConnectionInfo(oConnectionInfo);
rcd.getDatabaseController().addTable(oTable, null);
catch(ReportSDKException RsdkEx) {
out.println(RsdkEx);
catch (Exception ex) {
out.println(ex);
%>
Throws the exception
com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: java.lang.NullPointerException---- Error code:-2147467259 Error code name:failed
There was other sample code on SDN which suggested the following - adding the table after calling table.setDataFields() as in:
String tableName = "Building";
String fieldname = "Building_Name";
Table oTable = new Table();
oTable.setName(tableName);
oTable.setAlias(tableName);
oTable.setQualifiedName(tableName);
oTable.setDescription(tableName) ;
Fields fields = new Fields();
DBField field = new DBField();
field.setDescription(fieldname);
field.setHeadingText(fieldname);
field.setName(fieldname);
field.setType(FieldValueType.stringField);
field.setLength(40);
fields.add(field);
oTable.setDataFields(fields);
oTable.setConnectionInfo(oConnectionInfo);
rcd.getDatabaseController().addTable(oTable, null);
This code succeeds, but it is not clear how to add that database field to a section. If I attempt to call the following:
FieldObject oFieldObject = new FieldObject();
oFieldObject.setDataSourceName(field.getFormulaForm());
oFieldObject.setFieldValueType(field.getType());
// Now add it to the section
oFieldObject.setLeft(3120);
oFieldObject.setTop(120);
oFieldObject.setWidth(1911);
oFieldObject.setHeight(226);
rcd.getReportDefController().getReportObjectController().add(oFieldObject, rcd.getReportDefController().getReportDefinition().getDetailArea().getSections().getSection(0), -1);
Then I get an error (which is not unexpected)
com.crystaldecisions.sdk.occa.report.lib.ReportDefControllerException: The field was not found.---- Error code:-2147213283 Error code name:invalidFieldObject
How do I add one of the table.SetDataFields() to my report to be displayed?
Are there any other pointers or suggestions you may have?
Thank you -
How to create a report with different page sizes
Hi,
I would like to create a report with different page sizes, it's possible to do it with diadem?
When I change the layout parameters, changes afect to all sheets...
Is there a way to change page size individually for each sheet?
Thanks in advance.
MarcHi Marc,
You can use the DocStart and DocEnd commands along with the PicPrint command to spool multiple print commands to the same output PDF file using the direct printer approach. This should enable you to programmatically specify the page size differently for each sheet that you add to the print job.
' Print PDF Page by Page.VBS
OPTION EXPLICIT
Dim i, Path, OldPrintName
Path = AutoActPath & "2D Stacked"
Call DataDelAll
Call DataFileLoad(Path & ".TDM")
PDFFileName = Path & " Page by Page.pdf"
IF FileExist(PDFFileName) THEN Call FileDelete(PDFFileName)
OldPrintName = PrintName
PrintName = "winspool,DIAdem PDF Export,LPT1:" ' Set to PDF printer
PDFResolution = "72 DPI" ' "2400 DPI" , "default"
PDFOptimization = TRUE
PDFFontsEmbedded = FALSE
PDFJPGCompressed = "high"
PrintOrient = "landscape" ' orient paper
Call PrintMaxScale("GRAPH") ' auto-max, see alternative margin setting variables below
PrintLeftMarg = 0.181
PrintTopMarg = 0.181
PrintWidth = 10.67
'PrintHeigth = 7 (read-only)
Call WndShow("REPORT")
Call DocStart ' Begin multi-page document/print job
FOR i = 1 TO 4
Call PicLoad(Path & ".TDR")
Call GraphSheetNGet(1)
Call GraphSheetRename(GraphSheetName, "Page " & i)
Call PicUpdate
Call PicPrint("WinPrint") ' Add a page to be printed
NEXT ' i
Call DocEnd ' End multi-page document/print job
PrintName = OldPrintName
Call ExtProgram(PDFFileName)
Brad Turpin
DIAdem Product Support Engineer
National Instruments -
Please help to get onhand stock report with last purchase and billed date warehouse and item wise
please help to get onhand stock report with last purchase and billed date warehouse and item wise
Hi Rajeesh Ambadi...
Try This
SELECT distinct T0.ITEMCODE , t1.ItemName, T0.ONHAND as 'Total Qty',
T1.LASTPURDAT ,t1.LastPurPrc
FROM OITW T0 INNER JOIN OITM T1 ON T0.ITEMCODE = T1.ITEMCODE
INNER JOIN OITB T2 ON T1.ITMSGRPCOD=T2.ITMSGRPCOD left join ibt1 t3 on t3.itemcode = t0.itemcode and t3.whscode = t0.whscode
WHERE
T0.ONHAND>0
AND T0.WhsCode ='[%0]'
Hope Helpful
Regards
Kennedy -
Creating a report with multiple Y-axes on one graph
I currently have a script that will create a report with either 1, 2, or 3 graphs and has the ability to have four graphs per plot. I would like to add functionality to this script by making the Y-axis on the graphs have multiple Y-axes. How can I programmatically create a graph with multiple Y-axes?
To create an new axis system use the command GraphObjNew, eg:
Call GraphObjNew("2D-Axis","2DAxis1")
Call GraphObjOpen("2DAxis1")
D2AxisBackColor = "blue"
Call GraphObjClose("2DAxis1")
Call PicUpdate
If you have DIAdem Version 10 you can also create a new y-axis using GraphObjYAxisNew. This command is not available in versions 9.1:
Call GraphObjOpen("2DAxis1")
AxisNo = GraphObjYAxisNew("left")
If AxisNo>0 Then
Call GraphObjOpen(D2AxisYObj(AxisNo))
D2AXISYTXT ="My new axis"
D2AXISYTXTFONT ="Arial"
D2AXISYTXTCOLOR ="red"
Call GraphObjClose(D2AxisYObj(AxisNo))
End If
Call GraphObjClose("2DAxis1")
Winfried
Message Edited by winner on 03-23-2006 03:48 PM
Maybe you are looking for
-
HT1476 kso my ipod isnt charging properly :(
its stuck at 20%. when it dies it will charge to reboot but it wont charge when its on ! it will die on the charge .. please help me idk what to do anymore ive tried everything from changing chargers to wiping my ipod please help me
-
How to change language in imac
help me in changing my mac language
-
Hi ~ I am looking for an easy method to center the print dialog on the parent window that calls it - ideas? Lena
-
Zen X-Fi2 behaves obsuredely. Shutting down automatically
Water go spilled on my Zen X-Fi2 player. From then on it is behaving oddly, it automatically locks itself , one we open the lock it is shuttingdown. not able to do anything. Please help
-
What happened to Firefox Junior? Is this still being worked?
Is this still a viable product?