Home » Developer & Programmer » Reports & Discoverer » CHAR field alignment (Reports Builder 6i)
CHAR field alignment [message #360222] Thu, 20 November 2008 01:57 Go to next message
mahamaha
Messages: 3
Registered: November 2008
Location: QATAR
Junior Member
How can I change the alignment char type in field for report builder R6I
Example: when I insert data into forms builder 6I (1111-222-3333) type varchar2, The result in report builder like (3333-222-1111) data type:Char

[EDITED by LF: modified topic title; the original was "URGENT". Added product name.]

[Updated on: Thu, 20 November 2008 02:28] by Moderator

Report message to a moderator

Re: Urgent [message #360234 is a reply to message #360222] Thu, 20 November 2008 02:26 Go to previous messageGo to next message
Littlefoot
Messages: 20891
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Huh? I'm not sure I understood your question.

Is it that - in a form - you enter value "111-222-333" into an item, save changes, run a report and
a) you'd like the result to be "333-222-111"
b) the result already is "333-222-111" and you wonder why?
Re: Urgent [message #360268 is a reply to message #360234] Thu, 20 November 2008 04:23 Go to previous messageGo to next message
mahamaha
Messages: 3
Registered: November 2008
Location: QATAR
Junior Member
Thank u for help me

i want tell u whene i insert the code (1111-222-3333) in form builder, i want to same result in report builder, i mean
(1111-222-3333) ... but the problem in the report field it change the direction ,it is become like (3333-222-1111) and this is wrong
Re: Urgent [message #360281 is a reply to message #360268] Thu, 20 November 2008 04:49 Go to previous messageGo to next message
Littlefoot
Messages: 20891
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
As far as I can tell, strings don't tend to "reverse" by themselves. Somewhere between two end points - "entering a value in a form" (as a starting point) and "displaying it in a report" (as the final point) - something has happened.

How is data stored in a table? In a form, it looks like 1111-222-3333. What is the output of the SELECT statement? Please, post your SQL*Plus session's output here, just to verify the way data gets stored in a table. If it is stored backwards, perhaps there's a form or a database trigger which reverts it?

Otherwise, how does the report's query look like, as well as field's format trigger (if there's any), or even a formula column which is displayed instead of the original column?
Re: Urgent [message #360809 is a reply to message #360281] Mon, 24 November 2008 01:24 Go to previous messageGo to next message
mahamaha
Messages: 3
Registered: November 2008
Location: QATAR
Junior Member
- THE DIRECTION FOR THIS REPORT FROM RIGTH TO LEFT (ARABIC),
- THE SQL QUERY :-
SELECT E.PERSON_ID,
E.SERVICE_NO,
E.EMP_NAME,
E.DEDUCTION_CODE,
E.MINISTRY_CODE,
E.DEPT_CODE,
E.DUE_DATE,
E.PREVIOUS_EMPLOYER,
E.PERIOD_DAYS,
E.PERIOD_MONTHS,
E.PERIOD_YEARS,
E.PERIOD_START_DATE,
E.PERIOD_END_DATE,
E.DED_AMOUNT,
E.BASIC_SALARY,
E.SOCIAL_ALLOWANCE,
E.BASIC_SALARY + E.SOCIAL_ALLOWANCE,
E.PAID_BY_EMP_MIN,
E.PAID_DATE,
E.PAID_AMOUNT,
E.PAYMENT_REF_NO

FROM EMPLOYEE_CASH_DEDUCTIONS_TEMP E
WHERE E.PERSON_ID = :P_PERSON_ID
AND DEDUCTION_CODE IN ( '70', '71', '72','73', '74', '75','76', '77', '78','79')
----------------------------------------------------------------
- THE FIELD WHICH IS THE PROBLEM: IT IS FOURMELA COLUMNS:

function CF_PAYMENT_REF_NOFormula return CHAR is
V_PAYMENT_REF_NO VARCHAR2(20);
V_PAYMENT_REF_NO_DISPLAY VARCHAR2(20);
begin

SELECT PAYMENT_REF_NO
INTO V_PAYMENT_REF_NO
FROM EMPLOYEE_CASH_DEDUCTIONS_TEMP
WHERE PERSON_ID = :PERSON_ID
AND SERVICE_NO = :SERVICE_NO
AND DEDUCTION_CODE = :DEDUCTION_CODE ;


IF :P_TITLE = '1' THEN
V_PAYMENT_REF_NO_DISPLAY := NULL;
ELSE
V_PAYMENT_REF_NO_DISPLAY := V_PAYMENT_REF_NO;
END IF;

RETURN V_PAYMENT_REF_NO_DISPLAY;

EXCEPTION WHEN TOO_MANY_ROWS THEN
SRW.MESSAGE(1000,' يوجد تكرار في مدة الخدمة '|| ' : '|| :PERSON_ID);
RETURN NULL;
End;
------------------------
- THE DATA WHICH INSERTED FROM (FORM BUILDER) IS STORED IN THE TABLE THEN THE RESULT CAN SEE IN THE REPORTS.
---------------------------------------------------------------



Re: CHAR field alignment [message #360947 is a reply to message #360222] Mon, 24 November 2008 07:33 Go to previous message
rajy_salim
Messages: 204
Registered: January 2008
Location: Beirut - Lebanon
Senior Member
It's because your report's direction is right-to-left, report builder reverses the string to start from the right since the ARABIC language starts from the right.
Try to change your regional settings and see if it does something with it. If it does not, then change your report direction to left-to-right and reverse all the strings by yourself, so your string will start from the left and appear like you want it to.

Rajy
Previous Topic: Having 2 different pages counter in one report
Next Topic: REP-1401: 'beforereport': Fatal PL/SQL error : while calling report from form
Goto Forum:
  


Current Time: Sun Dec 04 08:35:45 CST 2016

Total time taken to generate the page: 0.14398 seconds