Home » Developer & Programmer » Forms » Passing Parameters-form to report, print to csv (merged)
Passing Parameters-form to report, print to csv (merged) [message #418283] |
Thu, 13 August 2009 19:38 |
johncano
Messages: 3 Registered: August 2009 Location: Manila, Philippines
|
Junior Member |
|
|
help sir/ma'am..i am a newbie and a newly trained oracle programmer(w/c lasted for only 13 days covering sql,plsql, reports and forms)...uhm, i have searched this forum and found answers to my questions especially how to pass parameters from forms to reports..so iam already done with that, but my boss aside from generating a report, wants it to be generated to a .csv file, which i am having a hard time doing..
let me paint you guys a picture on how my small and first project looks like..
i have a report which generates depending on the 3 parameters that my boss asked me to do, from_date, to_date and department..and it's working perfectly already..then, i have this form that passes those parameters to my report so that i won't call the parameter form of the report and then i have this button that when i click it, it generates the report based on the parameters that i or the user supplied..
my problem is about the "print to file" or "print to csv" option that my boss demands..my understanding of oracle built-in procedures are limited..sir David mentioned in some thread/topic that web.show_document could be of some help, but i don't really understand the parameters needed for that command, i think i need a report server for that?which i believe we don't have here on our office thou i am not sure..
here's the code i use to run my report from my form...
DECLARE
pl_id ParamList;
BEGIN
pl_id := Get_Parameter_List('tmpdata');
IF NOT id_null(pl_id) THEN
Destroy_Parameter_List(pl_id);
END IF;
pl_id := Create_Parameter_List('tmpdata');
Add_Parameter(pl_id,'PARAMFORM',TEXT_PARAMETER,'NO');
Add_Parameter(pl_id,'P_dept',TEXT_PARAMETER,:BLOCK3.dept);
Add_Parameter(pl_id,'P_from_date',TEXT_PARAMETER,:BLOCK3.from_date);
Add_Parameter(pl_id,'P_to_date',TEXT_PARAMETER,:BLOCK3.to_date);
Run_Product(REPORTS,'D:\old_new_success.rep',SYNCHRONOUS,RUNTIME,FILESYSTEM,pl_id, NULL);
END;
my real problem is, let's say the user inputs those 3 parameters(from and to date and dept) and i clicked the generate to file button, it should be able to generate a .csv file from my report using those 3 parameters..hope you guys can help me out with this..thanks...
|
|
|
Passing Parameters-form to report, print to csv [message #418284 is a reply to message #418283] |
Thu, 13 August 2009 19:40 |
johncano
Messages: 3 Registered: August 2009 Location: Manila, Philippines
|
Junior Member |
|
|
help sir/ma'am..i am a newbie and a newly trained oracle programmer(w/c lasted for only 13 days covering
sql,plsql, reports and forms)...uhm, i have searched this forum and found answers to my questions especially how
to pass parameters from forms to reports..so iam already done with that, but my boss aside from generating a
report, wants it to be generated to a .csv file, which i am having a hard time doing..
let me paint you guys a picture on how my small and first project looks like..
i have a report which generates depending on the 3 parameters that my boss asked me to do, from_date, to_date and
department..and it's working perfectly already..then, i have this form that passes those parameters to my report
so that i won't call the parameter form of the report and then i have this button that when i click it, it
generates the report based on the parameters that i or the user supplied..
my problem is about the "print to file" or "print to csv" option that my boss demands..my understanding of oracle
built-in procedures are limited..sir David mentioned in some thread/topic that web.show_document could be of some
help, but i don't really understand the parameters needed for that command, i think i need a report server for
that?which i believe we don't have here on our office thou i am not sure..
here's the code i use to run my report from my form...
DECLARE
pl_id ParamList;
BEGIN
pl_id := Get_Parameter_List('tmpdata');
IF NOT id_null(pl_id) THEN
Destroy_Parameter_List(pl_id);
END IF;
pl_id := Create_Parameter_List('tmpdata');
Add_Parameter(pl_id,'PARAMFORM',TEXT_PARAMETER,'NO');
--Add_Parameter(pl_id,'DISABLEprint',TEXT_PARAMETER,'YES');
Add_Parameter(pl_id,'P_dept',TEXT_PARAMETER,:BLOCK3.dept);
Add_Parameter(pl_id,'P_from_date',TEXT_PARAMETER,:BLOCK3.from_date);
Add_Parameter(pl_id,'P_to_date',TEXT_PARAMETER,:BLOCK3.to_date);
Run_Product(REPORTS,'D:\old_new_success.rep',SYNCHRONOUS,RUNTIME,FILESYSTEM,pl_id, NULL);
END;
my real problem is, let's say the user inputs those 3 parameters(from and to date and dept) and i clicked the
generate to file button, it should be able to generate a .csv file from my report using those 3 parameters..hope
you guys can help me out with this..thanks...
|
|
|
|
|
|
Goto Forum:
Current Time: Tue Feb 04 02:01:20 CST 2025
|