Home » Developer & Programmer » Reports & Discoverer » passing parameters...
icon7.gif  passing parameters... [message #259174] Tue, 14 August 2007 10:08 Go to next message
brintha
Messages: 28
Registered: August 2007
Junior Member
Hai all,
Is it possible to pass parameter to a formula column or restrict the records based on the value that is returned in a formula column?
I need to generate a report based on the parameter sent and the parameter that is passed is not retrieved in the base query. It is displayed using formula column in order to avoid replication of same records except for one column in the record.
pls help me out if there is any possibility or of u have any other idea regarding this. It is urgent.


regards,
brintha.r
Re: passing parameters... [message #259229 is a reply to message #259174] Tue, 14 August 2007 15:23 Go to previous messageGo to next message
Littlefoot
Messages: 21813
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Yes, it is possible to create a user parameter and use its value in a formula column. For example, if user parameter's name is P_100 and formula column is CF_100, you may reference the parameter as
function CF_100Formula return Number is
begin
  return (:p_100 + 1);
end;
Display it in the Paper Layout as any other column (its source should be the CF_100 formula column).

This was easy. Now, I must admit I don't understand the reason you tried to explain. Avoiding replication of some records? What does it mean? Why don't you use DISTINCT, for example?
Or, if it is about restricting column replication, why don't you make those columns part of a break group?

Whichever it is, could you explain it once again, please? An example would be great (possibly based on Scott's schema) so that we could reproduce it.
Re: passing parameters... [message #259280 is a reply to message #259174] Tue, 14 August 2007 23:01 Go to previous messageGo to next message
ab_trivedi
Messages: 460
Registered: August 2006
Location: Pune, India
Senior Member
Hi

Can u give more detail that what type of report you want to prepare because what you want is possible. But be more clear about your problem.

Ashu
Re: passing parameters... [message #259324 is a reply to message #259229] Wed, 15 August 2007 01:10 Go to previous messageGo to next message
brintha
Messages: 28
Registered: August 2007
Junior Member
Hi,
Thanks for ur reply. I ll explain in detail. There are two tables say location and location_refnum. location_id is the primary key for location and it is the foreign key for location_refnum.refnum_id is primary key for location_refnum.
now the location_refnum(refnum_id) will have more than one refnum_value depending on the type selected.In real time there may be even hundreds of refnum_values.
But the requirement is the refnum_value must be displayed for those records which has a specific 'type' value. This type is in location table. for type = 'customer' say then then the refnum_value will have only one value. i want to display that refnum_value alone and not others(leave them empty)but ill display its type and location_id.
The replication comes if the refnum value is retrieved using the base query since many refnum_values are there for same location_id and refnum_id.
I displayed the refnum_value using formula column to avoid the replication where i gave a condition like the refnum_value must be displayed only if the type = 'customer'.
I got it right in my report. There was no replication thereafter.Now I have to pass parameter to the refnum_value and get the records which matches the same.

thanks and regards,
brintha.r


Re: passing parameters... [message #259608 is a reply to message #259324] Thu, 16 August 2007 02:01 Go to previous message
sispk6
Messages: 164
Registered: November 2006
Location: pakistan
Senior Member
if you are passing parameters from a form to a report then use
"run_product(5 parameters)" if you are using 6i--see help
and if you are using higher version use
"run_report_object()"
and if you are passing parameters from one report to other and they are master detailed reports then
then you can use "drill down reports" , view topic drill down reports there is a sample report there.
else use parameter forms, simplest of all
Previous Topic: how to get Crosstab format report using Report dev 6i/10g
Next Topic: Date function to be used in reports..QRY
Goto Forum:
  


Current Time: Fri Jul 05 11:06:10 CDT 2024