You must Sign In to post a response.
  • Category: ASP.NET

    Pass text box values from one form to crystal report with out saving anyware

    I am using visual studio 2010, I need to take 30 number of text box values from one form and pass it to a crystal report for a windows application. how can i do this.
  • #762511
    Hi

    you can add sql parameters and include the crystal report after get and drag and drop in your crystal report.

    You can go through Below links for passing parameters

    http://www.codeproject.com/Articles/9263/How-to-pass-discrete-parameters-to-Crystal-Reports

    http://csharp.net-informations.com/crystal-reports/csharp-crystal-reports-string-parameter.htm

    http://imar.spaanjaars.com/310/passing-multiple-parameters-to-a-crystal-report-programmatically

    http://www.c-sharpcorner.com/Blogs/548/passing-parameters-to-crystal-reports-at-runtime-with-C-Sharp.aspx

    Name : Dotnet Developer-2015
    Email Id :kumaraspcode2009@gmail.com

    'Not by might nor by power, but by my Spirit,' says the LORD Almighty.

  • #762516
    Hello Silson,

    In most of the cases i have noticed that crystal report generates from database values or with some fields or parameters.

    Or else you can make that textboxes's modifiers to public and you can access that textboxe's value while generating report by creating object of that form class.

    Sample code :

    create parameter field in crystal report design and give name as you want. I have given "cmpname".

    set the value like this:

    Form1 f = new Form1();

    CashMemoReport cmr = new CashMemoReport();
    cmr.SetParameterValue("cmpname", f.TextBox1.Text);


    Hope this will work for you.
    Let me know if you still facing the problem.

    Regards,
    Nirav Lalan
    DNS Gold Member
    "Failure is the path of least persistence"


Sign In to post your comments