Pass querystring parameter value to crystal report

Post Author: hani1426
CA Forum: .NET
Hi all,
I am new in using crystal reports
I want to print an invoice with it's items in a crystal report,I have aseparated page which contains a GridView of invoices and it has a hyperlink field column which parse the ID of the invoice to the page of the crystal report
In my crystal report I am using "Microsoft OLE DB Provider for SQL Server" Connection which connects to my local instance of SQL server express edition and then add a "command" to obtain the invoice details
BUT: when adding a parameter to my command it gives an error which description is: "Must declare the scalar variable @ID"
please how can I add this parameter
thanks for any help
bye

I responded to your other thread:
pass parameters from vb.net to crystal report
Please do not cross post. See the [Rules of Engagement|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement]
Closing and locking this thread.
Ludek
Follow us on Twitter http://twitter.com/SAPCRNetSup
Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

Similar Messages

  • Print Multiple Parameter Value in Crystal Report 2008

    Hello and Hi
    i want to select multiple warehouse  in a pramater , i select and report working but parameter print only first parameter  value on report.how can print all selected values on report

    Hi
    I am assuming you select warehouses  WH1,WH2,WH3,.......
    You have to create a formula in Crystal
    It should look like this
    Join({?YourParamaterName},",")
    Place the formula on your report.
    The last Part of the formula is the "notation break"  between every parameter returned. In this case a >   ,   <
    Return would be WH1,WH2,WH3,.......
    Join({?YourParamaterName},"#")  would return  WH1#WH2#WH3#.......
    Hope you get the idea
    If this solution helps, please rate me.
    Regards
    Burger

  • Passing formula values to Crystal Reports from c#

    in an old vb 6 application we used to be able to call a function called PESetFomula in the Crystal Reports viewer and pass it the name of the parameter and the value.
    How do we do that now using Crystal Reports for VS 2013. I don't mean to set the criteria just to pass over parameters and values.
    Bill

    Hi Bill,
    Moving the thread to Crystal reports for Visual Studio Space.
    Using the .net SDK you could use the ReportDocument class to pass the parameter values to the report.
    See the sample applications here:
    http://scn.sap.com/docs/DOC-6929
    http://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports+for+.NET+SDK+Samples
    The developer guide and the API reference guide is here.
    http://scn.sap.com/docs/DOC-7824
    - Bhushan
    Senior Engineer
    SAP Active Global Support
    Follow us on Twitter
    Got Enhancement ideas? Try the SAP Idea Place
    Getting started and moving ahead with Crystal Reports .NET applications.

  • Passing Value from Crystal Report (special function) to Business View parameter

    Friends,
                 Í have a scenario where i need to pass value from Crystal Report to a Business view's parameter.
    Eg : CurrentCEUsername (func in crystal report)-- gives login user  which i should pass to parameter in a Business view (used in the same report).
    Will be able to explain more if required.
    Thanks in Advance,
    Bharath

    I guess you got the picture wrong.  User_id is not a report_level parameter .
    In Data Foundation, below query is used..
    select Acc_Number, Account_Group,User_id  from Accounts where user_id={?User_id}
    where in {?User_id}  is the BV parameter...
    The Filter was a solution. But it takes long time to Query all the data from DB and then filter at BV level.
    How do i pass the CurrentCEUsername to {?User_id}
    Value should ve CurrentCEusername always. so that query will be
    select Acc_Number, Account_Group,User_id  from Accounts where user_id=CurrentCEusername
    It will restrict the data pulled from DB to BV .. right?

  • How to pass parameter values to a report befor schedule it?

    I tried to use Business Objects web service to schedule a report. But I failed to pass in any parameter values. The report was able to run successfully. But check all history from Infoview, all parameter are with NULL value. Does anybody encounter the same problem and has good resolution for this? Many thanks.
    Here's my code:
    // Logon Crystal Report Server
    LogonCrystalServer();
    // Find Report
    GetOptions oGetOptions = new GetOptions();
    oGetOptions.IncludeSecurity = false;
    ResponseHolder rh = _bipService.Get("cuid://<" + reportCuid + ">@SI_SCHEDULEINFO, SI_PROCESSINFO", oGetOptions);
    InfoObjects oInfoObjects = rh.InfoObjects;
    if (oInfoObjects == null || oInfoObjects.InfoObject == null) return;
    // Set Scheduling Info
    CrystalReport oReport = (CrystalReport)oInfoObjects.InfoObject[0];
    oReport.Name = oInfoObjects.InfoObject[0].Name;
    SchedulingInfo oSchedulingInfo = oReport.SchedulingInfo;
    oSchedulingInfo.RightNow = true;
    oSchedulingInfo.ScheduleType = (ScheduleTypeEnum.ONCE);
    oReport.SchedulingInfo = oSchedulingInfo; 
    // Set Format Info.
    ReportProcessingInfo procInfo = oReport.PluginProcessingInterface;
    CrystalReportFormatOptions repFormat = new CrystalReportFormatOptions();
    repFormat.Format = ReportFormatEnum.EXCEL;
    repFormat.FormatSpecified = true;
    repFormat.UseExportOptionsInReport = true;
    repFormat.UseExportOptionsInReportSpecified = true;
    procInfo.ReportFormatOptions = repFormat;
    // Get Report Parameters and Set their values
    // I don't know if the step has any problem. I copied from wssdk sample.
    ReportParameter[] repParams = procInfo.ReportParameters;           
    for (int i = 0; i < repParams.Length; i++)
        CurrentValues oCurrentValues = new CurrentValues();
        BusinessObjects.DSWS.BIPlatform.Desktop.PromptValue[] oPromptValue = new BusinessObjects.DSWS.BIPlatform.Desktop.PromptValue[1];
        oPromptValue[0] = new BusinessObjects.DSWS.BIPlatform.Desktop.PromptValue();
        oPromptValue[0].Data = "Test";
        oCurrentValues.CurrentValue = oPromptValue;
        repParams<i>.CurrentValues = oCurrentValues;
    procInfo.ReportParameters = repParams;       
    oReport.PluginProcessingInterface = procInfo;
    // Schedule run the report   
    InfoObjects infoObjects = _bipService.Schedule(oInfoObjects);
    //Get new instance id
    string instanceCuid = infoObjects.InfoObject[0].NewJobID;
    Edited by: Shao Zelian on Jan 19, 2010 11:51 AM

    Can you clarify your scenario? Which is the case you're talking about?
    1) You want to pass a parameter from OmniPortlet to a PL/SQL procedure.
    2) You want to pass a parameter from a PL/SQL procedure to OmniPortlet.
    In both cases the most obvious way of doing it is through request (URL) parameters.
    Render a link in your portlet (either in OmniPortlet or using PL/SQL) that invokes a portal page, containing the other portlet.
    Both OmniPortlet and PL/SQL allow you to wire and access page parameters.
    Take a look at the Using Parameter and Events section of the Portal User's Guide and the Parameters and Events section of the Portal Developer's Guide.
    Hope this helps,
    Peter

  • How to get Description of parameter filed in Crystal report 2008

    Hi expert,
    I am creating a crystal report from Query ,which is created in BEX    Query designer 7.
    In query designer i have some selection variable.
    The requirement from clint is that they want to see what value is selected for all  variable.
    when i tried to put all parameter field in crystal report it is showing only Technical name of value selected not  description and also it show only for variable which is single value variable  not for the range value variable and multiple selection variable.
    can any one help me How to get description of value in report and can it is possible to show Range value and multiple value for a particular variable .
    i am using Crystal report 2008 SP3 version.
    Thanks and regards
    devendra

    Moved to BEx forum

  • Range Value in Crystal Report

    Hello Experts,
    I want to include a range value in crystal report. Currently the report is used for printing AR invoice with one invoice at time, wherein user inputs invoice number which he wants to print. I want to include invoice number range in the report, but that option is disabled in the parameter field. In present report Invoice number is taken as static value and then connected to db to get the data of that AR invoice number, advise how to
    - Activate "Allow Range Value option"
    - How to set up the multiple invoice printing
    Setup details : SBO 2007B, CR 2008, SQL 2005
    Regards
    Deepak

    Hi Deepak........
    Sure........
    Hope your query report is perfect and for Parameter Range goto Report Expert in Tool Bar of the Crystal Report you can find it by yellow coloured Flask Symbol. Click on that and just define the range of parameters........
    Regards,
    Rahul

  • Printing parameter values in xml report, and displaying it in header of the

    Hi All,
    Can anybody give me an idea to print the parameter values in the xml report.
    My requirement is like, I have 10 parameters in report builder, I have generated the xml file and created the .rtf template and finally registerted in oracle apps. But now, the requirement is to print the parameter values in the report output.I don't see any xml tags in the xml output.
    Any suggestion will be appreciated.
    Thanks in advance.

    I think all the XML attributes can contain lexicals. If you bring up the property palette against the report object you can just set the following:
    XML Tag Attributes: myParameter="&<P_1>"
    where P_1 is your user parameter.

  • How to include input user parameter values in XML report output?

    How can i include input user parameter values in XML report output. I a have a report which can be run by providing start date and end date. I would like to include value of these parameters in XML output to enable me to figure out dates for report, just by looking at XML output.
    Rgds,
    manish

    I think all the XML attributes can contain lexicals. If you bring up the property palette against the report object you can just set the following:
    XML Tag Attributes: myParameter="&<P_1>"
    where P_1 is your user parameter.

  • One parameter for multiple Crystal reports in Publication

    Does anyone know if it is possible to enter one identical parameter for multiple Crystal reports in publication when scheduling? BOE 3.1 SP3 Windows, Java.
    To elaborate I am creating publication with multiple reports, each report has one parameter and this parameter is identical in every report in publication. So instead of entering this parameter many times I would like to enter once. 
    If yes point me in the right direction to get the how to or post the steps.

    Daniel,
    Thank you so much for your answer. It was very helpful. In the end, it didn't work but it helped me figure out what was happening. I use a different form for the reports and I had it coded in the form which report to use. I created a second form for the second crystal and then I used an if statement to choose the form and it worked like a charm.
    Thanks so much again!

  • How to assign a variable value to crystal report viewer formula with CR2008

    Hi ,
    I am using crystal reports 2008 and i am not able to find how to assign  variable value  to crystal report viewer formula.
    In CR 8.5 , i used to have crystalreport1.Formulas(0) = variable1
                                             crystalreport1.Formulas(1) = variable2
    but, i don't find similar kind  in crystal reports 2008.
    How can i achieve the same functionality using crystal reports 2008.
    Thanks in Advance
    Regards,
    Ramnath

    Hi,
    Can i anyone help me out with this.
    I am generating crystal reports in vb6 using CR 8.5 and vb6 and below is the code snippet for the same
    CrystalReport1.Formulas(0) = "PrintTitle= '" & strMyTitle & "'"
    CrystalReport1.Formulas(1) = "FromDate= '" & MskFromDate.Text & "'"
    CrystalReport1.Formulas(2) = "ToDate= '" & MskToDate.Text & "'"
    Please let me know how the same functionality can be achieved in VB.Net using Crsytal reports 2008
    Any code snippet would be of great Help.
    Thanks in Adnvance.
    Ramnath

  • Problems with parameter button in Crystal Report Server  2008

    Dear all,
    I have problems with parameter button in Crystal Report Server 2008.
    when I created some parameters and groups in Crystal Report 2008, they showed both parameters in 'Parameter button' and group in 'Group button'  on the left, so I can choose or type without clicking 'Refresh button' But when I added it to Crystal Report Server 2008 and I click parameter button , it doesn't show any parameter. Only click refresh button to choose them. On the other hand, for 'Group Tree' is ok. When go to Default Setting-> Parameter, all parameters are in 'Unused parameter'  First time I think I had problems with my installation, but when I reinstalled it again, it was like before.
    Could any one help me with this?
    I appreciate looking forward to your reply
    Ketya

    Try posting your questionin the correct forum, this is for SAP Business One, not Crystal reports Server

  • How to pass hierarchy node value to another report using RRI

    hi,
    i want to pass hierarchy node value to another report but i can not able to do this using hierarchy variable so i want solution for this.
    Reply me as soon as possible its very argent.

    Did you wanted to jump from Node to Node ? I guess you cannot do that....did you try ?

  • Any way to find parameter value for a report?

    CS2008 SP3 - version 12.3.0.601
    Is there any way parameter value of a report can be found? The following code doesn't return parameter value but returns name.
    Fields existingReportParameters = null;
                            IDataDefinition dataDefinition = reportDocument.getDataDefinition();
                            existingReportParameters = dataDefinition.getParameterFields();
                            if (existingReportParameters != null) {
                                  for (int i = 0; i < existingReportParameters.size(); i++) {
                                        IField field = existingReportParameters.getField(i);
                                        if (field instanceof ParameterField) {
                                              ParameterField pa = (ParameterField)field;
                                              String paramName = pa.getName();
                                              //Values values = pa.getValues();
                                              //Object value = values.get(0);
                                              //System.out.println("*** repName Parameter - " + paramName + ":" + values);
                                              System.out.println("*** repName Parameter - " + paramName);
    Need to find a solution soon. Thanks in advance.

    Hello,
    Try searching, I have post code snippets on how to get values. I don't know for sure though if that code will work in CR 2008.
    Don

  • Passing parameter values to another report using URL actions (reportserver)

    Hi guys,
    I have two reports that I link with eachother. For report A - B everything works perfect. When I try to do the same for report B - A it works, but the parameter value is not filled in.
    =Iif(
    Parameters!PAR_LinksEnabled.Value, 
    Globals!ReportServerUrl & "?" & Replace(Globals!ReportServerUrl, "_vti_bin/ReportServer", "")
    & "Reporting/POS Reporting/Reports/POS Report.rdl&POS_ID=" & Parameters!CONNECTION_ID.Value & "&POS_LANG=" & Parameters!POS_LANG.Value & "&PAR_Date=%5BDate invoice%5D.%5BBonus Calendar - Week%5D.%5BBonus
    week of year%5D.%26%5B" & Left(Parameters!YEAR_WEEK.Label, 4) + "%5D%26%5B" & CInt(Right(Parameters!YEAR_WEEK.Label, 2)) & "%5D",
    Nothing
    Even tho I specify the parameter he has to pass through, the report opens with parameter period : <select a value>. Anyone has an idea why such behaviour happens?
    Thanks!

    Hi Yvanlathem,
    Per my understanding that you want to use the expression above to conditional add the hyperlink to pass the value to the parameter of anpother rreport via the URL in the SharePoint integrated mode report server, right?
    I have check the expression you have provided and the issue can be caused by the wrong way you have write the expression to pass the parameter, please check detais information below to make sure you have pass parameter in the URL correctly:
    Please modify the expression to below structure :
     =Iif( Parameters!PAR_LinksEnabled.Value="Enabled", "URL",Nothing)
    I saw you have use expression like "&POS_ID=" & Parameters!CONNECTION_ID.Value & "" which is incorrect, we need to set a report parameter within a URL, use the following syntax:
     parameter=value(not Value=Parameter)
    If you are using the following syntax like "Parameter1=Parameter2", both parameters and from different report, if you have add the "Go to URL" action from  report2 to Report1, please make sure Parameter1 is from the Report1
    and Parameter2 is from Report2, change the order will not work
    More detail information:
    Pass a Report Parameter Within a URL
    So, In your scenario, please make sure the value is from one report's field (POS_ID) and the the parameter(CONNECTION_ID) is from another report (e.g:"&CONNECTION_ID=" &Fields!POS_ID.Value &"")
    Similar thread for your reference:
    SSRS 2012 Drill Through report cascading Parameters not refreshing
    If you still have any problem, please feel free to ask.
    Regards,
    Vicky Liu
    Vicky Liu
    TechNet Community Support

Maybe you are looking for

  • A/P Credit memo cannot copy from A/P Downpayment Invoice

    Hello Everyone! I have encounter problem in A / P credit memo. If I clicked on the Copy from A/P Down payment the list of invoices do not appear. List seems to be empty. I've checked on the A/P down payment and the account is still open and the is an

  • CANNOT SEND MAIL FROM .MAC SMTP ACCOUNT

    Hello everyone-- I can receive mail from my .mac account and have done extensive troubleshooting including: 1. Changing ports from 25 to 587 2. Deleting and re-installing mailbox 3. Reading a hosts of topics 4. I have the serving settings with SSL un

  • Photoshop or Aperture on MBA

    Anyone out there using Photoshop CS5 or Aperture on a MacBook Air? I'm looking to maybe sell my MacBook Pro, get a new iMac for the heavy lifting, but maybe buy a MBA for travel for importing, tagging, and doing light work in Aperture and maybe Photo

  • Buy old macbook

    Hi, I plan to buy an old macbook pro early 2011 on ebay. I see on the internet, the owner can lock their macbook with find my mac. So I want to ask after I buy an old once, what I should do to prevent that? My friend said that sometime the owners wan

  • Change data capture in ODI11G

    Can anyone help me with using "change data capture" (simple set) in odi11g. Is there a link for me to follow the various steps to use change data capture with examplle.