Home » Developer & Programmer » Reports & Discoverer » I need to develop a logic ina a report, and need to send the report out put thro an email
I need to develop a logic ina a report, and need to send the report out put thro an email [message #298602] Wed, 06 February 2008 13:29 Go to next message
vijay.nimmakuri@gmail.com
Messages: 10
Registered: February 2008
Location: inida
Junior Member

HI

I need to get the following logic
I have two parameters 1.item number:
2.price list name:

Scenario1:
item number:Blank , Price list name:Blank
RESULT: return all active PL's with active PLL's

scenario2:
item number:I1,I2... ,Pricelist:Blank

Result :::the pgrm should return all the active PLL's with in all active PL's with each of the items specified in the Item number parameter. For example all teh active PLL's with item 1 all the active PLL's with item2..

Scenario3
item number blank , price list:PL1,PL2....
RESULT:all active PLL's from PL1,PL2

Scnario 4
ITem number:I1,I2... Price list:PL1,PL2...
RESULT:all the active PLLS having I1,I2... should be retrived from the specified PL's PL1,PL2..

TO achive this i used two lexical parameters for item number and price those will be used in report query as below

Select batch name,
             price list name,
             list _header id,
             item number,
             item desc,
             uom code,
             list price,
             new list price,
             start date ,end date
from      QP_list_headers_vl,qp_list_lines
          qp_pricing attributes,mtl_sstem_items_vl
where qlh.list header id = qll.list header id
......
and msi.organization_id=p_ORG_Id
and qlh list typecode ='PRL'
and qll.list line type='PLL'
and MSi.segment1 IN &P_item
and qlh.name IN &P_price list name
..........

what code should i write in the report and where do I need to write this logic

---------------------------

SECOND issue

After developing this report and regestering this report in format as XML i need to create a request set XXXto GET the price list and email out put to employee

HOW could i email this report out put should i write and shelll script ? and what are the API's i need to use in that script

PLEASE suggest me with some code
i have SQL query for the REPORT..

Please sugges me

Thanks,
wejai

[Updated on: Wed, 06 February 2008 19:45] by Moderator

Report message to a moderator

Re: plese help me Urgent issue i need this loginc in my reoport [message #298623 is a reply to message #298602] Wed, 06 February 2008 19:30 Go to previous messageGo to next message
vamsi kasina
Messages: 2112
Registered: October 2003
Location: Cincinnati, OH
Senior Member
Quote:
and MSi.segment1 IN &P_item
and qlh.name IN &P_price list name
This will work only when those parameters are mandatory. I don't know why you have used space in between "&P_price list name". This also doesn't work.
You may use the lexical parameter for entire clause / line.
Quote:
&P_item_and
&P_price_list_name_and
Then you can use a if clause to populate the lexicals.
IF :P_item IS NOT NULL THEN
   :P_item_and := 'and MSi.segment1 IN (' || :P_item || ')';
END IF;
You can use similar code for other lexical too.

For second issue you may look at the Google search results.
result1
result2

By
Vamsi
PS: This question is very specific to Reports Forum.

[Updated on: Wed, 06 February 2008 19:52]

Report message to a moderator

Re: plese help me Urgent issue i need this loginc in my reoport [message #298760 is a reply to message #298623] Thu, 07 February 2008 09:58 Go to previous messageGo to next message
vijay.nimmakuri@gmail.com
Messages: 10
Registered: February 2008
Location: inida
Junior Member

Thanks a lot vimshi it really helped me a lot

thank u once again
Re: plese help me Urgent issue i need this loginc in my reoport [message #299859 is a reply to message #298623] Wed, 13 February 2008 07:11 Go to previous messageGo to next message
dillango
Messages: 145
Registered: January 2008
Senior Member
Hi Vamsi,

where can we these lines

IF :P_item IS NOT NULL THEN
:P_item_and := 'and MSi.segment1 IN (' || :P_item || ')';
END IF;


Do you mean in the user paramter ?

Regards, ILANGO
Re: plese help me Urgent issue i need this loginc in my reoport [message #299865 is a reply to message #299859] Wed, 13 February 2008 07:34 Go to previous message
vamsi kasina
Messages: 2112
Registered: October 2003
Location: Cincinnati, OH
Senior Member
In AfterParameterForm / BeforeReport Trigger.
By that time only you will be having the value in :P_item.
After that :P_item_and will be needed to run the report's sql.

By
Vamsi
Previous Topic: how to call ids reports from menu and ids forms
Next Topic: CHANGING RECORD ACCORDING TO VALUE
Goto Forum:
  


Current Time: Tue Jul 02 09:16:56 CDT 2024