How do I pass parameters to a report thru Report Viewer?
hi,
I am moving from Crystal Reports 8.5 to XI in VB6.
How do I pass parameters to a report thru Report Viewer?
Old VB code:
crReport.ParameterFields(0) = "FrProp;" & Trim$(.FrProp) & ";TRUE"
crReport.ParameterFields(1) = "ThProp;" & Trim$(.ThProp) & ";TRUE"
crReport.ParameterFields(2) = "RunDate;date(" & Format(Cntl.Run_Date, "yyyy,mm,dd") & ");TRUE"
crReport.ParameterFields(3) = "FrDate;date(" & Format(.FrDate, "yyyy,mm,dd") & ");TRUE"
crReport.ParameterFields(4) = "ThDate;date(" & Format(.ThDate, "yyyy,mm,dd") & ");TRUE"
Bill todd
Hi Bill,
Download sample code from the following link:[https://boc.sdn.sap.com/codesamples]
Hope this helps!!
Regards,
Shweta
Similar Messages
-
How to pass parameters from a dashboard or report to any OA Framework-based
In Metalink Note:276708.1, about Oracle E-Business Intelligence Minipack L (4.0.9).
Common Features for Dashboards and Reports section say:
You can now pass parameters from a dashboard or report to any OA Framework-based application page.
How to do pass?
Regards,
AroneNobody help me?
-
How can I pass parameters from one process flow to another process flow?
How can I pass parameters from one process flow to another process flow (sub process) in warehouse builder? let me know the steps I have to do in warehouse builder.
Thanks in advance,
KishanHi Kishan,
Please post this question to the Warehouse Builder forum:
Warehouse Builder
Thanks, Mark -
How can i pass parameters to every form sucessively or repeatedly
How can i pass parameters to every form sucessively or repeatedly
Eg: I have username which is specified in first form
I want to display and use the username in each and every form after that form
please tell me how to do
i have one solution
i.e., Normal way to pass parameters from one form to another!
Is any procedure to pass paramters to all form at a time???excellent ...
thanks for adding up to my post ..
You can make use of parameters
Every forms shud have same parameter name and u pass on the values of these
Its one of the best ways -
Passing Parameters to anf from Sub-Reports
I have a report with two subreports in it, and I want to be able to tell the main report about the data in the sub-report so I can supress a detail section if the sub-report contains certain data. How do I pass a parameter from the sub-report to the main report?
Passing a variable from subreport to main report and vice versa
Declare a variable as shared in the subreport.
Shared numberVar NoOfrecords;
Assign some value to this variable,
Shared numberVar NoOfrecords :=Count()
Then in the main report, create a formula and in that formula again declare the vairable and use it as u like
//Declaration
Shared numberVar NoOfrecords;
//If you want to supress a section based on this count,then
if NoOfrecords = 0 then TRUE
click ok..
NOTE:
For the shared variable to return the correct value in the main report, you must place @MainFormula in a main report section that is beneath the section containing the subreport. This ensures Crystal Reports evaluates the @SubFormula before @MainFormula.
Very Important : Dont just create the formula, u have to place this forula somewhere as mentioned above. If u dont want to show this formula value,then hide it by changing its colour to white or by some other way. If u dont place the formula in the report,it wont work.
and same thing applies when passing values from main report to subreport.
In this case define the @MainFormula first and then @SubFormula.
I have used this successfully in my report. -
How I can pass parameters by POST method?
How I can pass parameters by POST method?
I use URL Template iView. I checked Requested Method - POST, but when I started the iView the program says:"It's a GET method!"
I use httpServletRequest.getMethod()in the program.
Environment: EP6 SP2
Thank's!Hi Kremena,
the OSS stands for "Online Service System" - service.sap.com - messages or directly: service.sap.com/message.
Hope it helps
Detlev -
How can I pass parameters directly to report in web envirnment
Hi
I want to call reports by skipping the parameter form in web enviroment.
for example I m caling a report inv.rep with parameter userid=1 what I want is
when user clicks the button(on oracle forms) it will get that report sort on userid=1 without displaying the param form to user.
I m using web.show for this purpose with parametr form every thing is working fine but I want to hide tht paramform and process the parameter setinng in bacground.
CODE Tht I m Using
v_url := 'http://appserver/dev60cgi/rwcgi60?rep+inv.rep';
web.show_document:=(v_url)
this shos the param form with user id
how can I skip it and set user id directly
Any Tip or suggestions ??
Thnx in AdvanceHi all
I'm having the same problem! Im defining a key in "cgicmd.dat" like
my_key : userid=user/pass@db
and Im calling the report using a url like
http://appserver.com/ows-bin/rwcgi60.exe?my_key&report=name.rdf&destype=cache&desformat=pdf&server=Rep60_SERVER
and what I get? Error: "Oracle Reports Server CGI - Reports Server name is not specified."
Ive changed my_key to
my_key : userid=user/pass@db report=name.rdf destype=cache desformat=pdf server=Rep60_SERVER
and works fine ...
Problem:
My problem is that I need to pass more parameters in the url to run the report. Parameters like "p_dept=10"
http://appserver.com/ows-bin/rwcgi60.exe?my_key&p1=something&p2=whatever
Report, however isnt receiving the parameter p1 and p2.
And using the complete url
http://appserver.com/ows-bin/rwcgi60.exe?userid=user/pass@db&report=name.rdf&destype=cache&desformat=pdf&server=Rep60_SERVER&p1=something&p2=whatever
works ...
anyone knows a way to turn this question?
I only need to get the user/pass@db out from the url ....
thanks in advance
Bruno Rabino
Hi Sami
I guess something wrong in your CGICMD.DAT entry
Can you cut and paste what exactly you have in that file for the mapkey
It has to be something like
mapkey: userid=scott/tiger@db
Thanks
Oracle Reports Team -
Passing Parameters in a URL to Reports - Need Help Urgently !
I have created Image Maps (content area) where I pass parameters in the URL as follows :
<area shape="rect" coords="335,66,528,83" href="http://townland:7778/pls/portal30/PORTAL30.RPT_SUMKWH.show_parms?meter=PMS 11BBA01">
<area shape="rect" coords="400,55,600,90" href="http://townland:7778/pls/portal30/PORTAL30.RPT_SUMKWH.show_parms?meter=PMS 11BBA02">
I am having a problem passing this meter parameter to the report [I am generating this report (RPT_SUMKWH) using SQL Query] :
I have tried the following :
1) I tried referencing this parameter in the 'Additional PL/SQL code, before displaying page' section of my Report as :- wwpro_api_parameters.get_value('meter', 'RPT_SUMKWH')
but this did not work (this made the package body invalid).
2) I then tried using the meter parameter as a bind variable in my SELECT Query of the Report, then, in the 'Customisation Form' section, I place :- wwpro_api_parameters.get_value('meter', 'RPT_SUMKWH') under Default Value, however, when I go back to my Image Map content area & ty to click on the URL, I get an error "Page does not display" .
How do I then pass this parameter to my report, where do I place the code to make the call for the parameter being passed from the Image Map URL in the content area??
AVDHi,
You will have to encode your parameter value. The problem is because of the spaces in the value. Whenever there any special
characters in the value it should be encoded.
example
select '<area shape="rect" coords="335,66,528,83" href="http://townland:7778/pls/portal30/PORTAL30.RPT_SUMKWH.show_parms?meter='||
<portal_schema>.wwutl_htf.url_encode('PMS 11BBA01')||'">pams</a>' url
from meters
The above is just an example. Please change the names to suit your requirements.
Thanks,
Sharmila -
Passing Parameters to Procedure based sub report thru JRC
Hi
I am using storedprocedure based main report with a subreport and i am trying to invoke these reports with JRC.
I am passing parameters to main report then it is asking parameters for subreport then i placed following statement by placing subreport name
param2.setReportName("detailed_aging_report_wk.rpt");
but after using this statement it is prompting for main report parameters.
How i can pass the same parameter values to both main and sub reports?
Thankyou.Here is a snippet code that demonstrates how to pass a parameter to a subreport, you can accommodate it and test it and see if you still have the same behaviour. What you need to do is to add the code to set the parameter of the main report.
<%
/* Applies to: XI
* Date Created: April 4, 2005
* Description: This sample demonstrates how to pass parameters to a report that
* contains a subreport using the Crystal Reports Java
* Reporting Component (JRC) SDK.
* Author: HP, CW
try {
//check to see if the report source already exists
Object reportSource = session.getAttribute("reportSource");
//if the report source has not been opened
if (reportSource == null)
//---------- Create a ReportClientDocument -------------
ReportClientDocument oReportClientDocument = new ReportClientDocument();
//---------- Set the path to the location of the report soruce -------------
//Open report.
oReportClientDocument.open("jrc_set_subreport_parameters/jrc_set_subreport_parameters.rpt", 0);
//Get the report source
reportSource = oReportClientDocument.getReportSource();
//Cache report source.
//This will be used by the viewer to display the desired report.
session.setAttribute("reportSource", reportSource);
//---------- Create the Parameter Field Objects -------------
//Create a Fields collection object to store the parameter fields in.
Fields oFields = new Fields();
//----------- Initialize the parameter fields ----------
//Set the name and value for each parameter field that is added.
//Values for parameter fields are represented by a ParameterFieldDiscreteValue
//or ParameterFieldRangeValue object.
//NOTE: Be sure to map the names of the parameters and their
//respective types against the correct type that the parameter
//field values was defined to accept in Crystal Reports.
//NUMBER VALUE PARAMETER.
Integer numberValue = new Integer("55");
//STRING VALUE PARAMETER.
String stringValue = "String parameter value.";
//BOOLEAN VALUE PARAMETER.
Boolean booleanValue = new Boolean("true");
//DATE VALUE PARAMETER.
Calendar calendar = Calendar.getInstance();
calendar.set(2004, 1, 17);
Date dateParamVal = calendar.getTime();
//DATE-TIME VALUE PARAMETER.
Calendar calendar2 = Calendar.getInstance();
calendar2.set(2002, 5, 12, 8, 23, 15);
Date dateTimeParamVal = calendar2.getTime();
//CURRENCY VALUE PARAMETER.
Double currParamVal = new Double(555.99);
//TIME VALUE PARAMETER.
Calendar calendar3 = Calendar.getInstance();
calendar3.set(2002, 5, 12, 13, 44, 59);
Date timeParamVal = calendar3.getTime();
//Set all of the parameter values using the utility function.
//Since we are passing parameters to the subreport, it is here that we set the
//subreport name; if you are not passing a parameters to a subreport, the
//report name will be an empty string
setDiscreteParameterValue(oFields, "NumberParam", "SubreportA", numberValue);
setDiscreteParameterValue(oFields, "StringParam", "SubreportA", stringValue);
setDiscreteParameterValue(oFields, "BooleanParam", "SubreportA", booleanValue);
setDiscreteParameterValue(oFields, "DateParam", "SubreportA", dateParamVal);
setDiscreteParameterValue(oFields, "DateTimeParam", "SubreportA", dateTimeParamVal);
setDiscreteParameterValue(oFields, "CurrencyParam", "SubreportA", currParamVal);
setDiscreteParameterValue(oFields, "TimeParam", "SubreportA", timeParamVal);
//Push Fields collection into session so it can be retrieved by the viewer and set
//at view time.
session.setAttribute("parameterFields", oFields);
//Redirect to the viewer page to render the report
response.sendRedirect("CrystalReportViewer.jsp");
catch(ReportSDKException sdkEx) {
out.println(sdkEx);
%>
<%!
* Utility function to set values for the discrete parameters in the report. The report parameter value is set
* and added to the Fields collection, which can then be passed to the viewer so that the user is not prompted
* for parameter values.
private void setDiscreteParameterValue(Fields oFields, String paramName, String reportName, Object value) {
//Create a ParameterField object for each field that you wish to set.
ParameterField oParameterField = new ParameterField();
//You must set the report name.
//Set the report name to an empty string if your report does not contain a
//subreport; otherwise, the report name will be the name of the subreport
oParameterField.setReportName(reportName);
//Create a Values object and a ParameterFieldDiscreteValue object for each
//object for each parameter field you wish to set.
//If a ranged value is being set, a ParameterFieldRangeValue object should
//be used instead of the discrete value object.
Values oValues = new Values();
ParameterFieldDiscreteValue oParameterFieldDiscreteValue = new ParameterFieldDiscreteValue();
//Set the name of the parameter. This must match the name of the parameter as defined in the
//report.
oParameterField.setName(paramName);
oParameterFieldDiscreteValue.setValue(value);
//Add the parameter field values to the Values collection object.
oValues.add(oParameterFieldDiscreteValue);
//Set the current Values collection for each parameter field.
oParameterField.setCurrentValues(oValues);
//Add parameter field to the Fields collection. This object is then passed to the
//viewer as the collection of parameter fields values set.
oFields.add(oParameterField);
%>
Cheers -
I have 4 dynamic pages, a user enters in variables on first page. At the next 3 dynamic pages I send the user to I have to display the items they entered on the first page in text items.
How do I pass these variables ????
thanks!
nullYou could use somethings like this:
<script>
function setupInventoryReportURL(anchor) {
var choice = document.getElementById('supplierCenter:inventory:categoryChooser');
if (choice) {
var url ='inventoryRPT.jsf' + '?currentCategoryName=' + choice.options[choice.selectedIndex].text;
anchor.href = url;
return true;
</script>
<h:form id="inventory">
<h:panelGrid columns="1" border="1" cellpadding="5">
<f:facet name="header">
<h:panelGrid columns="2" width="100%">
<h:outputText value="Inventory"/>
<h:outputLink value="inventoryRPT.jsf" onclick="setupInventoryReportURL(this)">
<h:outputText value="Report" styleClass="commandLink"/>
</h:outputLink>
</h:panelGrid>
</f:facet>
<h:panelGrid columns="2" width="100%">
<h:panelGroup>
<h:outputText value="Supply Category"/>
<h:selectOneMenu id="categoryChooser" value="#{inventory.categoryId}" onchange="submit()"
valueChangeListener="#{inventoryView.categoryChanged}" immediate="true">
<f:selectItems value="#{inventory.categories}"/>
</h:selectOneMenu>
..............................................Vladimir Perlov -
How do i pass parameters from j2me to jsp?plz help
hi everyone...
i m doing my final year project
can anyone plz tell me how to pass parameters like user name,password,etc.. from a j2me midlet to a jsp page running in tomcat server?
i tried passing parameters in http connection through url as:
String url="http://localhost:8080/example/test.jsp?name=abc";
i need this info urgently as i am not able to proceed with my project... plz help
any suggestions or references would be appreciated...
thank u...
regards,
RinziJHD
hi.
you have written in URL i sperfectly right but if this is also not complete one.
i.e url = "http://localhost:8080/dir/xxx.jsp?userName=jasmit&password=vala"
now when u establishing connection i.e
HttpConnection con = (HttpConnection) Connector.open(url,3);
this will work as an declaration but if u want to send that parameter for that you have to get response from the server and that time only original connection is going to establish i.e
when u r writting
int responseCode = con.getResponseCode();
if(reponseCode == 200)
then ur parameter were passed to jsp page.
in jsp page u have to get parameter using request class
String userName = request.getParameter("userName").toString();
String password = request.getParameter("password").toString();
i hope this might solve ur problem.
Regards,
Jasmit vala
[email protected] -
Passing parameters from BSP to BW report
How to pass parameters from a BSP application to BW in order to execute the BW report
In BW template
a different URL is generated for selection made in each input field.
I have 4 different URL's now.
and when I push the Execute button a URL is generated which looks incomplete and it does not show all the parameters( lot of things are happeninng inside like authorizatins, session handling etc).
The URLS are shown below
URL genarated when the query is executed in the browser:
http://coles33.co.lsil.com:1080/SAP/BW/BEX?variable_screen=X&template_id=0QUERY_TEMPLATE&INFOCUBE=ZAMOEMP1&QUERY=ZAIMREP1
After selecting Location:
http://coles33.co.lsil.com:1080/SAP/BW/BEX?SAP-LANGUAGE=E&PAGENO=1&CMD_ID=1&REQUEST_NO=0&VAR_VALUE_EXT_2=CA01&F4CMD=FINISHED
After selecting org:
http://coles33.co.lsil.com:1080/SAP/BW/BEX?SAP-LANGUAGE=E&PAGENO=1&CMD=PROCESS_VARIABLES&INDEX=3&VAR_VALUE_HELP_SET_LINE=3&REQUEST_NO=0&VAR_VALUE_HELP_SET_5=5
After pushing Insert:
http://coles33.co.lsil.com:1080/SAP/BW/BEX?SAP-LANGUAGE=E&PAGENO=1&CMD=PROCESS_VARIABLES&REQUEST_NO=0&CMD=PROCESS_VARIABLES&SUBCMD=VAR_NEW_LINES&VARID=WNTEST1%200001
After making second selection for org:
http://coles33.co.lsil.com:1080/SAP/BW/BEX?SAP-LANGUAGE=E&PAGENO=1&CMD=PROCESS_VARIABLES&INDEX=4&VAR_VALUE_HELP_SET_LINE=4&REQUEST_NO=0&VAR_VALUE_HELP_SET_15=15
After selecting FLSA:
http://coles33.co.lsil.com:1080/SAP/BW/BEX?SAP-LANGUAGE=E&PAGENO=1&CMD_ID=2&REQUEST_NO=0&VAR_VALUE_EXT_5=EX&F4CMD=FINISHED
after selecting date:
NO URL GENERATED
After pushing Execute:
http://coles33.co.lsil.com:1080/SAP/BW/BEX?SAP-LANGUAGE=E&PAGENO=1&CMD=PROCESS_VARIABLES&REQUEST_NO=0&CMD=PROCESS_VARIABLES&SUBCMD=VAR_SUBMIT&VARID=
I am not able to understand how to call this url from BSP page.( I also have multi-selection for location and org)
regards
Aditya -
How can I pass parameters from report to HTML page
Hi,
Does any one know how to pass value from Portal Report to other HTML page (asp for excample).
I build a Protal report, and I want jamp to "http://...viewDoc.asp?DocID=DocumentID" URL, by clicking on link, where "DocumentID" is parameter that to be pass from report.One way is to create a link based on that form and attach that
link with the report. Through links you can pass parameters -
How do i pass parameters to a web dynpro application ?
Hi all,
how do i best possible pass (serverspecific) parameters to a web dynpro application ?
i wrote a web dynpro application that, among other things, sends an email and stores files on a server directory. Therefor i need parameters like e.g. "mailhost" or "directory".
The way i chose is to make a *.properties file. But from my point of view there are some disadvantages.
1) When i deploy the WD App to a new server, i have to edit the properties file before. I don't know how to do that. Do i have to edit the *.properties file again, before i make a new ear-Archive with NWDS ?
2) When the properties a wrong or change for a deployed app, i have to restart the J2EE Engine. Thats not convenient for a production server.
Is there a better way ?
Thanks
Andreas
(And I promise to return and reward the answers)Hi Andreas,
You can't use something like portalapp.xml because this is not supported by webdynpro, but ... you can add this parameters at the end off the webdynpro address line. like http://<host>:<port>/webdynpro/dispatcher/local/<Webdynproproject>/<webdynproApplication>?host=yourhost
In your application you can get these variables:
String host = WDWebContextAdapter.getWebContextAdapter().getRequestParameter("host");
when you create a webdynpro iview you can specify the default value for the variables in the URL in the properties of the iview and i think you can personalize them later.
kind regards,
Joachim -
How to give Selection Parameters text in Standard SAP reports?
Hi,
I am enhancing one of the standard reports, J_3RF_TAX_EXECUTE_CHAIN. Added few parameters to selection screen.
But I am not able to give text to the selection parameters.
I checked with Modification overview, its not allowing me to put text to custom Selection screen parameters.
Regards
Mohinder Singh ChauhanHi Friends,
I had created a dynamic selection text for a select-option created using Implicit Enhancements.
The select-option field is for MARA-MTART and the dynamic text i had given in the code is "Material Type".
But my client wants it to refer to the data dictionary reference so that it will print the labels given there and especially in the logon language.
Generally it can be done by selecting the checkbox next to the select-option, available in the Text Elements/Selection Texts Screen of the ABAP Editor.
So how to check that box(i.e., how to refer the data dictionary reference) dynamically?
Maybe you are looking for
-
Photoshop elements 11 download
hi there, i have both licences photoshop 11 and 12 and need to reinstall 11, but i have not got version 11 as installation-file. at adobes website theres only the new one version 12. where can i get a setup file for 11. thanks for anybody helping!!!
-
I can't sync music to my iPhone 4s IOS 7
I can't sync music to my iPhone 4s < IOS 7 > This is my problem. https://www.youtube.com/watch?v=AJ2F3LK3lmE&feature=c4-overview&list=UUikw1odigv FEf-CedhANZCg
-
I am experiencing the following error message - Oxc0000022 as well - I have to open many of my programs as the administrator or I can't open them.
-
Custom Colors in Oracle Forms.
Hi, As we know we can create custom color in oracle forms and process to create is Creating Custom colors : a)Go to Tools->Preferences. In General Tab On the Color Mode drop-down, select Editable then exit Forms builder. b)Restart forms builder. c)Op
-
My yopung kids got a hold of my older nano 4G and somehow set a passcode. i now cannot open it and yhey don't know what the did. Is there a way to break the code so I can use it again? thanks