Passing variables to a report
Post Author: Swimmy
CA Forum: .NET
I have a simple application that asks for some information, performs a calculation, and reports the result. I do not need to attach to any database. How do I pass the variables over to a one page report to give the user a hard copy? Seems like it should be easy, I can't find any help.
Post Author: BenS
CA Forum: .NET
Step 1: Create a ParameterField in your report, set the DataType of the parameter and add values to the "Values" list section (if needed).Step 2: Set "Value Options" as neededStep 3: Click OKStep 4: In Visual Studio, Use The Following Code...
'**************************************' Initialize Variables'**************************************Dim objParamField As New CrystalDecisions.Shared.ParameterFieldDim objParamFields As New CrystalDecisions.Shared.ParameterFieldsDim objParameter As New CrystalDecisions.Shared.ParameterDiscreteValueDim objReport As New MyReport
'**************************************' 'Set Up Your Parameter Value(s)'**************************************objParamField.Name = "MyParameter"objParameter.Value = "MyParameterValue"objParamField.CurrentValues.Add(objParameter)objParamFields.Add(objParamField)
'**************************************' 'Pass Parameters To CrystalViewer'**************************************CRViewer.ParameterFieldInfo = objParamFields
'**************************************' ' Pass DataSet To Report' Perform Any Other Needed Operations' Display Report'**************************************
Hope this helps!
Similar Messages
-
Opendoc : to pass variable doesnt work
hy,
i want pass variable from one report to another
i use this formula :
"<a href='http://myserver:8080/businessobjects/enterprise115/desktoplaunch/opendoc/openDocument.jsp?sIDType=CUID&iDocID=Ad6ICMdlQV9ElilBHmITZpg&lsSpays=u201D[Pays]u201D&sRefresh=Y&sWindow=New'>detail</a>"
pays is a prompt
[pays] is my query object in a table
when i clic on detail i want open detail report with prompt pays=value line
it's doesnt work my prompt is nul
thank's
Edited by: PHILIPPE REMIS on Oct 20, 2009 5:34 PMit's ok now
-
I have a publisher 11g (v 11.1.1.7) report with a single parameter. The report is based on a data model not a subject area. I created a dashboard put a dashboard prompt and link to the report in separate section on the same page. The dashboard prompt sets a presentation variable named the same as the parameter in the report.
The problem was when I created the dashboard prompt, it forced me to select a subject area which I did (though did not want to) and then I created both a column and variable prompts. But clicking on the
report link completely ignored the value that I thought would be passed in the presentation variable to the report.
Side note : My report uses a pdf template for its layout where I have mapped the columns names from my data model to the form fields on the pdf form. I noticed that if I create a publisher report based on a subject area, then I do not have the choice to choose a PDF as a template type for my layout. (I only see BI Publisher Template as a choice).
I see some documentation online that suggest it could be done in 10g.
Thanks
M. JamalOk,
I just tried that and it still doesn't pass anything to the prompt.
I changed the prompt to an edit field and I made the following weblink but when i click the link from an account it doesn't put anything in the prompt and all data for all accounts is shown.
This is the URL maybe I messed something up...
https://secure-ausomx###.crmondemand.com/OnDemand/user/Dashboard?OMTHD=ShowDashboard&OMTGT=ReportIFrame&SelDashboardFrm.Dashboard Type=%2fshared%2fCompany_########_Shared_Folder%2f_portal%2f360+Report&Option=rfd&Action=Navigate&P0=1&P1=eq&P2=Account."Account Name"&P3=%%%Name%%%
thanks -
How to pass bind variable into oracle reports 6i - Parameter form
Hello All,
I want to pass bind variable into Oracle Reports 6I - Parameters.
I have tried out that but got the below error :-
rep-0781 : Bind variables are not allowed in the select statement
Kindly help me is there any option which allow me to pass bind variables into Oracle reports 6I.
Thanks
HARSH SHAHHi,
may be its not possible to use :P_PARAM1 in user parameter of oracle 6i reports
but u can full fill user requirement using oracle forms
create a form as like as report parameter window
then create parameter list and run report
PROCEDURE Run_Emp_Report IS
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');
Run_Product(REPORTS, 'empreport', SYNCHRONOUS, RUNTIME, FILESYSTEM, pl_id, NULL);
END;
thanks
mostafiz mitul
Dhaka Bangladesh -
Sequence pass/fail variable for csv report
I need to write a small CSV file with my sequence test results. The way I am considering doing this is to
save the information I need as the test progresses in local, file, or station global variables
make a report string using the values stored in these variables, and
write the string to a file via a LabVIEW VI.
Is this a reasonable way to do it? In which variable does the overall UUT pass/fail result get stored?
StephenBI recommend against doing it this way. What you want to do defeats the entire purpose of using TestStand in the first place.
If you are using a newer version of TestStand (2012 or newer) I would create a custom plugin to do exactly what you are doing.
There is a ton of information out there on plugins.
Here is an example on probably what you are trying to do:
http://zone.ni.com/reference/en-XX/help/370052N-01/tsexamples/infotopics/modelplugin/
Here are some more links that are important:
http://zone.ni.com/reference/en-XX/help/370052K-01/tsfundamentals/infotopics/pmpcreatingplugins/
http://zone.ni.com/reference/en-XX/help/370052M-01/tsfundamentals/infotopics/process_model_plugin_ar...
The advantage of using a plugin is that now all tests can utilize it as opposed to the report generation being specific to a single test.
Hope this helps,
jigg
CTA, CLA
teststandhelp.com
~Will work for kudos and/or BBQ~ -
Passing variables from Report to Form
Hi, I need pass a couple of variables from the REPORT to two fields in the FORM for save in a table. Somebody knows how do I do this?. Any suggestions?
Thanks a lot!
I think that this situation is different that pass variables from FORM to REPORT.You need to use a Link component to your Form that you then attach to one of the data columns in the Report. When you edit the link in the report, you can specify the fields to pass.
-
Issue with use of shared variables in Crystal Reports 2008 Offline Viewer
Hi,
I have a report that contains a number of sub-reports which include drill-down functionality. The report returns data relating to an individual team with the user being able to view top level summary information in each area from the parent report and then drill into the sub-reports to view see more detail. The data returned by the sub-reports is filtered, using sub-report links, based on the team code parameter value given by the user. This parameter field resides in the main report.
One of the values returned by the main report is the team name. This is passed to each sub-report using a shared variable and each sub-report displays this team name as part of a heading.
This all works fine in Crystal Reports 2008, but when a report, containing data, is opened using Crystal 2008 Offline Viewer there is a problem with the shared variable. The value is displayed correctly when the user initially drills into the sub-report. However, when the user begins to drill into grouped data within the sub-report the value passed to the sub-report using the shared variable disappears.
How can I ensure that, when a report is viewed using Crystal Offline Viewer 2008, the value within the shared variable is not lost when users drill into grouped data within sub-reports
Thanks
StuartPlease re-post if this is still an issue or purchase a case and have a dedicated support engineer work with you directly:
http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryID=11522300?resid=-Z5tUwoHAiwAAA8@NLgAAAAS&rests=1254701640551 -
Error when executing query without passing variable selection
Hi Gurus
I am getting an error while executing a query with out passing values for variables
When executing the query by passing the filter values report returns the data
When executing the query with out passing variable selections the error message is
Unknown error in SQL interface
Error reading the data of Info Provider ZCRM_O08
Error while reading data; navigation possible
System error in program SSAPLRS_EXCEPTION and form
RS_EXCEPTION_TO_MESSAGE
No Data Available
can any one please help me in resolving this
Thank youHi Srini
Thanks for your quick response
When i am executing the query with selection it is returning the data
giving error when executing with out passing the selection
is there any other cause for this problem
like any particular info object causes this sort of problem
Thank you -
Passing values from main report to sub-reports
- How do we pass values from main report to sub-report?
Look at this link which shows how to pass values from a subreport to a main report.
http://www.datamanagementgroup.com/resources/trainerstalk/trainerstalk_howto_share_subreport_data_with_main_report.asp
You can use the same method to pass values from main report to a subreport.
1) Create a formula @mainFormula in the main report, as given in item 1 of link.
2) Place this formulla in a suppressed report footer section above the target subreport.
3) In the subreport, create a formula @subFormula that declares the same variable name, as given in item 3 of link.
4) Place @subFormula column in the subreport where you want to display it. -
The function javascript:doSubmit not passing variables between pages
Hi,
I have an report that has a link to another page, and I'm trying to pass 2 variables. If I use a target URL as such the variables do not get passed, but if I use a page target and explicitly add the item name and values it works fine. Here is the call I'm using to javascript:doSubmit:
javascript:doSubmit('f?p=&APP_ID.:32:&SESSION.::&DEBUG.:32, CIR:P32_PROJ_ID,P32_DID:#AWARD_NUMBER#,#ID_PROVIDED#');
Does anyone have any insights?
Thanks,
JoeYou can't use doSubmit to pass variables; it will only submit your page with the request you passed in. All normal page processing and branching will be followed.. Why are you using doSubmit? Just put the URL in the URL field.
f?p=&APP_ID.:32:&SESSION.::&DEBUG.:32, CIR:P32_PROJ_ID,P32_DID:#AWARD_NUMBER#,#ID_PROVIDED# -
Pass query to the report through form
Hello everybody...
I m using forms and reports 6i.
I create query through form depends on user selection.
Means user select specified columns from specific table. And finally i create complete query.
Now i wanna pass that query to report builder and wants to generate automatic report depends on that query.
Can anybody have idea how to do this?
How to pass query from form and generate report.
If any1 knows then please help meYou should pass all columns but with separator character i.e.:
supl_cd||';'|| supl_name ||';' city ||';'|| add1 ||';'|| add2 ||';'|| pincode ||';'|| country my_column
You should also pass column names if you want and get them back using the same procedure.
Procedure for retrieving should use instr,loop and srw.do_sql, if you don't know what is SRW built in package, then take a look in report's help. That's a pity that there is nothing similar in forms. You can use dynamic select to pass values exactly to the report's variables:
for i in 1..10 loop
srw.do_sql('select '||i||' into :cp_'||i||' from dual');
end loop;
Jakub Flejmer -
Passing parameters to QBE Reports?
I currently have an SQL Report that I filter dynamically with parameters from the page. I would like to be able to use this same functionality with a QBE Report that the client can more easily specify.
Is it possible to pass parameters to QBE Reports? If so, how?
Thanks,
MarkAs Chetan has correctly suggested, it will be better to use a table to store
the emp no and their pin against their login session ids.
You can have a table as :-
create table emp_pin (
session_id integer,
emp_no integer,
emp_pin integer,
constraint emp_pin_fk1 foreign key (session_id) references <portal_schema>.wwctx_sso_session$(id) on delete cascade
When a user logs into portal, a session_id is created and this session_id is
deleted when the user logs out. The delete cascade rule will clean up your
table entry when the user logs out.
You can get this session_id using the <portal_schema>.wwctx_api.get_sessionid function.
Now you need to create 2 functions that would return the emp_no and emp_pin.
You can then use these functions in the sql query of your reports. This way you
need not use bind variables at all.
Example:-
create or replace function get_empno(p_sess_id in integer)
return varchar2
is
l_empno varchar2(2000);
begin
select emp_no
into l_empno
where session_id = p_sess_id;
return l_empno;
end;
create or replace function get_emp_pin(p_sess_id in integer)
return varchar2
is
l_emp_pin varchar2(2000);
begin
select emp_pin
into l_emp_pin
where session_id = p_sess_id;
return l_emp_pin;
end;
Now, these functions can be used in SQL query of your reports as :-
select <col1>, <col2>, <col3>
from <table>
where empno = get_empno(<portal_schema>.wwctx_api.get_sessionid)
and emp_pin = get_emp_pin(<portal_schema>.wwctx_api.get_sessionid)
and ....
In a form, you can use these functions to set the default values of the empno,
emp_pin fields. -
Help Needed in passing parameter to cryst report
Hello everyone, I am trying to create a report for a single record and as such am trying to pass parameters to a crystal report but I am not sure exactly how to do this. This is my own method that I am employeeing. I do not want to create a data table and put all the info I need in there and then base a report off of it. I do not want to deal with loops and arrays right now. I just want to pass for example parameter JuvenileID = 1 to my crystal report, then create a command under the database expert and set the parameter for my command to the parameter I passed my crystal report. How would I go about in doing this? I am using VS 2010 C#. This is a windows application. I have a dataentry form that is already populated with the info needed for the report. I just need to pass all the controls.text values to the report and populate it that way.
I'm not sure if I fully understand the issue, but since you have all the data you need in a data entry form that is already populated, why don't you simple create an ADO .NET Dataset and pass that to the report? Much easier to implement, faster execution with the small amount of data you have and less code.
Dataset sample app is here:
https://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsfor.NETSDK+Samples
More info on datasets is here:
[1511438 - How to use datasets to pass data to crystal reports|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333533313331333433333338%7D.do].
- Ludek -
Can I access Infoset variable from Crystal Reports
Hi,
In order to connect Crystal Reports 2008 to the SAP environment I have the Integration kit.
I have learnt that Crystal also offers InfoSet driver to connect to SAP.
If I need to access SAP BI- Infoset variables inside Crystal Reports is it possible to do that. If no, then do I need to have the filter using the variable value instead of the fixed filter value?
Please suggest.
Thanks,
Amogh.Hi Amogh,
the InfoSet connectivity that Crystal Reports offers as a direct Infoset connectivity is towards the classic InfoSets from ERP.
see here:
/people/ingo.hilgefort/blog/2008/02/07/businessobjects-and-sap-part-i
/people/ingo.hilgefort/blog/2008/03/23/businessobjects-and-sap-part-4
In case you want to connect to an InfoSet in a BW system you would put a BW query on top of the InfoSet and then use the BW Query in Crystal Reports.
see here:
/people/ingo.hilgefort/blog/2008/02/19/businessobjects-and-sap-part-2
Ingo -
Query Stripping not working properly when using variable in the report
We have issue with WEBI document that have query stripping enable.
Once the query stripping enabled there is no data return in the report.
We have investigate on the problem, the query stripping function are notable to retrieve objects that indirectly used in the report
as we have
many variable in the reports.
Ex.
Var1 = object1 + object2
Var2 = Object3 + Object4
Var3 = Var1 + Var2
Var4 = Object1 + Object2 + Object3 + Object4
If we use only Var3 in the report, the object1,2,3,and 4 will not be
retrieve.
But if we are using Var4 in the report, the object1,2,3,and 4 will be
retrieve properly.
Please let me know is it a by-design behavior, if yes please share points on itHi Amit,
Thank you for response, however i already had alook on that VIdeo and it tells us about the basic enabling of query stripping.
But my question is when we have a Variable in a report which is dependent on the other two variables it gives me #error so is it by design or not.
Regards,
Abhinav
Maybe you are looking for
-
Where can I get a case specifically for my MacBook Pro with Retina Display?
I really want to get a case/sleeve that really fits my MacBook Pro with Retina Display; however, everywhere I look only has cases for the regular 15" MacBook Pro. I want something that has a tight fit on my Retina. Any ideas?
-
FAQ:一些关于Debug的基本知识(7)
这次我们介绍user exit的使用方法. <什么是user exit> 简单的说,就是SAP在系统中为客户加入自己的程序来影响标准程序运行而准备的接口. A function exit provides the customer with the possibility to add own functionality to the system without modifying the standard program. The developers
-
Navigating from APEX to Original App
Hi, We have integrated APEX with Oracle E-Business Suite. When we click on APEX URL we are able to navigate from Oracle E-Business Suite to APEX. But I need following solution. What steps I need to follow if I want to come back from APEX to Oracle E-
-
Sub catalogs not displaying products
Hi I have some sub catalogs here that are not displaying products. Right now they have the same products as their parent catalog. The parent catalogs are display the products ok. Not really sure how to trouble shoot this as it's the same layouts file
-
data : DMBTR(12) TYPE P DECIMALS 3, dmbtr = 300.000- How to pad this field with zeros in front of it. Please help me in this regard Thanks, Lakshmi.