473,326 Members | 2,104 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Crystal Report, Passing parameter using parameter field

I am trying to pass the parameter with value in crystal report but it is showing NullReferenceException was unhandled.
the line showing error is
"crystalReportViewer1.ParameterFieldInfo = paramFields;"

I created the parameter field with the same name in Field Explorer.
my code look like as :

Expand|Select|Wrap|Line Numbers
  1. ParameterFields paramFields = new ParameterFields ();
  2. ParameterField paramField = new ParameterField ();
  3. ParameterDiscreteValue discreteVal = new ParameterDiscreteValue ();
  4. ParameterRangeValue rangeVal = new ParameterRangeValue ();
  5.  
  6. paramField.ParameterFieldName = "Name";
  7.  
  8. discreteVal.Value = "ABC";
  9. paramField.CurrentValues.Add (discreteVal);
  10. paramField.CurrentValues.Add (discreteVal);
  11. paramFields.Add (paramField);
  12.  
  13. crystalReportViewer1.ParameterFieldInfo = paramFields;
Jan 9 '13 #1
0 2024

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Alex Stevens | last post by:
Hi All, I have implemented my own toolbar on a form which houses the crystal reprot viewer. I would like to have a combobox to allow the user to change the zoom level to say 25 / 50 / 75 / 100...
0
by: kids_pro | last post by:
Hi there, I create a store procedure call GetPayment(@dtFrom DATETIME, @dtEnd DATETIME) After that I design a report using that store procedure I select crystal report in this case. I can...
0
by: atulmanvar | last post by:
I am using CR Viewer in ASP.net Where i created alias table. For Example Table 2 is alis of Table 1 Master Table: relates Table 1:Field 1 Master Table: relate Table 2:Field 1 While...
5
by: Li Pang | last post by:
Hi, I made a crystal report which contains a text field of empty value. I want to know how to fill this field at the run time by a variable. Andbody give a hand? Thank in advance
1
by: harikrish | last post by:
HI im facing a problem that when i export my crystal reports to pdf format using ReportDocument object's ExportToStream method, it led me the error message that Method...
0
by: Sheoak | last post by:
Hi, I am developing Crystal Reports using VC++.Net Unlike VB.Net in the VC++.Net there is no report objects. How do I change the report's page layout to landscape in the IDE and also...
1
by: darwin gonzaga | last post by:
kindly tech me how to use crystal report using mssql server
0
denny1824
by: denny1824 | last post by:
I have a crystal report that someone else wrote and already has a Formula Field if Criteria then (Count ({FirstField},{SecondField}) / Count ({FirstField})) When the Criteria is true, this...
1
by: gggram2000 | last post by:
Hey, I've tried creating a dataset so that the report displays a certain data that i query. My code looks like this: // getting the dataset string connString =...
2
by: Philluminati | last post by:
I have a crystal report which I need my application to generate. I can do it like this: ReportDocument thisReport = new ReportDocument(); thisReport.Load(inFilename); thisReport.Refresh();...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.