How to pass values to be displayed on the report?

I have an ASP.Net page that has values from the user that needs to be displayed in the page header of the report. Those values need to be passed to the report.
I am using Crystal Reports 2011.  The code behind for ASP.Net page is written in VB.Net.
I had thought of using Parameter fields in the report and using the SetParameterValue method of ReportDocument but I am not familiar with using Parameter fields.
How to set up the report to do this?
Sincerely,
Keith Jackson

Hi Keith
DJ has some very good suggestions, but the first thing we want to do is to make sure the report works in the designer as you want it to. Reading this thread, I'm a bit unsure if the report does actually work in the designer - can you please comment on that?
If it does, I like to go from simple as far as coding is concerned. In this case, that would mean not worrying about the parameters or logon and let the report engine do the heavy lifting for us:
Create a new project. Throw a CR viewer on a form and add one line of code in page load:
CrystalReportViewer1.ReportSource = <path to the report>
The engine will prompt for the db logon as well as the parameters. Fill those out. The report should then display on the screen.
From here we can get fancy and add DB logon code as well as the parameter code.
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow us on Twitter

Similar Messages

  • How to pass values in a coloumn in a report to another report?

    Hi all,
    I have two reports , with one coloumn same in both reports. It is like :
    ProcessName, DataA, DataB , DataC and ProcessName, Data X, Data Y, DataC, Difference.
    DataC coloumn is same in both reports and last coloumn in Report 2 is "Difference".
    "Difference" is difference of dataC coloumn in Report 1 With dataC in Report 2.
    Both reports will be arranged side by side , left and right.
    There is a date prompt above both the reports.
    I want that on selecting a value in prompt and clicking on 'GO',
    Both reports should refresh but "Difference" coloumn should contain difference of DataC coloumn in both reports.
    Please help me with this Problem.
    Thanks in advance....
    Regards,
    Apurv

    Hi this is the Oracle Designer forum. You would be better off asking the question over at the SQL/PL/SQL place
    PL/SQL

  • Plan values not being displayed in the report ..

    Hi All,
    I have a query on query.. .
    which displays actual and plan values , but the report is not showing the plan values
    tell me how to do this
    Sruthi

    Sruthi,
    Basically how do you store the data in the transaction cube's ?
    How does the data differs b/w Plan and actual for the same KF ?
    It stores depending on the Version...
    Restrict the KF to a perticular version ...
    Then you can get the desired...
    Check the LISTCUBE  with different versions..
    Cheer's
    HVR.

  • How to pass values to Oracle store procedure in Crystal Report

    Hi all,
    I am newbie on passing values to stored procedure parameters. I created a Crystal Report using the Crystal Report wiward with PULL method and data come from Oracle stored procedure. In an ASP.NET page, I have stored two values in Session and need to pass them as input parameters to Oracle stored procedure to print the report. In Crystal reports 2010 once you connect to a stored-procedure as data source, it automatically creates the parameter fields with Crytal Report Viewer. Please show me how I pass values to store procedure at runtime automatically.
            'Set the parametter value
            myReport.SetParameterValue("@P_COURSE", "CoursetNo")
            myReport.SetParameterValue("@P_CLASS", "ClassNo")
        End Sub
    I tried to apply above codes from Brian Bischof book but display the error from the following lines:
            myReport.SetParameterValue("@P_COURSE", "CoursetNo")
            myReport.SetParameterValue("@P_CLASS", "ClassNo")
    I also enclosed my code. Any experts, please let me know anything wrongs on my code . I tried several methods that searching via google, but did not solve my issues. Thanks.
    Edited by: avt2K7 on Mar 15, 2011 7:02 AM

    Hi,
    Thank you for your response. Here are the detailed code and error as following:
    Please show what I am missing in my below VB.NET codes:
    ===========================================================================================
        Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            LogonToTables("username", "password", "servername", "")
        End Sub
        Private Sub LogonToTables(ByVal myUserId As String, ByVal myPassword As String, ByVal myServerName As String, ByVal myDataBaseName As String)
            Dim Course, Class As String
            Course = Session.Item("CourseNumber"))
            Class = Session.Item("ClassNumber"))
            Dim myReport As New CrystalDecisions.CrystalReports.Engine.ReportDocument
            myReport.Load(Server.MapPath("CrystalReport1.rpt"))
            Dim myTableLogonInfo As CrystalDecisions.Shared.TableLogOnInfo
            'Set the database properties and security credentials
            Dim myConnectionInfo As New CrystalDecisions.Shared.ConnectionInfo
            myConnectionInfo.ServerName = "servername"
            myConnectionInfo.DatabaseName = ""
            myConnectionInfo.UserID = "username"
            myConnectionInfo.Password = "password"
            'Apply the ConnectionInfo to the report tables
            Dim myTables = myReport.Database.Tables
            For Each myTable As CrystalDecisions.CrystalReports.Engine.Table In myTables
                myTableLogonInfo = myTable.LogOnInfo
                myTableLogonInfo.ConnectionInfo = myConnectionInfo
                myTable.ApplyLogOnInfo(myTableLogonInfo)
            Next
            'Set the parametter value to Crystal Report parameter named P_COURSE and P_CLASS
            myReport.SetParameterValue("@P_COURSE", "Course")
            myReport.SetParameterValue("@P_CLASS", "Class")
        End Sub
    =================================================================================
    I put a break point to debug but display the error at the following lines:
            myReport.SetParameterValue("@P_COURSE", "Course")
            myReport.SetParameterValue("@P_CLASS", "Class")
    Eventhough, if I set a specific value to Course=1000 and Class = math and still receive the error:
    Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))
    I tried several sources from Google search but it is not working. I really appreciate any detailed code either in C# or VB.NET to solve my issues. Thanks in advance.

  • How to pass value to select-option parameter using SET PARAMETER Command

    Hi,
        Am passing values to selection-screen fields in report RV13A004 ( used in VK11, VK12 and VK13). using below statement but material number is select-option in this report. am able to pass  MATERIAL FROM using SET PARAMETER ID, can i know how to pass values MATERIAL TO range in select-options fields using SET PARAMETER Command ??
    Passing values to parameter id
    set parameter id 'VKS' field kschl.
    set parameter id 'VKO' field vkorg.
    set parameter id 'VTW' field vtweg.
    set parameter id 'KDA' field erdat.
    set parameter id 'MAT' field matnr_from.
    Change condition price.
    call transaction 'VK12' and skip first screen.
    Thanks in advance.
    Regards,
    Balamurugan.

    Hi,
    instead of using set parameters and dden call transaction use this..........
    submit RV13A004  WITH SELECTION-TABLE rspar
    Effect
    If you specify this addition, parameters and selection criteria on the selection screen are supplied from an internal table rspar. You must specify an internal table with the row type RSPARAMS for rspar. The structured data type RSPARAMS is defined in the ABAP Dictionary and has the following components, all of which are data type CHAR:
    SELNAME (length 8),
    KIND (length 1),
    SIGN (length 1),
    OPTION (length 2),
    LOW (length 45),
    HIGH (length 45).
    To supply parameters and selection criteria for the selection screen with specific values, the lines in the internal table rspar must contain the following values:
    SELNAME must contain the name of a parameter or selection criterion for the selection screen in block capitals
    KIND must contain the type of selection screen component (P for parameters, S for selection criteria)
    SIGN, OPTION, LOW, and HIGH must contain the values specified for the selection table columns that have the same names as the selection criteria; in the case of parameters, the value must be specified in LOW and all other components are ignored.
    If the name of a selection criterion is repeated in rspar, this defines a selection table containing several lines and passes it on to the selection criterion. If parameter names occur several times, the last value is passed on to the parameter.
    The contents of the parameters or selection tables for the current program can be entered in the table by the function module RS_REFRESH_FROM_SELECTOPTIONS.
    Notes
    In contrast to selection tables, the data types of the components LOW and HIGH in table rspar are always of type CHAR and are converted to the type of the parameter or selection criterion during transfer, if necessary.
    When entering values, you must ensure that these are entered in the internal format of the ABAP values, and not in the output format of the screen display.
    Cheers
    Will.

  • Default method - how to pass value to method container?

    Hello,
    I am dealing with a hyperlink in 'Objects and Attachements' section of the workitem.When i click on the link, the default method of the business object gets called automatically.
    My question is: How to pass values to the default method (i.e. method container) as i don't invoke the method in my workflow explicitly?  The method gets called when we click on the hyperlink.
    Regards,
    Monica.

    Hello Monica,
    a default method doesn't require parameters (and cannot make use of them), as they are designed to be called from various situation, such as the view from a workflow container, the display button within a workitem or the attachment list. So this is part of the system design.
    To make an object dependent of workitem values I usually follow two different design patterns:
    <b>1) Using a flowitem/workitem instance with a special default method</b>
    - Create a subobject from type WORKITEM (if I'm going to use values from the current workflow instance) or subobject from type WORKINGWI (if I'm going to use values from the current dialog workitem).
    - Do not make a general substitution for this new object type
    - If using a ZWORKITEM, create an instance of this object type before the dialog step and then pass this object to the dialog workitem
    - If using ZWORKINGWI, assign the object instance during the data flow to the step.
    - In the properties of the object choose (any one) default method
    - Within the coding you have the reference to the workitem/flowitem as object-key-... and you can further use functions/methods to read the workitem/flowitem container and do whatever has to be done
    <b>2) Retrieving values from the current workitem on-the-fly</b>
    Within the coding of the default method call the function module SWO_QUERY_REQUESTER that returns the instance/id of the current workitem-in-work (with is also set when using the hyperlink from a workitem). If the list is empty, there's no active workitem, otherwise use functions/methods to read the workitem container.
    --> edit: Solution is not release safe, is it aint working with SAP R/3 Enterprise and higher
    Best regards,
       Florin
    Message was edited by:
            Florin Wach

  • How to passing value into Captivate from html?

    How to passing value into Captivate from html?
    Or
    How to communicate between objects in one slides?

    Hi czhao0378 and welcome to the forums!
    Captivate does not natively allow you to communicate your own
    data, either internally or externally. The only way to make this
    happen is to create your own functionality, either via custom-built
    Flash objects or JavaScript code executed in the browser or a
    combination of both.
    The only example I've seen of any "data passing" inside
    Captivate is a custom text input/output solution that was posted on
    the Captivate Developer Exchange:
    http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&loc=en_us&extid=1253 021
    This solution consists of an input box that takes information
    from the user on one slide and a second box that displays that
    information on another slide. The functionality was built in Flash
    and is embedded in Captivate as a Flash "animation". Unfortunately,
    since this is a custom functionality, the information is not
    included in the user completion results Captivate can pass to a
    Learning Management System.
    Since the solution mentioned above relies on a Flash
    Actionscript variable to hold the information that is displayed,
    you can also pass the information from HTML to Captivate using the
    "SetVariable" command in JavaScript. This would at least allow you
    to display your own HTML-based data inside Captivate.
    Beyond that, I'm not aware of any other way to gather and
    pass data in Captivate.

  • How to pass values between views in FPM - GAF

    Hi Experts ,
    i have a doubt in FPM how to pass values between views .
    For Example:  i am having 2 views -  1 ) overview , 2 ) edit  using  the GAF
    in 1st view (overview ) i have a table displaying the employee details , i will select a single employee from that table for editing .
    how to pass the selected employee details to the 2 nd view (edit ) .
    Thanks & regards
    chinnaiya P

    Hi chinnaiya pandiyan,
    Please follow below steps:
    1. To achieve this u need to create two context nodes in the component controller.
    2. Say one is EMPLOYEE_DATA and other is SELECTED_DATA.
    3. Set the Cardinality of EMPLOYEE_DATA to 0..n and SELECTED_DATA to 1..1.
    4. Add same attributes to both nodes. (probably all those fields that are required in table and/or in edit view.
    5. Map both these nodes to OVERVIEW view.
    6. Map only SELECTED_DATA node to EDIT view.
    7. Create table in OVERVIEW view based on EMPLOYEE_DATA node.
    8. Create edit form in EDIT view based on SELECTED_DATA node.
    9. While navigating from OVERVIEW view to EDIT view, read the selected element of EMPLOYEE_DATA node and copy it to an element of SELECTED_DATA node. This should be written in PROCESS_EVENT method of component controller inherited from FPM component.
    10. Now u got the selected data in SELECTED_DATA node which will be displayed in EDIT view.
    Regards,
    Vikrant

  • How to pass values of the prompt through Action Link - URL in 11g

    Hi All,
    I am in OBIEE 11g v6.
    Let's say, I have two dashbaord pages P1 and P2.
    P1 page contains
    1. Prompt PR1 - containing a single column EmpName
    2. Report R1
    P2 page contains
    1. Prompt PR2 - containing a single column EmpName (same column as in PR1)
    2. Report R2
    Requirement :
    Let's say a user select a value = David from the EmpName column in prompt PR1. In the Report R1, on one the measure columns 'Sales', I am using an action link - Navigate to URL ( I can't use Navigate to BI Content for some reasons). In the URL, I am giving the URL to page P2. Can I pass the selected value (which is David) to the EmpName column of the Prompt PR2 of Page P2 so that Report R2 is automatically limited by David when I land on that page through the URL?
    Few things to consider are, I can't use EmpName column in my report R1 on page P1, I just want to pass the value of a common column from one prompt on Page1 to another prompt on Page2. Is that possible. Can anybody please help?
    Thanks,
    Ronny

    Hmm can you give a try one more time with
    Add EmpName name and hide it on report R1 on page P1
    and set EmpName as Is Prompted on report R2 on page P2 and with my earlier steps should work.
    Other option is read this doc once that helps you how to pass value thru url.
    http://docs.oracle.com/cd/E21043_01/bi.1111/e16364/apiwebintegrate.htm#z1005224
    You need to have a EmpName as Is Prompted on report R2 on page P2
    If helps pls mark

  • How to pass values at runtime in JDBC - XI - File scenario

    Hi friends,
    In my scenario, data is coming from R/3 and i need to filter records from oracle database based on this data. There are 4 database tables that need to be queried using 2 select statements. The resultset after the execution of query will be mapped to the target flat file structure.
    here are my queries:
    1) Can I avoid BPM as data needs to be collected from the two database calls which involves two sender JDBC adapter instances with only one target structure?
    2) Can I use stored procedure in this scenario? If yes, than how to pass values to stored procedure at runtime via sender JDBC adapter.
    Thanks and regards,
    Nitin aggarwal.

    Hi Nitin,
    "..So i want to know if i can write multiple select statements in the stored procedure.."
    Read the below line that is mentioned in the SAP help documentation fro Sender JDBC adapter:-
    <i>Specify an SQL EXECUTE statement to execute a stored procedure, which contains exactly one SELECT statement.</i>
    I dont think it can be achieved...but there must be some workaround for this. You can probably use a join statement.
    Read this, again from the documentation:-
    <i>The expression must correspond to the SQL variant supported by the relevant JDBC driver. It can also contain table JOINs.</i>
    Regards,
    Sushumna

  • How to pass values one by one from Multiline container in workflows

    Hi,
    I have used a structure in my workflow as multiline container.
    I want to pass values 1 by 1 to the workflow but not all the three values..so how do i pass the values 1 by 1 rather all at a time..
    kindly suggest me
    Thanks,
    Shanky

    Hi,
    Create a new container with type I and set the initial value as 1.  EX : Index.
    Pass your Multi-line container and this index container to a new method. Get the multi line container data's into an internal table
    and read the data based on the index and append the data's to a new multiline container.
    Second time increment the index container by 1. So now the value of index container will be 2.
    Pass the multiline container value and index to method. now it will read the second record from the internal table.
    Call the method using the loop step type.
    Thanks,
    Viji.

  • How to pass values to select options of custom transactions?

    I have to call custom transaction-ZMM_POST  from my custom report.
    I have to pass values to select options(Not to parameters) of ZMM_POST  from my report only.
    Please tell me how to pass values to select options of custom transactions?

    Have you tried this?
    DATA: T_RSPARAMS TYPE STANDARD TABLE OF RSPARAMS WITH HEADER LINE.
    T_RSPARAMS-SELNAME = "S_BUKRS".
    T_RSPARAMS-KIND = "S".
    T_RSPARAMS-SIGN = "I".
    T_RSPARAMS-OPTION = "BT".
    T_RSPARAMS-LOW = "100".
    T_RSPARAMS-HIGH = "300"
    APPEND T_RSPARAMS.
    SUBMIT Z_DUMMY WITH SELECTION-TABLE  T_RSPARAMS.
    Greetings,
    Blag.

  • How to pass value from jsp to java bean

    I have huge problem . How to pass value from jsp value to java bean.Please replay me soon

    Use the <jsp:setProperty> tag. There are several ways to use it. The one you probably want is:
    <jsp:setProperty name="bean_name"  property="property_name"  value="the_value_you_want_to_set"/>

  • How to pass value between two forms.

    Hi all,
    how to pass value between two forms(using :parameter),...
    Thanks
    Rajesh

    To use parameters, create a parameterlist with the named parameters
    DECLARE
      pl_id PARAMLIST;
      pl_name VARCHAR2(10) := 'tempdata';
    BEGIN
      pl_id := Get_Parameter_List(pl_name);
      IF not Id_Null(pl_id) THEN
        DESTROY_PARAMETER_LIST(pl_id);
      END IF;
      pl_id := Create_Parameter_List(pl_name);
      ADD_PARAMETER (pl_id,'MYPARAMETER',TEXT_PARAMETER,:BLOCK.VALUE);      
      CALL_FORM('MYNEWFORM', NO_HIDE, DO_REPLACE, NO_QUERY_ONLY, pl_id);
    END;In the new form you can then just access the parameters via :PARAMETER.MYPARAMETER;
    An alternative is the usage of globals:
    :GLOBAL.MYPARAM:=:BLOCK.VALUE;
    -- call the emp-form
    CALL_FORM('MYNEWFORM', NO_HIDE, DO_REPLACE);and in the new form use:
    DEFAULT_VALUE(NULL, 'GLOBAL.MYPARAM');
    IF :GLOBAL.MYPARAM IS NOT NULL THEN
    ...The advantage of gloabls is that they can also return values back to the calling form, which is not possible using parameters

  • How to pass values between pages?

    Hi
    Anybody know how you pass values like ids between pages using buttons?
    Cheers
    dan
    Message was edited by:
    user551484

    Hi
    Why do you want to do this? You can access values from other pages so if you are on page 2 and there is an item on page 1 called P1_ID you can simply assign it to an item on page 2 by typing in P1_ID in the source value for your page 2 item.
    Or you could reference it direct in your pl/sql process by typing &P1_ID. (note the fullstop)
    If you did want to pass a value using a button you can do so by clicking on the button name in then scroll down to the section called optional URL redirect.
    set target is a - to page in this application
    then select the page you want the button to send you to
    then click the flashlight icon next to set these items
    you can then select the page item you want to send the value to and the page item you are getting the value from.
    Danny
    Message was edited by:
    Danny Roach

Maybe you are looking for

  • Query Help

    Table1: ou store point LS LIB1 50 LS LIB1 200 LS LIB1 100 LS LIB1 79 I have to insert table1 to table2 by splitting into every 143point and assing serial number for every 143 from parameter. in aboce example we can split 3 time 143 like below table2

  • Tax A/R - (Liability) and Tax A/P (Assets)

    Hi I am confused with Tax A/R and Tax A/P Tax A/R (when you raise the sales order you collect it from the customer) will be posting to a G/L account in Liability cabinet eventhough it is an income to you, and Tax A/P (when you raise a purchase order

  • Error: while  releasing document to accounting

    Pl advise us to solve this  thanks Error in a/c determination table T030K key INT MWS

  • Delivery Completed Indicator under Goods Receipt tab in COR2 to be hidden

    Dear All, I want to hide Delivery Completed Indicator under Goods Receipt tab in COR2. Is it possible with configuration?

  • Can't open attachments in Outlook Express since using recovery DVD

    I have a Toshiba Satellite laptop on Windows xp. I had to run the product recovery dvd-rom as it was really playing up switching it self off and all kinds well thats sorted now and is back to running normal. The only problem now is, when i try and op