473,378 Members | 1,417 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,378 software developers and data experts.

Crystal Report parameter dialog box

I have a CrystalReportViewer(crv) on my form. I also have a dataset
(dtsReportData) populated with the required data and i have a
ReportDocument (rdReport) object. The data source for the crystal
report (CR 11) is a stored procedure.

This is what i am doing:-

rdReport.Load("ReportLocation"); //ReportLocation is the file path.
rdReport.SetDataSource(dtsReportData);
crv.ReportSource = rdReport;

When the Crystal Report Viewer loads up, it brings up a dialog box
asking to enter the various parameters. I do not have different forms
(to accept the report parameters from the user) for different reports.
I have only 1 form which is dynamically generated with the required
controls (labels/textboxes/datetimepickers etc ) depending on which
report the user selects in the application.

Can any one shed some light on why this is happening and how can i get
around it? If anyone has had a similar problem and has managed to
solved it, i would love to hear how you did it.

TIA,
Mounil.

Jan 16 '06 #1
2 2898
To me your code does not look like VB code, but I'll try to give you
pointers in what I have done with VB...

I do the same thing in most of my apps. My form is dynamic, allowing for
the display of all reports from the software.

If first load the report into a Report object, set the parameter values
(mReport.Report.ParameterFields.Item([ParamName]).AddCurrentValue) and then
assign the report object to the CrystalReportViewer.

Jay Taplin, MCP

<mo***********@hotmail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
I have a CrystalReportViewer(crv) on my form. I also have a dataset
(dtsReportData) populated with the required data and i have a
ReportDocument (rdReport) object. The data source for the crystal
report (CR 11) is a stored procedure.

This is what i am doing:-

rdReport.Load("ReportLocation"); //ReportLocation is the file path.
rdReport.SetDataSource(dtsReportData);
crv.ReportSource = rdReport;

When the Crystal Report Viewer loads up, it brings up a dialog box
asking to enter the various parameters. I do not have different forms
(to accept the report parameters from the user) for different reports.
I have only 1 form which is dynamically generated with the required
controls (labels/textboxes/datetimepickers etc ) depending on which
report the user selects in the application.

Can any one shed some light on why this is happening and how can i get
around it? If anyone has had a similar problem and has managed to
solved it, i would love to hear how you did it.

TIA,
Mounil.

Jan 16 '06 #2
Hi Jay,
Thanks a lot for your reply. I am using C#. I posted this
question on various relevant NG's but did not get any reply so thought
of posting it here.

I developed my app in VS 2003 and it was all running very smoothly. I
recently migrated it to VS2005 and then I started getting this problem.
Although I dont think this is a VS 2005 issue; but something with CR
itself.

I'll try to explain my problem in detail.

I am using Crystal Reports XI; VS 2005; SQL Server 2000;

For all my reports, the reports' datasource is a Stored Procedure. And
in most cases than not, these are paramaterised SP's.
In my application, I have a listbox with a list of available reports.
The user then selects to view one report. This then loads up a
dynamically generated form with a tabpage for each of the parameters
that the Stored Procedure needs. The user then enters values for each
of the parameters. I then create a SQL statement( something like
....execute MyStoredProc value1 value2) where value1 etc are the values
the user entered for the parameters on the dynamyically generated form.
The resultant recordset is then stored into a DataSet object.

I then load the report into a ReportDocument object ie
rdReport.Load("ReportLocation"); assign DataSet to as the
ReportDocuments Datasource ie rdReport.SetDataSource(dtsReportData);
and finally assign the ReportDocument to the CrystalReportViewer.

As i mentioned earlier, this was all working smoothly untill now...I am
getting the default CR "Enter Parameters" dialog and I havent got a
clue as to what has triggered this behaviour.

Do you know what might be happening here? Also, are you able to provide
a more elaborate code snippet?

Thanks a lot,
Mounil.

Jan 16 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Robert Schuldenfrei | last post by:
Dear NG, I am learning more about Crystal Reports (CR) running under .NET. Please find my latest code at the end of this post. Here are my issues: First, and most important, is Crystal...
2
by: Henry | last post by:
I am trying to write an application that allows me to dynamically load selected Crystal Report files, read the parameters from the report file, give the user a chance to enter relevant data in a...
0
by: Henry | last post by:
Using ideas provided by some of you I was able to figure out how to get the names of the parameters fields of a crystal report specified at run time. The code below just basically puts the...
0
by: murlbrown | last post by:
I have built a report using Crystal Report 8.0, which is set to get its data from a MS SQL Stored Procedure with 1 Parameter(smalldatetime). I can get the report to display in crystal with data,...
19
by: LP | last post by:
I am using (trying to) CR version XI, cascading parameters feature works it asks user to enter params. But if page is resubmitted. It prompts for params again. I did set...
4
by: touf | last post by:
hi, I'm using Crystal reports to generate a simple report in a VB.net windows application, I've defined all my stuffs (accessMDB,query, 2 parameters) in the report design, and it's working fine,...
1
by: Bill Nguyen | last post by:
Report source is an SQLSERVER 2K store procedure. VB.NET application. Report created by CR 8.5. At runtime, I still had to click "CANCEL" to bypass the parameter prompts before the report display...
0
by: Mounilk | last post by:
I have a CrystalReportViewer(crv) on my form. I also have a dataset (dtsReportData) populated with the required data and i have a ReportDocument (rdReport) object. The data source for the crystal...
0
pankrias
by: pankrias | last post by:
ive created a vb.net windows app (vs.net 2005 crystal reports XI) to read console arguments when it is called. the console arguments are passed to the windows form and then used to access the report...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.