Passing parameters from vb form to a crystal report with stored procedure

Can someone give me an idea how to use data inputted on vb form to be use as basis of crystal report generation which loads data from a stored procedure. Stored procedure has parameters that was also set in the crystal report. viewing on crystal report is ok but i am having difficulty running the report from vb.

Hi John,
              If Not CRRpt.ParameterFields("AgeType") Is Nothing Then
                    CRRpt.ParameterFields("AgeType").CurrentValues.Clear()
                    Dim ParamValue As new CrystalDecisions.Shared.ParameterDiscreteValue
                    ParamValue.Value = AgeType.ToString 
                    CRRpt.ParameterFields("AgeType").CurrentValues.Add(ParamValue)
                End If
Note that the ParamValue.Value should be assigned with exact same data type as you declared it in CR.
If it is string, Convert your Variable to string first.
If it is date, make sure you are passing a date variable.
and so on...
Regards
Edy

Similar Messages

  • Crystal Reports with stored procedures

    Hello Members,
    I have come across a unique problem (only for me I guess). When I develop a report using a sql command (with sql script), I can run this report against any server or any datatbase dynamically with out using the "Set Data Source Loaction" found under database fields in field explorer. This report is based on  a stored procedure and uses a OLEDB connection. When I developed this report for the first time, I defined its database connection (servername,database). Now I have created a same procedure with the same name on different server under a different database. I wanted to run this report against the new server, but I am getting an error " Failed to retrieve data from database". If i click OK on this pop up window. It displays another pop up window and says the old database name is not found in the new server. The criteria is the report should be able to run on any database on any server if the same stored procedure exists in there just like the report with sql command runs. How to solve this problem ?
    Thanks in Advance!!!!

    Hi Raghavendra,
    I know that is one of the way to do this ands it is manual process. The problem here is different clients will be running this report. Each client's data is located on different server and different database and this update process should be done automatically. Do you know any way to do this ?
    Thanks!!!!

  • Passing parameters from one form to another

    Hi,
    I'm trying to pass parameters from 1 form to another. I would be able to call the form, but the parameters are not passed to the calling form. I do not know what's the problem. Basically, the 2nd form shows up with blank values in all the fields. Below is my code. Anybody expert in this, pl. help.
    By the way my 1st form is based on PROCEDURE.
    declare
    s_requestor           number(10);
    s_customer_impact      varchar2(4000);
    s_creation_date      date;
    l_url                varchar2(4000);
    blk               varchar2(10) := 'DEFAULT';
    begin
    p_session.set_value(
    p_block_name => blk,
    p_attribute_name => 'A_P_REQUESTOR',
    p_value => 88888);
    s_requestor := p_session.get_value_as_number
    (p_block_name => blk,
    p_attribute_name => 'A_P_REQUESTOR');
    s_customer_impact := p_session.get_value_as_varchar2
    (p_block_name => blk,
    p_attribute_name => 'A_P_CUSTOMER_IMPACT');
    s_creation_date := p_session.get_value_as_date
    (p_block_name => blk,
    p_attribute_name => 'A_P_CREATION_DATE');
    l_url:=('/pls/portal/PORTAL.wwa_app_module.link?
    p_arg_names=_moduleid&p_arg_values=1794837934&
    p_arg_names=_show_header&p_arg_values=YES&
    p_arg_names=REQUESTOR&p_arg_values='||s_requestor||'&
    p_arg_names=CREATION_DATE&p_arg_values='||s_creation_date||'&
    p_arg_names=CUSTOMER_IMPACT&p_arg_values='||s_customer_impact);
    PORTAL.wwa_app_module.set_target(l_url);
    end;

    the way to call one form from another and pass values for parameters from the procedure is like this:
    PORTAL.wwa_app_module.link (
    p_arg_names => PORTAL.wwv_standard_util.string_to_table2('_moduleid:_show_header:REQUESTOR:CREATION_DATE'),
    p_arg_values => PORTAL.wwv_standard_util.string_to_table2('1191314879:YES:'||s_requestor||':'||s_creation_date));
    and so on.
    Hope it works for you

  • Crystal Reports 2008 Stored Procedure and Parameters from LOVs

    Quite simple report using stored procedure as data source. When editing some of the parameters we get this error when clicking OK to close "This stored procedure parameter can only accept multiple values. Please ensure that Allow Multiple Values is true."
    As we all know stored procedure parameters do not access multiple values at all, so this message is very hard to debug. The report does work if we set the 'Allow Multiple Values' to true, but only when using exactly one value for the parameter. We have tried verify database and other things, but cannot find any way around this issue.
    All ideas are appreciated as this is stopping us from utilizing the dynamic parameters.
    Thanks, Stig

    We managed to work around the issue by creating a new stored procedure. First we used the same parameter names and changed the data source to the new stored procedure. After renaming the parameter with the issue the problem then was resolved.
    Note that another parameter that was earlier affected by this issue in the way that it could not be edited and saved due to the same error message now also works fine. This even if this parameter has not changed names.
    Quite a complex situation to debug this. Maybe if the source of the error message is found in the code we could help testing.
    Stig

  • Crystal Report and stored procedure calls

    Hi,
    1.   I am trying to access a Stored Procedure through Crystal Reports 2008. I have 3 Parameters in it and now I need the 2 Parameters from the stored Procedure to be given by User and the 3rd Parameter should be passed from the backend code. Please help me with the setps that would help me do this.
    2.I also have another Stored procedure where I have 3 parameters and in addition to that I should provide two other parameters for user to enter. Now the total number of parameters will be 5 Parameters. Can any one let me know how to implement all these parameters.
    3. In another Storedprocedure I have two Parameters which are discrete and multi select and both of them are cascaded. How do I implement those.
    Thanks
    Pradeep

    Please 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 run crystal report with store procedure in JSP

    I try to run report which is developed by crystal report XI and store procedure (SQL 2005) with JSP.
    But it occurs error that is "com.crystaldecisions.reports.reportengineinterface.JPEReportSource - failed to process getPage request: No results were returned by the query."
    How can I do for solving this problem? Pls, help me !!!!!
    (In other report which is not used store procedure I can run fine.)
    Message was edited by:
    Bonds_Identity

    What version of CR are you using?
    What CR updates are you using?
    See sample apps here:
    https://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsfor.NETSDK+Samples
    in particular check out vbnet_win_pass_dataset_main_sub.zip
    The [Crystal Reports for Visual Studio 2005 Walkthroughs|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/2081b4d9-6864-2b10-f49d-918baefc7a23] will also be good to look at.
    Ludek
    Follow us on Twitter
    http://twitter.com/SAPCRNetSup

  • Passing parameters from oracle form to html

    Hello,
    I have an application that requires me to take data from an oracle web form and pass many fields as parameters into an html table.
    Is this possible?

    Hi Rose,
    There is a specific sample form for this kind of actions in the Oracle9i Forms Demos. It is called Save2HTML.
    from the help file: F90Write.Write_HTML Description
    Writes the data from the specified block to a file in HTML format.
    Maybe you can alter the code for your own use.
    succes,
    Mark

  • Passing parameters from oracle form to the outside Environment ??

    i hava an application in
    c:\program files\sms app\sms.exe
    this application can run in command prompt and accepts parameters to send sms to customers
    example of command to send sms from command prompt(cmd) ,
    - i navigate to application path c:\program files\sms app\sms.exe and run command below
    sms.exe /p:+1012121212 /m:"message body goes here" /l /t
    my question is how can i implement a form contains two text box items & one button
    in button press trigger i want code that can pass the textbox1.text to the
    command line application sms.exe /p:textbox1.text in the parameter position which accepts the phone_number like above example
    and pass the textbox2.text to the other parameter in application which accepts message_body with "" _Double caution marks around the message body
    so the final command line will look like this :
    Application_Path\sms.exe /p:+1012121212 /m:"message body goes here" /l /t
    Notes:
    textbox1.text = parameter_data_type = number
    textbox2.text = parameter_data_type = varchar2
    Oracle Developer Suite 10g , OS:Windows 7
    Thanks you very much

    thanks for replay poelger ,
    can y tell me the full command which i'll use ????
    the problem is to escape the "",/ characters ,, so the final result will look like this
    Application_Path\sms.exe /p:+1012121212 /m:"message body goes here" /l /t
    the host needs to check for the operating system??
    Again Thanks..

  • Passing parameters from one form to another in swings

    hi
    Could you please let me know is there any provision to pass the values between two forms in Swing..
    For Example: I have two forms : 1 Login Page and 2. Main Form.
    After Login Confirmation i want the User name to be displayed in the second form.
    Thanks in advance
    Srisha

    It seems that that is a typical servlet task, not Java Swing.

  • Crystal Reports - Using Stored Procedure with c#

    Post Author: cathalmckenna
    CA Forum: Data Connectivity and SQL
    Hey
    I've got some c# code that sets a reports data source.
    Its works when connecting to a data source that is a Table, however when the datasource is a Stored Procedure the following error is generated.
    The table 'PNL_STATUS_REPORT' could not be found.Error in File C:\DOCUME1\mckennac\LOCALS1\Temp\temp_9b3cb2f4-7e37-4e34-bd18-af7b06c85139 {ACBDC2D4-A275-4CAA-B3C0-E3C92F615007}.rpt:The table could not be found.
    The problem is when setting table.Location. I've tried prefixing this with the package name that the stored proc is in, but no luck. If I set the table Location to the package name, I get no error, but the report returns no results.
    Any ideas why this doesnt work, is there a different way to handle stored procs??
                 ConnectionInfo connInfo = new ConnectionInfo();            connInfo.DatabaseName = dbName;            connInfo.ServerName = serverName;            connInfo.UserID = userName;            connInfo.Password = password;                        foreach (Table table in report.Database.Tables)            {                TableLogOnInfo logOnInfo = table.LogOnInfo;                string[] locations = table.Location.Split('.');                string unqualifiedLocation = locations[locations.Length - 1];                logOnInfo.ConnectionInfo = connInfo;                table.ApplyLogOnInfo(logOnInfo);                table.Location = unqualifiedLocation;            }
    thanks
    Cathal

    Post Author: ianbennett
    CA Forum: Data Connectivity and SQL
    I too am having the same problem.  I have found that when the user has a fast connection it works OK but when they use a "slow" link it does not seem to passs the logon information through before trying to generate the report.

  • Automatically Pass Parameters From Crystal To SAP B1

    So, I've searched extensively, and haven't been able to find an answer to my unique issue.
    This question pertains to linking a Crystal Report by parameter values to the OWOR table in SAP B1, and automatically passing those parameter values from the active record in SAP. Several other tables are used in sql joins, but the report is generated from an OWOR production order. I should start by stating that the report works great when manually populating the parameter fields when SAP calls for them.
    Overview:
    I've written a report in Crystal that contains several sub reports, some of which are looking to the DocEntry field as the parameter (DocKey@) and others that do not look to the DocEntry field at all - but rather use another field on the form to pull up information that spans more than just that one production order. I've chosen to upload as a layout in SAP (as that is all I've worked with up to this point, and it seems it needs to be to automate from a production order); but as I continue to research, it appears DocKey@ is mandatory when uploading as a layout, and in order to view the report from the actively selected production order, it must be a layout. Does that mean the parameter is required in all sub reports? Is it required in any sub report?
    I have two main issues that I need to hurdle for this report to work how I would like it to:
    1. Three of the eight Commands (one main command and seven sub-report commands) use the DocKey@ as the parameter to pass from SAP back to Crystal. The main report command, as well as four of the sub reports/commands are looking to another field in the OWOR record - which happens to be a re-seller defined field (UDF). For all intensive purposes, let's call this field BatchID. I'm assuming the sub report commands run in succession, one after the next. The reason I need to use BatchID as the parameter to pull from the record, rather than DocEntry, is there are other records that contain the same BatchID, and I want all of the info pertaining to that BatchID to populate on the report.
    Q1: The first command containing DocKey@ is automatically populated by SAP, and the user does not have to key that one in. However, the next two DocKey@ parameters do not automatically populate, and the user is asked for those values. How can I fix this?
    Q2: How can I automate the passing of BatchID so the user does not have to fill it in 5 times when they wish to preview the report(layout)? Can I link ObjectID@ to any field in OWOR? Is there any other way like creating a stored procedure or something , to automate the passing of that variable from the SAP active record to the crystal report - so the user doesn't have to key it in several times just to pull up the report?
    Thank you so much for even reading, let alone helping me with this issue!!
    Cheers,
    Nick

              Hi
              I had the same problem. Take a look at this newsgroup article on the businessobjects
              website :
              http://support.businessobjects.com/library/kbase/articles/c2015264.asp
              Grieg
              "Rada Pickens" <[email protected]> wrote:
              >
              >Hi,
              >
              >I'm getting the same error message, I was wondering if you fixed the
              >problem.
              > I'm stumped, can you help?
              >
              >Rada
              >
              >
              >"JAI" <[email protected]> wrote:
              >>
              >>I am passing parameters, from the JSP page to Crystal Report, i took
              >>the code from
              >>the below mentioned url, i dont know, it is something wrong with the
              >>jsp page
              >>or crystal report.
              >>i have created parameter field in crystal report to receive the value
              >>from the
              >>jsp page.
              >>If u r not clear with the error, please reply to me.
              >>
              >>i took the code from the below mentioned page
              >>
              >>reference page:
              >>----------------------
              >>http://dev2dev.bea.com/trainingevents/webinars/012804_faq.jsp
              >>parameterFieldsViewReport.jsp
              >>
              >>
              >>error displaying in the jsp page
              >>-----------------------------------
              >>com.crystaldecisions.report.web.viewer.CrystalReportViewer
              >>Some parameters are missing values
              >
              

  • Passing parameters from FORM to REPORT

    Hello All,
    How to pass parameters from a FORM to a REPORT in Oracle Application Server Portal.

    Vamsi, Are u capturing the imputs for these parameters in the form??
    If u are capturing them in the form, then u need to add them to a parameter list (TEXT_PARAMETER) and while calling the report u can send it as a parameter in the RUN_PRODUCT call.
    Pls check the syntax for adding parameters and calling report from form in the form builder help.

  • Passing Parameters from Forms to Discoverer

    Hello Everybody,
    Is there a way to pass parameters from Oracle Forms to discoverer 4??
    I want to call Discoverer from a Form and pass parameters to a sheet.
    Thanks

    Hi,
    I don't have 10g right now, so can't test it...
    Isn't it possible to just put the params you won't show to your users 'behind' other objects on the param form?
    Strange behaviour anyway, in 6i Reports does not seem to care wether the params are on the form or not.
    Rgds,
    Guido

  • 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 from portlet reports to portlet forms

    Hi,
    I'm tring to pass parameters between a Report displayed as a portlet in a page ( page 1) and a form displayed in other page ( page 2).
    The problem is i can't do this.
    I only can pass parameters from a report ( running as normal or in a portlet displayed in a page) to a form running "normal" by using application links. Can i do this between a report that show's me every employees of scott.emp table. Then when i click on each employee, it open's me another page with the portlet form of the specified employee.
    I'm not sure i made myself clear. Please send me some feedback.
    Pedro

    I have the same problem. Please let me know if this could be done.
    In particular my form is a type of "Form on Table/View."
    Thanks
    Henry

Maybe you are looking for

  • I am not able to access the sharepoint:80 site using the local IP address.

     I am able to access the Central administration using the Local LAN IP address and the port number, but, I am not able to access the sharepoint:80 site using the same local IP address without the port for the central administration. I tried adding th

  • HT3529 My iPod touch 4th gen wont receve any picture messages!!!! HELP ME!

    My iPod Touch 4th Gen wont recevie any photo messages that are sent to me. I can send photos to someone else but if they send one in retun I dont get it. I dont know whats wrong with it. Please help!? Its a White iPod 4th Gen.

  • LR2 Adjustment Brush not working?

    I just got Lightroom 2 and have tried over and over to use the adjustment brush, but I haven't seen ANY results. A black circle with silver lining shows up where I click the picture with the brush. I have heard that clicking "O" makes the adjustment

  • Where should your various media files be located?

    After backing up my purchased TV Shows, iPhone apps, music and movies, I have done a clean reinstall of iTunes on a cleanly reinstalled OS (Windodws7). While all of my music seemed to have been restored, I am unable to locate a folder in which to pla

  • Can't open FCP 4.0

    I have had this program for about 5 years or so. In that time I have moved and gotten a new computer. I restored everything to the new computer via the back-up system and my external storage. When I tried to open FCP it is now asking for the serial n