Can I capture crystal report user input in my web application?

Folks, I have a report that has a input paramter named "AccountKey". Crystal report launches its own input parameter capture screen where user can type in the AccountKey value and hit OK button. Subsequently the crystal report gets renedred in crystal report viewer.
I have a requirement of rendering the report in PDF not in crystal report. How do I do that.
I am able to do that when there is no user input needed in the crystal report or, if I can somehow supply needed input from code-behind, but the moment I has a parameter that expects user-input I loose control.
Is there anyway I can capture what value user has entered in Crystal Report Input paramagter capture form? or, any alternate that can help me acheive the result?
Thanks.

Hi,
To capture the values of Parameters the best thing you can do is to code for parameters and take values from it through text boxes, so that you can capture it.
here some sample code for it - try it
I would like you to know the following code that I have tried at my end using Viewer Object model:
// Object Declaration
ParameterFields boParameterFields = null;
ParameterField boParameterField = null;
ParameterValues boParameterValues = null;
ParameterDiscreteValue boParameterDiscreteValue = null;
ParameterRangeValue boParameterRangeValue = null;
// loading the report
CrystalReportViewer1.ReportSource = Server.MapPath("ReportWithSubReport.rpt");
CrystalReportViewer1.RefreshReport();
// passing database credentials...
foreach(CrystalDecisions.Shared.TableLogOnInfo boTableLogOnInfo in CrystalReportViewer1.LogOnInfo)
              ConnectionInfo boConnectionInfo = boTableLogOnInfo.ConnectionInfo;
              boConnectionInfo.UserID ="sa";
              boConnectionInfo.Password="sa";
// Parameter Country
boParameterFields = CrystalReportViewer1.ParameterFieldInfo;
boParameterField = boParameterFields["Country"];
boParameterValues = boParameterField.CurrentValues;
boParameterDiscreteValue = new ParameterDiscreteValue();
boParameterDiscreteValue.Value = "Argentina";
boParameterValues.Add(boParameterDiscreteValue);
// Parameter Sales
boParameterField = boParameterFields["Sales"];
boParameterValues = boParameterField.CurrentValues;
boParameterRangeValue = new ParameterRangeValue();
boParameterRangeValue.StartValue = 25000;
boParameterRangeValue.EndValue = 100000;
boParameterValues.Add(boParameterRangeValue);
// Parameter @percentage in subreport named SubReport
boParameterField = boParameterFields["@percentage", "SubReport"];
boParameterValues = boParameterField.CurrentValues;
boParameterValues.Clear();
boParameterDiscreteValue = new ParameterDiscreteValue();
boParameterDiscreteValue.Value = 75;
boParameterValues.Add(boParameterDiscreteValue);
Please note that I have used Range and Discrete values as parameter in the above code.
Also if you want to use the ReportDocument Object model then you can use:
ReportDocument.SetParameterValues("Parameter name", value)
Note:- This code is valid for only discrete values of Parameters.
or
boParameterFieldDefinitions = boReportDocument.DataDefinition.ParameterFields;
boParameterFieldDefinition = boParameterFieldDefinitions["@percentage","SubReport"];
boParameterValues = boParameterFieldDefinition.CurrentValues;
For getting output in PDF you can export the report to PDF throug viewer or from code fro e.g.-
boReportDocument.ExportToDisk(ExportFormatType.portabledocumentformat,"c:\\temp\\myrpt.pdf");
To download sample code click [here|https://boc.sdn.sap.com/codesamples].
You can also take help from [Dev library|https://boc.sdn.sap.com/node/7770]
Hope this helps!!
Regards,
Amit

Similar Messages

  • Crystal Reports 8.5 & 9 Via Web Application

    Post Author: bearie
    CA Forum: Older Products
    I have inherited an issue with a proprietary web based
    application and Crystal Reports 8.5 & 9. Someone a few years ago wrote a .dll file that would that a
    requested Crystal Report, via the web application, and the report would be
    displayed in edible Word Rich Text format.
    The Crystal Report contained parameters that were passed to the reports
    via .asp or SQL.
    Both the person who wrote the .dll and the source code of
    the .dll are long gone.
    This process worked great until about a month ago.  Now when a report is edited with Crystal
    Reports or a new report created and accessed using the same methods the report
    will not launch or launches with out updating the data in the report. 
    We believe the issue has to do with one of the many
    Microsoft updates and patches that were coming out about a month ago.
    Up to now I have been a report developer, creating the SQL
    and reports and turning them over to the u201Cprogrammers".  To make a long story short u2013 the u201Cweu201D is now
    me, and I do not have a clue the best route to take to resolving the issue.
    Please any ideas and / or suggestions will be greatly
    appreciated. 
    --if there is a better forum to post this, please let me
    know.
    Thanx!

    Post Author: bearie
    CA Forum: Older Products
    Since there have been no replies - I am guessing what we need to have done cannot work with the versions of Crystal we are currently using. If we were to update to the latest Crystal - can this be done.  Need to find out before I try to convince my company to upgrade. Thanx

  • Automating a report for non-Crystal Reports users

    Post Author: dmdouglas
    CA Forum: Formula
    I using version 8.5. Several people I generate a specific report for would like to be able to run it themselves rather than ask me to run it for them. As they are not Crystal Report users, is there a command that will ask the user to input information that will be used to generate a report for a specific month when they run the report, rather than having to go into the select criteria to put in the date they want? For example, if they wanted a report for March, they would just have to answer a prompt like "What month?" and the program would put their response in a variable to calculate the period desired for the report.

    Post Author: V361
    CA Forum: Formula
    Not sure for 8.5, but in later release's you add a parameter, the parameter does the prompting "Sort of", then you set the select statement to use the parameter. Parameters will have ? as part of the field name.   ie...
    = { ?Date_Parameter}

  • Why we need ABAP if we can connect With Crystal Reports to SAP R/3

    Hi,
        I am new to Crystal reports.I came to know that we can connect SAP R/3 by using SAP InfoSet,SAP Table Cluster and Function connectivity in Crystal Reports.So we can generate reports for SAP R/3 database with out need of ABAP.So why we need to go ABAP module.Is there any disadvantages if we dont use ABAP to generate reports or we can use always Crystal Reports to generate Reports for R/3 database?

    Hi,
    it is correct that you can built a Crystal Report without the need to use ABAP, but we have lots of customers that have invested over the years into ABAP Routines and Crystal REports is able to leverage those as well. So with Crystal Reports you have the choice to leverage existing ABAP Functions as a source for reporting - which might help to leverage complex processing on the backend - or to use InfoSets and tables.
    regards
    Ingo

  • Can we use Crystal Reports 2008 tool to directly reports on SAP R\3 data?

    Hi,
    Can we use Crystal Reports 2008 Designer to directly reports on SAP R\3 data without any additional Integration Kit for SAP?
    I believe the Integartion Kit is only for reporting on SAP BW data.
    Thanks in advance for your response and any additinal details you can provide.
    Thanks,
    Sri

    Please post this query to the Crystal Reports Design forum:
    SAP Crystal Reports
    That forum is monitored by qualified technicians and you will get a faster response there.
    Thank you for your understanding,
    Ludek

  • Can I rum Crystal Report on Oracle Forms

    Friends
    Can I rum Crystal Report with Oracle Forms.
    Rgds
    Muhammad Tahir Khan

    Yes....but the way depends on your form's version and app implementation....!!!!
    Greetings...
    Sim

  • How Can I call Crystal report from R3?

    Hi experts,
      How Can I call Crystal report from R3?

    Hi Bill,
    Can you please be specific and could you please provide the steps
    Thank you

  • I can't find Crystal report on SAP 8.8 menu bar ?

    I am trying SAP 8.8 demo. Where is Crystal report on SAP 8.8 ? I can't find Crystal report on SAP 8.8 menu bar ? anybody told me location of crystal report on menu bar ?

    Hi,
    There is no option anywhere in SBO8.8 as "Crystal report" if you want to use it go to windows start ->program files->SAP Business One you can see there Crystal Report 2008 menu. Once you designed your report in Crystal then you can import it in SBO 8.8 through "Report and Layout Manager" in Administration -> Setup -> General. You can not open Crystal directly from SBO.
    Thanks
    Sachin

  • Crystal Report Server 2008 integration with java application

    Hi All,
    Any of you having complete document about Crystal Report Server 2008 integration with java application....like source code and what are all the jar files needed? Or tell me that the implementation is same as Crystal Report Server XI R2?
    Thanks

    Have you looked at the BusinessObjects Enterprise XI 3.x Java Developer Guide?
    [http://www.sdn.sap.com/irj/boc/sdklibrary]
    Sincerely,
    Ted Ueda

  • Please help, how to guide the user to deploy a web application easily.

    hello,
    i have created an application which creates a new web application every time it is run. now i am writing the documentation of it and dont know which web server the client may have so i have to write / show to the user general steps that he should follow to deploy the web application after it has been created.
    i have written that the user should deploy the web app by making the following entry into the server.xml file (for tomcat)
    <Context path="/webappname" docBase="webapppath"></Context>
    it is not compulsary that the user should place the web application in the webapps directory of the server hence the above webapppath is used.
    now i want to indicate to him where and before / after which tag and under which host name etc the above line should be added in a manner that he is able to do it properly.
    please anyone can help me how to do it.

    i would like to know if there is any way without Java web start.
    it has to be set manually.
    i.e every user should make this entry in the server.xml so that the context is set.

  • Capturing and displaying user input in Crystal Reports

    Hi all,
    Iu2019m creating a crystal report with SAP as data-source and want to capture user input and display it on the report.  I have defined parameters to capture the input and added them to the report header.   I have then created formula fields to capture user input using the JOIN statement to accommodate multiple values.   Everything works well when users enter values for all the parameters, but when they leave some blank I get an error message u201CParameter value is nullu201D.
    Has anyone encountered this type of problem;  Anyone knows how to resolve this?

    Hi
    In parameter window make the Optional prompt to True.  And change make change in your record selection formula like this :
    (not HasValue({?PrjMgr@SELECT Firstname,lastname FROM OHEM}) OR
    ISNULL({?PrjMgr@SELECT Firstname,lastname FROM OHEM}) OR
    ({?PrjMgr@SELECT Firstname,lastname FROM OHEM} = '') OR
    {OHEM.firstName} = {?PrjMgr@SELECT Firstname,lastname FROM OHEM})
    Regards

  • Can you use Crystal Reports for Enterprise to connect to BOE4 over the web?

    Hello,
    When I use Crystal Reports for Enterprise in BI Launchpad when I am connected on the LAN network it works.
    If I connect via the internet, it doesn't.
    I wanted to know if Crystal Reports for Enterprise only works if you are connected to Business Enterprise 4.0 on a LAN network and if it's not designed to work remotely, aka via the internet connection, like you can with Webi?
    regards
    Janetta

    Hello,
    We installed BOE4 on the server, it runs perfectly, no issues.
    Install Crystal Reports for Enterprise on a laptop. It's the latest one as I checked to see if there's any later versions or patches.
    I am able to log into the BOE Enterprise system as administrator.
    Namely I have setup the Server connections per the following:
    Server Name:   <IP address>
    The check box for SSL is unchecked.
    Server Port Number:   nnnn
    Server Context:  /dswsbobje
    System display name:   <my server> External Connection
    User Name : Administrator
    It connects successfully.
    I then go and create a report against a Universe that I can see listed on my BOE 4 server.
    It then comes up with this error message:
    "Unable to Logon: There is a problem logging on to SAP BusinessObjects Enterprise.
    Please check your logon credentials and make sure your nework is properly configured before trying again.
    If problems persist please contact your Administrator."
    Architecture: 
    BOE 4 sits on Windows 2008 Server SP2
    Laptops tried it on are Windows Vista and Windows 2003 Std.
    Thanks for looking into this for me.
    Edited by: Symonds Janetta on Oct 11, 2011 12:05 AM

  • Can xcelsius use crystal report instance to display data?

    HI experts,
    Here we use live office with crystal reports to feed data to xcelsius flash. We schedule the crystal reports every day, and want to use data of the crystal report instance when user open a xcelsius flash.
    Can this be realized ?
    thanks a lot !

    Hi Sam,
    You can do this. Go to Live office and goto to the "Properties for all objects" and select the refresh tab.
    Select the option as "Latest Instance" for refresh option and then save the Excel sheet and re-import into Xcelsius.
    This would refresh the data from the latest instance of Crystal report.
    Thanks,
    Amit.

  • Can you use Crystal Reports on a webpage without having to use session?

    In all of the examples I have seen it shows using the session to store the reportdocument object between postbacks.  That means that clicking the page buttons fires a postback.  Other reporting tools such as PDF, ActiveReports, and others do not have to do this.  Is this a limitation of Crystal and a COM backend or is it just a common sample and not the only option? 
    How do you get paging to work without having to use session and do postbacks?  AJAX, Javascript, converting to a PDF, etc. would all be possible ways to not require a postback.
    My problem is that I am using SQL Server to store the session and the reportdocument object is not serializeable.  I have been told I can buy Crystal Report Server for $5000 and this will work.  But in reality I can buy other reporting tool for $500 or convert them to SQL Reporting and it will work as well.  So I am trying to be reasonable and figure out what I need to do.  That seems like a bit much to need a whole server application to serve the reports just to turn on paging for a couple of simple reports.  I'm hoping there is a way to not use session to get paging to work. 
    I have consider pushing the report into viewstate and not session.  But I would rather not push it into either.  Is this a valid option? 
    What is the typical way to handle this sort of thing?  Do you really have to push it into session to get the CrystalReportViewer control to page on an ASPX page.  What other options are there?   
    Any suggestions, thoughts, or ideas would be very much appreciated.  This is causing enough of a problem where the company is asking me to look at alternatives if we cannot solve this. 
    Best regards,
    Jon

    Acrobat doesnu2019t cause postbacks when paging because the acrobat reader installed locally, so its viewing is in a client-side control.  I imagine the same thing is the case for ActiveReports (some sort of client-side activex control installed). 
    If the winform viewer was used on in your web page, then you wouldnu2019t get postbacks either, but then you'd need Crystal Reports runtime on the client to view in that control. And placing a winviewer in a web page give me shivers...
    So, to avoid  using session, recreate the reportdocument and re-load the report on postbacks.
    As Surabh mentioned, you can serialize the report but you will have to use teh InProc RAS. There is an issue thought; you start to get load errors and otehr errors after viewing 3 reports. I belive this has been reported to R&D for a fix  comment, but I do not have and ETA at this time. The code for the InProc RAS SDK would be as follows:
               If Not IsPostBack Then
                Dim rpt As New CrystalDecisions.CrystalReports.Engine.ReportDocument
                Dim boReportClientDocument As CrystalDecisions.ReportAppServer.ClientDoc.ISCDReportClientDocument
                '           rpt.ReportAppServer = "Inproc:multithreaded"
                rpt.Load("c:inetpubwwwroot     estSerializeInprocRASEmployee Profile.rpt",
               OpenReportMethod.OpenReportByTempCopy)
                boReportClientDocument = rpt.ReportClientDocument
                Dim x As String = boReportClientDocument.DataDefController.Database.Tables(0).Name
                '     boReportClientDocument.DatabaseController.logon("sa", "admin")
                Dim convertUtil As New CrystalDecisions.ReportAppServer.Utilities.Conversion()
                Dim serializedDoc As String
                serializedDoc = convertUtil.ToString(rpt.ReportClientDocument)
                Session.Add("SerializedDoc", serializedDoc)
                'ViewState.Add("SerializedDoc", serializedDoc)
                Response.Write("The document has been serialized.")
                CrystalReportViewer1.ReportSource = boReportClientDocument.ReportSource
            Else
                Label1.Visible = False
                Button1.Visible = False
                Dim x As String
                x = ViewState("SerializedDoc").ToString()
                Dim deSerializedDoc As ISCDReportClientDocument
                Dim convertUtil As New Conversion
                deSerializedDoc = convertUtil.ToReportClientDocument(Session("SerializedDoc").ToString())
                'deSerializedDoc = convertUtil.ToReportClientDocument(ViewState("SerializedDoc").ToString())
                CrystalReportViewer1.ReportSource = deSerializedDoc
                Response.Write("You are viewing a de-Serialized report" & "<BR>")
                Response.Write(ViewState("SerializedDoc").ToString())
            End If
    [1542991 - How to serialize the ReportClientDocument using the RAS .NET SDK?|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%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333533343332333933393331%7D.do]
    - Ludek
    Edited by: Ludek Uher on Dec 9, 2011 11:16 AM

  • I can't open Crystal Report in Firefox 10. When I open Crystal Report, then Firefox show a blank screen. In IE, Avant Browser using normal.

    Hi, My Name Giang! I using Crystal Report Server Enterprise 9.2 in server. This application using Crystal Report Viewer to show report. I write a ASP file to show report. In client, I using IE, Avant Browser read report. In first time, this app show a message to view Active X Crystal Report Viewer Warning. If I choose Yes then app start normally.
    But, I using Firefox 10 to show my report. In first time, Firefox not show message warning of Active X Crystal Report Viewer. Firefox only show 1 tab page, with blank screen.
    Can't you Help me to show my report?. Do I need using 1 plugin to show Crystal Report? Thanks You very much!

    I think you need a viewer for Firefox, see http://www.sap.com/solutions/sap-crystal-solutions/query-reporting-analysis/sapcrystalviewer/index.epx => Thanks for answer, but i can't find viewer for Firefox.

Maybe you are looking for