473,799 Members | 2,837 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Crystal Report parameter dialog box

I have a CrystalReportVi ewer(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.SetDat aSource(dtsRepo rtData);
crv.ReportSourc e = 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 2927
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 .ParameterField s.Item([ParamName]).AddCurrentVal ue) and then
assign the report object to the CrystalReportVi ewer.

Jay Taplin, MCP

<mo***********@ hotmail.com> wrote in message
news:11******** **************@ g44g2000cwa.goo glegroups.com.. .
I have a CrystalReportVi ewer(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.SetDat aSource(dtsRepo rtData);
crv.ReportSourc e = 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.SetDat aSource(dtsRepo rtData);
and finally assign the ReportDocument to the CrystalReportVi ewer.

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
1246
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 Reports (CR) the right tool for printing reports? I have well over 100 reports in my application and I would like to use the best tool for the job. Second, if CR is the right tool, am I using it correctly? Because it was
2
2058
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 user friendly manner and then run the report in a report viewer. I can find bits and pieces of the instructions for doing this, but I don't seem to be able to put it all together. For now I have some code that will show a file Open dialog and...
0
2075
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 data into a comboBox. One thing I noticed, however, is that this method shows me both the parameters used by the main report and parameters used by the sub-report(s).
0
1461
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, and can execute the sp in a query and get returned data. However, I can not get the report to load into the Crystal Report Viewer on the asp.net form. I am using a modal dialog window(asp.net webform) to pop up and ask them the parameter for the...
19
3882
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 ReuseParameterValuesOnRefresh="True" in a viewer, but it still doesn't work. Did anyone run into this problem. What's the solution? Please help. Thank you
4
2500
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, when a report is opened it prompts me to input the parameters values . But, in order to incorporate this report to my application, I have 3 quetions: 1- How can I send the parameters from my form directly (so there will be no prompt)? 2- How can...
1
6400
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 correctly. Also, print option grayed out although it was available at design time. Thanks a million! Bill
0
915
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 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;
0
1196
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 from a folder on a server. the console arguments start with the report name and everything read after that is assumed to be a parameter. if no parameters are supplied the parameter dialog appears. is it possible to get the parameter values that...
0
10482
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10251
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10225
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10027
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9072
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7564
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5463
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5585
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.