Hi,
This is what i am doing:-
ReportDocument rdReport = new ReportDocument();
rdReport.Load("ReportLocation"); //ReportLocation is the file path.
rdReport.SetDataSource(dtsReportData); //dtsReportData is a DataSet that is populated at runtime.
crv.ReportSource = rdReport; //crv is a CrystalReportViewer on the win form.
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 the DataSet 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.
It is not possible for me to know how many parameters a stored
procedure for a report will contain and what those parameters will be
for reports designed in the future for the client.
I am pretty new to the world of reporting so excuse my
explanation...if you need any further information to understand my
problem, please let me know. I will really appreciate any help that you
can provide.
Thanks,
Mounil.You need to supply the parameters in front end application and set EnablePopup menu property to false
No comments:
Post a Comment