locked
how to pass the parameters at runtime in crystal reports using c# RRS feed

  • Question

  • User-467234621 posted

    Hi

    when i run my report its prompting for input values ,
    so to stop this i need to pass my parameters during runtime in C#
    how can i do this ,i have subreports inside
    Can Somebody suggest me

    Thank you

    Monday, October 6, 2014 11:44 PM

All replies

  • User-1716253493 posted
        <CR:CrystalReportSource ID="CrystalReportSource1" runat="server">
            <Report FileName="Crystal Reports\CrystalReport.rpt">
                <Parameters>
                    <CR:ControlParameter ControlID="" ConvertEmptyStringToNull="False" 
                        DefaultValue="0" Name="id" PropertyName="" ReportName="" />
                </Parameters>
            </Report>
        </CR:CrystalReportSource>
    CrystalReportSource1.Report.Parameters[0].DefaultValue = "0";



    Tuesday, October 7, 2014 12:12 AM
  • User-510141866 posted

    Hi,

     First link the subreport with main report parameters like this

    Once complete this it should not ask the parameter value for SubReport. Main report must have equal or more parameter than subreport.

    Then map the crystal report with C#

     

    Tuesday, October 7, 2014 12:43 AM
  • User-467234621 posted

    Hi oned_gk ,

    Thanks for your reply

    How can i give the parameters to subreport 

    in my scenario,how can stop prompting the pop up asking inputs

    i have total 4 parameters called A,B for main report  C,D for sub reports

    A & C are employee id's

    B & D are dates

    suggest me please..

    Tuesday, October 7, 2014 2:01 AM