Jump to content
Xtreme .Net Talk

Recommended Posts

  • *Experts*
Posted

I'm guessing you have the name wrong? Otherwise Crystal should not be prompting you. If that's not it, maybe Crystal has an option to "always prompt for params" or the reverse, and it needs to be set/cleared?

 

-ner

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Posted

I instantiate the report object and pass the parameter behind the scenes without using the report viewer object because I thought the viewer made it more difficult to print the report. This avoids all prompts and the user just gets the printed report on their printer. Not sure if you are trying to print directly, but hope this helps....

 

Dim oRpt As New ReportDocument

oRpt.Load("\\Server\folder\Report.rpt")

oRpt.SetDatabaseLogon("logon", "password")

oRpt.SetParameterValue("CrystalParameterName", intParameterValue)

oRpt.PrintToPrinter(1, False, 1, 1)

Posted

Found the answer to Parameter Passing Prob

 

I learned this from Brian Bischof's ebook which you can download at his website: http://www.crystalreportsbook.com/

 

You should do all your runtime customization before you preview your report in the CR Viewer. My code is below...

 

ParameterFields paramFields = new ParameterFields();

ParameterField paramField= new ParameterField();

ParameterDiscreteValue discValue = new ParameterDiscreteValue();

paramField.ParameterFieldName = "Product";

discValue.Value = textBox1.Text;

paramField.CurrentValues.Add (discValue);

paramFields.Add(paramField);

viewer1.ParameterFieldInfo = paramFields;

 

viewer1.ReportSource = new CrystalReport1();

  • 1 year later...
Posted

plz i have the same problem with prompting my value again through the crystal viewer

so if u find the solution plz help me to dont see again this prompting window

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...