Home » Developer & Programmer » Reports & Discoverer » Oracle Report 10g
Oracle Report 10g [message #453728] Fri, 30 April 2010 07:24 Go to next message
biswajit
Messages: 19
Registered: September 2009
Location: USA
Junior Member
Hi ,

I want to add some text my report that it will print only in
frist page. I already try following away but it will not work for me. I try those my 3/4 reports and i got same result:

1. I take a text item and set property in advanced layout print object on= first page.
2. I try with formating trigger. but when I use it my report crash. May be I don't know how to use it.

Please inform me how to do it. Please notify me ASAP.

Re: Oracle Report 10g [message #453731 is a reply to message #453728] Fri, 30 April 2010 07:33 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Option 2: right, perhaps you don't know how to use it. Unfortunately, we can't tell as you didn't post what you did.

Should be like this:
-- text item format trigger
  l_page_num number;
begin
  srw.get_page_num(l_page_num);

  return (l_page_num = 1);
end;
In other words: display it (return TRUE) if page number is equal to 1 (first page).
Re: Oracle Report 10g [message #453738 is a reply to message #453731] Fri, 30 April 2010 08:55 Go to previous messageGo to next message
biswajit
Messages: 19
Registered: September 2009
Location: USA
Junior Member
Please tell me where I need to be set property that
It will display when page number is one.
Re: Oracle Report 10g [message #453743 is a reply to message #453728] Fri, 30 April 2010 09:27 Go to previous messageGo to next message
cookiemonster
Messages: 13920
Registered: September 2008
Location: Rainy Manchester
Senior Member
Littefoot has just told you.
Use a format trigger with his code.
Re: Oracle Report 10g [message #453761 is a reply to message #453743] Fri, 30 April 2010 12:25 Go to previous messageGo to next message
biswajit
Messages: 19
Registered: September 2009
Location: USA
Junior Member
Hi ,
I already try this. problem is my report is crash if I use format trigger.Where I need to use this function return value.
Please tell me is there any other property that I have to set.
Re: Oracle Report 10g [message #453771 is a reply to message #453761] Fri, 30 April 2010 15:06 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
It *should not* crash. Operating system? Is Developer + OS combination certified? Did you try to reinstall Developer Suite? Could you try the same report (actually, technique) on another computer? If so, how does it behave?
Re: Oracle Report 10g [message #453774 is a reply to message #453771] Fri, 30 April 2010 16:08 Go to previous messageGo to next message
biswajit
Messages: 19
Registered: September 2009
Location: USA
Junior Member
Hi,

I tryed with 4/5 reports. My all reports is working fine.
My question was How I use return value from formatiing trigger.
What I did, I add a text item then I enter some text on it.
After that I open proprty palet in Advanced layout section I double click on format trigger and add following code

function B_12FormatTrigger return boolean is
vnum NUMBER;
begin

srw.get_page_num(vnum);
IF vnum =1 then
return (TRUE);
else
return (false);
end if;
end;

After that report is crash/ job is not submitted. Again If I remove this format trigger then it works fine. I am using Oracle Forms & Reports 10g and database also 10g in Windows Os.
I think problem is my process. Please inform me.


Thanks
Biswajit




Re: Oracle Report 10g [message #453775 is a reply to message #453774] Fri, 30 April 2010 16:44 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Try to "compile all" (Ctrl + Shift + K).
Re: Oracle Report 10g [message #453776 is a reply to message #453775] Fri, 30 April 2010 17:02 Go to previous messageGo to next message
biswajit
Messages: 19
Registered: September 2009
Location: USA
Junior Member
This is not my problem.
Re: Oracle Report 10g [message #453809 is a reply to message #453776] Sat, 01 May 2010 13:12 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Does it mean that you didn't <Ctrl + Shift + K>?

Quote:
     ...
    return (false);
  end if;
end;


After that report is crash / job is not submitted.

What does "after that" mean? You typed "end;" - then what?

As a workaround, try to simulate your own page numbering - create a package, declare a variable and set it to 0 (zero). Increase that number in Between Pages trigger. Instead of SRW.GET_PAGE_NUM, check package variable's value in item's Format Trigger.
Re: Oracle Report 10g [message #453820 is a reply to message #453809] Sat, 01 May 2010 16:39 Go to previous messageGo to next message
biswajit
Messages: 19
Registered: September 2009
Location: USA
Junior Member
Please tell me , where I used return value from formating trigger. How I use formating trigger. Is there any other property that related with formating trigger.
Re: Oracle Report 10g [message #453850 is a reply to message #453820] Sun, 02 May 2010 07:30 Go to previous messageGo to next message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Format trigger returns Boolean, and you use it in order to display certain report object (when TRUE has been returned) or not (FALSE). I guess you'll have to create your own formula columns if you want to "return" result of some computation.

P.S. Forgot to ask: what about three (3) parts of my previous message? You didn't respond to any of them. What a great communication!

[Updated on: Sun, 02 May 2010 07:31]

Report message to a moderator

Re: Oracle Report 10g [message #454017 is a reply to message #453850] Mon, 03 May 2010 08:25 Go to previous messageGo to next message
biswajit
Messages: 19
Registered: September 2009
Location: USA
Junior Member
Hi,
I got my solution. Problem is my frame. I add text item in wrong frame. Thanks for your help.


Thanks
Biswajit
Re: Oracle Report 10g [message #454044 is a reply to message #454017] Mon, 03 May 2010 15:22 Go to previous message
Littlefoot
Messages: 21808
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I don't quite get what a frame has to do with a format trigger (written in a way we discussed) and why would that cause report to crash. Furthermore, text can belong to any frame - it might not print as you'd want it to, but certainly wouldn't cause report to break.

Anyway, I guess it doesn't really matter now as you seem to be happy with the solution.

[Updated on: Mon, 03 May 2010 15:22]

Report message to a moderator

Previous Topic: Dot Matrix Printer print problem
Next Topic: Bar code Registration steps in UNIX
Goto Forum:
  


Current Time: Fri Apr 26 11:50:44 CDT 2024