Re: Parameters Dialog Box
From: PJ (pj.krueger_at_erols.com)
Date: 09/28/04
- Next message: BMartins: "crUXFRichTextFormatType"
- Previous message: Bob Holmes: "Re: Can CR 8.5 and 10 coexist"
- In reply to: Robert Schuldenfrei: "Re: Parameters Dialog Box"
- Next in thread: Robert Schuldenfrei: "Re: Parameters Dialog Box"
- Reply: Robert Schuldenfrei: "Re: Parameters Dialog Box"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 28 Sep 2004 12:33:46 -0400
Bob,
This is not for the viewer, but for the report.
PJ
"Robert Schuldenfrei" <bob@s-i-inc.com> wrote in message
news:CMc6d.123390$MQ5.120807@attbi_s52...
Hi PJ and other NG members,
I tried to take your suggestion, but I did not find the
EnableParameterPrompting property in the viewer object. At least
"Intellisense" did not present this property when I entered:
crystalReportViewer1. I got the following error from the compiler:
'CrystalDecisions.Windows.Forms.CrystalReportViewer' does not contain a
definition for 'EnableParameterPrompting' What am I doing wrong?
//Use the viewer object to create plannerCode & productCode parameters
rpt1301 myReport = new rpt1301();
crystalReportViewer1.EnableParameterPrompting = False; //what I tried to do
//Step 1: assign report object to viewer
crystalReportViewer1.ReportSource = myReport;
//Step 2: reference parameterFields collection
Cheers,
Bob
--
Robert Schuldenfrei
S. I. Inc.
32 Ridley Road
Dedham, MA 02026
bob@s-i-inc.com
781/329-4828
"PJ" <pj.krueger@erols.com> wrote in message
news:%235p5LlUpEHA.1460@TK2MSFTNGP12.phx.gbl...
> Bob,
>
> I don't see the following line in your code:
> Report.EnableParameterPrompting = False
>
> This should go before you set the report source.
>
> PJ
>
>
> "Robert Schuldenfrei" <bob@s-i-inc.com> wrote in message
> news:t2T5d.165468$3l3.62194@attbi_s03...
> Hi Ido and other NG readers,
>
> I have tried to do just that. While it works, I still get the default CR
> parameter dialog box. Is my placement incorrect? See my message at the
> end
> of this reply.
>
> Thanks,
>
> Bob
> --
> Robert Schuldenfrei
> S. I. Inc.
> 32 Ridley Road
> Dedham, MA 02026
> bob@s-i-inc.com
> 781/329-4828
>
>
> "Ido Millet" <ixm7@psu.edu> wrote in message
> news:OBmKyV0oEHA.3392@TK2MSFTNGP15.phx.gbl...
>> You need to create your own dialog, feed the values directly to the
>> report
>> object
>> and thus avoid seeing the standard Crystal parameter dialog.
>>
>> hth,
>> - Ido
>> www.MilletSoftware.com
>>
>> "Stephen Martinelli" <stephenx@johnstontrading.com> wrote in message
>> news:e%23FTROtoEHA.4008@TK2MSFTNGP14.phx.gbl...
>>> Hi all....
>>>
>>> I have a vb.net (2003) app using crystal reports. All works
>> well....however,
>>> I would like to change the default dialog box Crystal reports uses to
>>> present the parameters selection. I cant find a way to change the dialog
>>> size or remove text....
>>>
>>> any help would be appreciated
>
> MESSAGE DETAIL FROM ROBERT SCHULDENFREI:
>
> Hello NG,
>
> I am having some issues with Crystal Reports for .NET. Is this the best
> News Group (NG) for such issues? I am writing in C# and not VB. The
> problem I am having currently is with parameters. I have constructed my
> own
> dialog box to pick up a single parameter (called ?plannerCode). I have
> invoked this dialog box from the load event of the form that contains the
> Viewer. I still get the default parameter screen before I get my dialog
> box. After typing in a value for the parameter, the report gets displayed
> in the Viewer correctly. I am not sure if readers here can follow the C#
> code, but I trust that the comments will suggest what I am trying to do
> and
> the order I am doing them. Thanks in advance.
>
> Bob
>
> --
> Robert Schuldenfrei
> S. I. Inc.
> 32 Ridley Road
> Dedham, MA 02026
> bob@s-i-inc.com
> 781/329-4828
>
> private void Form1301_Load(object sender, System.EventArgs e)
>
> {
>
> //Must pick up parameters first
>
> Form planProd = new PlanProd();
>
> planProd.ShowDialog();
>
> //Use the viewer object to create plannerCode & productCode parameters
>
> rpt1301 myReport = new rpt1301();
>
> //Step 1: assign report object to viewer
>
> crystalReportViewer1.ReportSource = myReport;
>
> //Step 2: reference parameterFields collection
>
> parameterFields = crystalReportViewer1.ParameterFieldInfo;
>
> //Step 3: reference the parameterField
>
> parameterField = parameterFields["plannerCode"];
>
> //Step 4: create a parameterValue object
>
> parameterDiscreteValue = new ParameterDiscreteValue();
>
> //Step 5: assign a value to the object from dialog box displayed first
>
> parameterDiscreteValue.Value = PlanProd.globalPlannerCode;
>
> //Step 6: add the parameterValue object to the CurrentValues collection
>
> parameterField.CurrentValues.Add(parameterDiscreteValue);
>
> //MessageBox.Show("Planner Code: " + PlanProd.globalPlannerCode, "Info");
>
> crystalReportViewer1.DisplayGroupTree = false;
>
> crystalReportViewer1.Zoom(75);
>
> }
>
>
>
>
- Next message: BMartins: "crUXFRichTextFormatType"
- Previous message: Bob Holmes: "Re: Can CR 8.5 and 10 coexist"
- In reply to: Robert Schuldenfrei: "Re: Parameters Dialog Box"
- Next in thread: Robert Schuldenfrei: "Re: Parameters Dialog Box"
- Reply: Robert Schuldenfrei: "Re: Parameters Dialog Box"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|