Monday, August 17, 2009
Friday, August 14, 2009
Thursday, February 19, 2009
Struggle: The real fun of life
Life is all about following your dreams. Paulo Coelho in ‘The Alkemist’ has expressed a similar thought. But is it actually so easy to ignore the mind and blindly follow the heart and proceed in a direction that probably leads to an uncertain future! Not easy ofcourse but not so tough either.
Living without a dream is no life after all. Can someone claim to be living a life if he has surrendered to fate and lets himself loose enough to be blown away with the breeze of time in a direction unknown? He might be breathing and showing all symptoms of life in biological terms but that’s just a biological life, which exists equally in an amoeba, a vegetable, a sponge or an elephant. Then what differentiates between a sponge and a human being? Is it just a super-developed brain or is there something more to it, something like a beating heart that’s often used as a symbol of the not-so-materialistically-conscious mind by the non-medical fraternity.
Where there is a heart, there are wishes and dreams. Wherever there are dreams, there are goals and zeal to achieve them, the determination to fight and struggle inspite of all the obstatcles in the path. Struggle to design the future in your own terms, to live a life you always thought you deserve, to strive to get better and better, to march ahead towards a life you have always dreamt for yourself, that’s what it means to truly live a life. The dream is life, the struggle is life, the fun of losing and yet fighting is life, and the joy of success is life.
There are many stakes involved ofcourse, the biggest being the risk of failure and the risk of probably losing whatever you initially started with. But as someone has said, ‘You don’t lose until you give up’. The day you give up, you accept defeat and you lose not just a chance to live your dream, but the dream itself and with the dream you lose life because, giving up is nothing but death.
Its finally upto an individual to choose a dreamer’s and fighter’s life or to choose to sway like a corpse with the waves of time in the ocean of life.
Monday, May 19, 2008
RDF to XMLP Report Conversion Continued...

2) While defining the parameters, make sure you are passing the token value.
Two Points to note here are :
1. The short name of the registered CP should be exactly same as the code name of the data definition .
3) Now we shall create the data definition. Here is the data definition xml file for your reference:




As you can see, in the xml data definition,
1.We first declare the version and the encoding which is by default UTF-8. '
2.Then we give a name to the data definition followed by the names of the corresponding pl/sql
package name the data definition refers so as to derive the values of the formula columns or
pl/sql logic for the report triggers etc.
3. Then comes the property tag that specifies the case of the xml tags here. We can declare other
properties too in this segment if we want and we may even totally avoid this segment.
4. Then comes the parameter segment where we declare the parameters that we would we
passing through our CP. The case and name of the parameter should exactly match the token
we pass while declaring the parameters.
5. Followed by the parameter is the sql query which is essentially same as the sql query in the
RDF report. But any formula columns that we calculate in separate program unit inn the RDF
report, has to be calculated here , in this query section in xml report. For such calculations, we
can directly refer the packaged functions or procedures. For eg : If we want a formula column
CF_Employee_age. Then we can write the pl/sql logic of calculating the age of an employee in
the packaged function MISPER_BR_VABAL.age. he logic here will be same as the logic in the
RDF program unit for CF_Employee age but here we write it in tha packaged function and call
it the query section as select ...., MISPER_BR_VABAL(p_employee_date_of_birth)
CF_Employee_age .....from ....., where...... ( Assuming p_employee_date_of_birth is one of our
user parameters declared in the parameter section or some column of any table.
Here , an important point to note is that, if the packaged function internally calls any other function that uses any DML, DDL, or TCL on any temporary table then we might get an error. This is because, here we are calling the function from a sql statement and functions performing DML, DDL or TCL are not allowed to be called from sql statement. In such cases, we might have to declare the DML, DDL or TCL performing function as PRAGMA AUTONOMOUS_TRANSACTION so that it is executed as an independent program unit.
6. After the query section, we declare the report triggers which again have their code wriiten in packaged functions or procedures.
7. In the data structure portion, we first write the grouping information followed by the element names. If we have any summary columns, we declare them here. For eg :

4) Once this much is done , we register the data definition through the xml publisher Administrator responsibility as shown below :

5) Now, we need to create the RTF template. For this we will first run the CP and save the output as the xml file. Then we shall open MS Word and load the XML file using the Oracle BI Utility as mentioned in teh Prerequisites. Following this we shall add the data fields as required on the RTF file and save it. Here is a sample RTF File :




9) For registering, we again go to the XML Publisher Administrator Responsibility, and the go to Template Definition and register the template as follows:

Our steps our almost done. Now we only need to run the CP and check the output.
OK, one important point, while declaring the CP Parameters, you need to declare one additional parameter DebugFlag only for test purposes as follows:

11) Just for you reference, I am pasting the codes of a sample package spec and package body:




Just a reminder : Before running the CP at step 5), make sure that you have compiled the pkg spec and pkg body on the same instance where you are submitting the CP.
Thisn completes the entire RDF to XML Conversion process.
I shall try to discuss some common errors we face and the troubleshooting that requires to be done in my next blog.
Till then , do try this out and let me know how it works. Hope this helps everyone who reads it and surely me so that I donot forget the steps.
Ok, then, its too late for me already 8:30pm and I am still in office. I got to go. Bbye and take care.
Oracle RDF Report to XML Publisher Report
First question that would come to anyone's mind is :
Why do we need to convert RDF eports to XML?
Successful migration of RDF report to BI Publisher will allow the customer to take avantage of the many benefits found in BI Publisher including:
- · Access to heterogeneous databases
- · Zero footprint, fully web based architecture
- · Low cost of setup and Administration
- · Simple reports development and low cost of reports maintenance
- · Wide range of delivery support (Printer, Fax, Email, WebDAV, FTP/HTTP)
- · Multi-language support
- · Performance improvement
- · Improved Scheduling functionality
- · Data Caching
- · Security enhancements
Oracle XML Publisher is a template-based publishing solution delivered with the Oracle E-Business Suite. It provides a new approach to report design and publishing by integrating familiar desktop word processing tools with existing E-Business Suite data reporting. XML Publisher leverages standard, well-known technologies and tools, so you can rapidly develop and maintain custom report formats.
The flexibility of XML Publisher is a result of the separation of the presentation of the report from its data structure. The collection of the data is still handled by the E-Business Suite, but now you can design and control how the report outputs will be presented in separate template files. At runtime, XML Publisher merges your designed template files with the report data to create a variety of outputs to meet a variety of business needs, including:
- • Customer-ready PDF documents, such as financial statements, marketing materials, contracts, invoices, and purchase orders utilizing colors, images, font styles, headers and footers, and many other formatting and design options.
- • HTML output for optimum online viewing.
- • Excel output to create a spreadsheet of your report data.
- • "Filled-out" third-party provided PDF documents. You can download a PDF document, such as a government form, to use as a template for your report. At runtime, the data and template produce a "filled-out" form.
- • Flat text files to exchange with business partners for EDI and EFT transmission.
What are the steps involved in the RDF to XMLP report Conversion Process?
The overall flow can be diagrammatically represented by the following figure:

The migration APIs accept an Oracle Report in XML Format, this format is only supported in Oracle Reports 9i and above. Therefore you need to have a 9i+ version of Oracle Reports available. For R12 the Oracle Reports version in the techstack is 10.1.3 so the conversion to RDF XML is straightforward. For Release 11i the version is 6i, so you will need a higher version of Oracle Reports available somewhere on your system.
To get the Oracle Report in XML format from rdf format, either use Oracle Report Designer or Oracle Report rwconverter.exe utility under $ORACLE_HOME/bin
Example
D:\Oracle_home\BIN>rwconverter batch=yes source= h:\reports\brvac.rdf dest= h:\reports\brvac.xml dtype=xmlfile overwrite=yes
This will convert the binary RDF file into an RDF-XML format that can then be consumed by the conversion APIs.
This looks confusing isn't it.
What are the exact steps involved that we need to perform?
1.Data Model Migration
Use DataTemplateGenerator API to migrate the Oracle Reports Data Model to a DataTemplate and associated PL/SQL logic to PL/SQL Package (specification and body).
The API can be called through the command line or through a shell script. This will generate following output files:
- DataTemplate (REPORT.xml)
- Default PL/SQL package specification (REPORTS.pls)
- Default PL/SQL package body (REPORTB.pls)
javaw.exe oracle.apps.xdo.rdfparser.DataTemplateGenerator H:\report\brvac.xml
Output files:
- PL/SQL Package:H:\ report\brvacS.pls
- PL/SQL Body:H:\report\brvacB.pls
- DataTemplate:H:\report\brvac_template.xml
Use RTFTemplateGenerator API to migrate the Oracle Reports layout to an XML Publisher RTF template.
Since there is no support of PL/SQL in RTF Template, the process does not migrate any format trigger logic present in the report. Instead the generator writes all the format trigger code to log file. You will need to implement any corresponding PL/SQL logic as XSL code. The majority of Oracle Reports use simple ‘if’ formatting logic that can be converted relatively easily. To aid in this process, the resulting RTF template will contain formfields that hold the format trigger names that are called, these fields will be highlighted in red. You can then refer to the log to find the actual PL/SQL code used in the original Oracle Report.
The API can be called through the command line or through a shell script. This will generate following output files:
- RTF Template
- Log file
javaw.exe oracle.apps.xdo.rdfparser.RTFTemplateGenerator H:\report\brvac.xml
Output files:
- RTF Template: H:\ report\ brvac.rtf
- Log File : H:\report\brvac.log
No, its not really that simple though it is not tough either. There are some open issues that we need to take care of. Here are they:
Known Issues:
- Some times, because of complexity of Oracle Report the, Data Template or PL/SQL has some minor errors and requires manual correction.
- Format triggers are not supported. The format trigger logic should be implemented separately though XSLT
- If formula column reference the summary column as parameter and the summary column belongs to same Data Source/Data Query, this implementation is not supported in Data Template. This is because of all the formula columns moved to select statement and the summary column value is not available while executing the formula.
Surely, we can have a complete example with required data definition and template file.
But not today or else I would be breaching the confidentiality agreement of my company. Because as of now I only have the reports on which I have worked as a part of the project. These are company exclusive. Very shortly, I shall create a rather simple report easy to understand for beginners and not related to the company I am working for. Then I shall upload the sample data definition and template files with all required screenshots and outputs.
Till then, bye bye and have a nice day.
Wednesday, May 7, 2008
Adventures
Read On...
Life's Adventures Vs Adventurer's Life
Saleem, his wife Mehtaab and their little son Mubarak lived in a small hut very close to the sea shore in Orissa. By profession, Saleem was a fisherman who used to go out every morning rowing his boat into the mid sea and return in the evenings with as many fishes as he could manage. They could not afford a luxurious life but were happy with whatever they had.
Little Mubaarak was only 2 years old and the couple spent most of its time planning for Mubaarak's future. They used to save each penny of their earnings for Mubaarak. Saleem and Mehtaab were illiterate but they wanted to educate their only son and wanted him to become a doctor. Parents often want to see their children fulfilling their own dreams. Saleem's father was also a fisherman but he died after being stung by a poisonous aquatic creature. The poison was not very strong and he could have been saved only if their village had a doctor. But the nearest hospital was at a distance which had to be covered over a minimum of 5 hours in the locally available public transport. His father could not fight death that long and passed away on the way to the hospital. Since then, Saleem dreamt of making his son a doctor and Mehtaab supported him too. They used to sacrifice every small and big pleasure of their life and save money and they had been doing this since they got married. So the plans, expectations and dreams were all set for Mubaarak even before he came to his earthly existence.
Mubaarak, right from his birth, was a very naughty child. He had a tendency to do the forbidden.
He would try to reach things that were intensionally kept beyond his reach, he would try to taste things that he was not supposed to, he would try to do things that he knew his parents would not allow him to do. As he grew up, his interest towards things which commonly people would avoid, grew more and more intense.
Being born to a fisherman's family, he was an expert swimmer. Once he heard some villagers discussing that there was this cursed well into which many had fallen and died and that it has now been guarded by an iron wire so that no one can get too close. He immediately knew what he had to do next. He informed all his friends and acqaintances that he was going to jump into the well and come out of it that night. Every body tried to convince him not to do so but he was not one of those who would try to listen and understand what others say. He wanted to be the hero of the village and so he did what he had decided. As soon as his parents went off to sleep, he slipped out of his blanket and managed to come out of the house hiding in the darkness. He reached the place where the well was and he could see all his friends had accumulated to see his so called bravery. He crossed the iron wire and turned towards his friends one last time before jumping into the death well. Then he turned towards the well, closed his eyes and prayed to God. He was also afraid within, but the thought of becoming a hero in the village was so strong that it overcame his fear and there he was, all set to jump into the well. Ready, Steady an GO and splash came a sound from inside the well. All his friends of his age, 10-12 years, immediately ran from the place to inform the villagers. Within minutes the whole village was there standing beside the well and trying to pull him out. His unfortunate parents were also there. Saleem was almost ready to jump into the well himself to either save his son or die himself. Mehtaab was crying her heart out. They could not see their only son, their dream, their expectations, their life , their hope , everything drowning into the well. Just then they heard a noise from inside the well. They held the lantern to throw some light into the well so as to see what it was and they could see the smiling face of Mubaarak, fully drenched, climbing up the walls of the well. People tried to help him out with ropes and buckets but he didnot accept any help lest his bravery would not get all credit he thought he deserved for this action of his.
Finally, he was out of the well, standing there with his head held high in pride and satisfaction for having accomplished something he thought so great. And there right in front of him , was his father Saleem and mother Mehtaab, scared to death for the fear of losing their only son and the only ray of hope in their lives for whom they have been sacrificing every bit of thing they could to bring him up in the best possible way. But Mubaarak was so overwhelmed by his accomplishment that he didn't even realise what hell his perents went through in the last couple of minutes. He achieved what he wanted. All his friends thought he was the hero of the village. They began to look upto him as if he was their God. Mubaarak enjoyed all this attention and importance and kept doing such things which everyone else was either afraid to do or not allowed to do. This nature of his became stronger and stronger with time and by the time he was a 16 years old boy studying in the city high school, about 35 kms away from his village, inviting adventures became a habit he could not resist.
As soon as, he joined the city high school, he was eager to stay in Hostel. He gave several excuses to his poor illiterate parents like he would be able to do joint study and would be able to access the school library even at night. His parents also thought that travelling to school up and down everyday, laeves him too tired to study, so its better for his carrer to move to the school hostel. Though the hostel fees was much more than what any fisherman like Saleem could afford , but all their savings of their lives helped them accomodate the extra costs. They were ready to do anything to get their son the best possible education they could afford.
Thus, Mubaarak started staying in the hostel and used to visit home only in the weekends.
One weekend, he informed his parents that he was going on an excursion and would not be able to come home. He had lied. He was going out with his friends to satisfy his hunger for adventure.
The Weather guys had informed a day earlier that there is a threat of cyclone in the mid sea and that all fishermen and sailors should avoid the sea for the day. That's when Mubaarak decided to conquer the sea. He and his friends went to the shore that was closest to the city. They managed a boat somehow and then they were all set to sail. At the last moment , one by one all of Mubaarak's friends backed out. Mubaarak hated such show of fear and cowardice. He got angry and decided to sail all alone. His friends tried to convince him against going into the sea but Mubaarak had a hitler's mind. Once decided, he would not and he could not back out.
He sat on the boat, cut the rope and started rowing. He looked behind just once to say goood bye to his friends and made a mockery of them for they were scared of the cyclone whereas he was not. His friends only kept praying for him and kept shouting for him to come back. They were calling him as long as he was visible. But the mighty waves of the cyclonic sea took him out of sight pretty soon.
Mubaarak's friends waited for him to come back till the evening but as it grew dark and the waves went higher and higher, they came back to their school. Till late night when Mubaarak didn't return, they decided to inform the school authorities and his parents and so they did. By the time Saleem got the news, it was early morning of the next day. He immediately rushed towards his boat to get it ready to sail through the sea and search for his son. Mehtaab tried to stop him many times, but he was a mad man then. He could think nothing. He only knew that his son was in trouble and he had to save him. He went out into the sea. Mehtaab was waiting in the shore all day, without food without water awaiting her husband and son. In the evening she could see her husband returning. She outstreched her hands in anticipation of her son too. But as Saleem's boat came closer , she realized that Saleem was alone. Upon reaching the shore, Saleem could not utter a word. He only hugged Mehtaab tightly and broke down into tears. Mehtaab knew her son was lost in the sea and perhaps would never come back again. Even if he survives the untamed sea and the cyclone, he would not survive the hunger and the thrist , and even if he manages to survive that, he would probably serve as the fishes' food. With Mubaarak, all their hopes, their dreams, their expectations, their only reason for survival was lost. The cost of Mubaarak's adventure invitations was paid by Saleem and Mehtaab who were left behind to grow old without anyone to support them and nothing to look forward to.
Many years later, a tourist family had come to visit the fishing shore in Orissa and there was a young boy in the family. The boy was very excited to see such a huge endless water body. He was trying to break free of his mother's hold and rush towards the sea. An old man with wrinkled face and torn clothes was sitting nearby observing the boy. He stood up with great difficulty because of his old age and body ache and went close to the boy. The boy was a little scared to see him at first and so was his mother. The old man gently kept his hand on the boy's head and said, " Life is already full of adventures, you do not need to invite them.". Just then , an equally old lady came shouting " Saleem! Saleem!, Where are you? " . "Here I am, Mehtaab" , said the old man and walked away. The little boy and his mother kept staring at the old man as he limped his way towards the old lady standing at a distance, wrapped in a black shawl. Saleem's dry eyes and shaky voice had told them a story they were still trying to comprehend.
Wednesday, April 16, 2008
Basic Organ Functionality
Here I shall discuss some common and uncommon tips to keep some of our vital organs in good health.
Heart
What does it do?
Pumps in carbon-di-oxide rich blood from the body and sends it to lungs, and receives oxygen rich blood from lungs and pumps it out to the whole body.
How to keep it healthy?
1) By taking low calory (especially low in cholesterol and triglycerides) food
2) By doing regular exercise like aerobics with intense exercise intermittently alternating with light exercise , followed by a complete cool down
Lungs
What does it do?
Takes the oxygen we inhale and mixes it with the impure(carbon-di-oxide rich) blood, extracts the carbon-di-oxide from it to purify it and then sends the pure(oxygen rich) blood to the heart to get it pumped to the whole body while giving out the carbon-di-oxide through the wind pipe (trachea) for us to exhale.
How to keep it healthy?
1) By practising various breathing exercises
2) By trying to spend some time of each day in an oxygen rich surrounding (full of greenery) to inhale fresh oxygen rich air through deep breathing
Eyes
What does the pair of eyes do?
Well, we all know what they do.
How to keep it in good health?
1) Blink : They cleanse the eyes
2) Avoid rubbing eyes especially when hands or fingers are not clean to avoid eye infections like conjunctivitis
3) Eat a lot of VitA rich food (eg : Carrot, Papaya etc)
4) Practise some common eye exercises like focussing at a distant object for some time and then changing the focus to a nearby object. The change in focus should be slow at times and abrupt at times. This exercise strengthens the muscles holding the eye lens and thereby prevents their loosening. This helps us prevent developing common eye problems like myopia or hypermetropia (near-sightedness , far sightedness)
5) If possible, try spending sometime of each day focussing on greenery, any green plant or a distant green hill etc. Natural Green soothes the eye
6) Avoid looking at the TV screen or computer screens for long durations without break or from a very close distance
7) Keep a minimum distance between the eyes and the book when you are reading or writing
For healthy muscles and joints , regular exercise involving joint movements and muscle toning, strssing and then stretching and relaxing is a must.
Don't be surprised , if I say that regular exercise is good for skin too. Yes, its true. Wprk out regularly for few months and you will not miss the glow in your skin. But yes, that will happen, only when you otherwise keep you skin clean by washing it with a gentle face wash at least twice a day and apply a mild moisturiser at least once a day. When we work hard and sweat, it cleans the pores in the skin. Wash the sweaty face after exercise to keep it clean.
For patients of migraine like me, who get migraine attack any time, regular exercise is a must to keep such attacks in check. Migraine usually happens due to lack of a chemical substance called seratonin. Exercise helps secreate this chamical thereby reducing the severity of migraine and the frequency of the attacks.
Well, that's all for now. Whenever I get any more such information that might be useful, I would share the same. Till then, you take care of all your body organs and let me think about what my next topic should be. Any suggestions.....