Re: Parameters Dialog Box

From: PJ (pj.krueger_at_erols.com)
Date: 09/28/04


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);
>
> }
>
>
>
>


Relevant Pages

  • Re: Parameters Dialog Box
    ... EnableParameterPrompting property in the viewer object. ... > This should go before you set the report source. ... > Robert Schuldenfrei ... >>> I have a vb.net app using crystal reports. ...
    (microsoft.public.vb.crystal)
  • Re: Parameters Dialog Box
    ... Bob, ... The report is what needs the parameter prompting turned off. ... ReportSource in the viewer to myReport ... >> Dedham, MA 02026 ...
    (microsoft.public.vb.crystal)
  • Re: SpecialVarFieldDefinition
    ... Brian Bischof ... >> the report in the viewer, calling ShowLastPage() and then calling ... >> the viewer or see the pages bouncing around, ...
    (microsoft.public.vb.crystal)
  • Landscape orientation Crystal Viewer
    ... I thought I could adjust the viewer properties without any further aid from ... When I send the report to the viewer, using the statements listed below, the ... > place a crystal report viewer on the form, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Parameters Dialog Box
    ... This should go before you set the report source. ... >> I have a vb.net app using crystal reports. ... MESSAGE DETAIL FROM ROBERT SCHULDENFREI: ... in the Viewer correctly. ...
    (microsoft.public.vb.crystal)