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

Report prompts for value (Crystal reports & VB .net)

Hello,
I have recently upgraded to VB .net 2005 and a Crystal report that
before did not use to prompt for its single parameter now does so.
I have been writing the parameter value to the report in code.

Code below

Dim crReport As New rptIssue_Filtered()

'ParameterFieldDefinitions and ParameterFieldDefinition are off
the CrystalDecisions.CrystalReports.Engine Namespace
Dim crParameterFieldDefinitions As ParameterFieldDefinitions
Dim crParameterFieldDefinition_1 As ParameterFieldDefinition

'ParameterValues and ParameterDiscreteValue are off the
CrystalDecisions.Shared namespace
Dim crParameterValues As New ParameterValues()
Dim crParameterDiscreteValue_1 As New ParameterDiscreteValue()

'*******************************
'TitleOfReport
'*******************************
'Set discrete value
crParameterDiscreteValue_1.Value = m_strTitleOfReport

'Access first parameter field definition
crParameterFieldDefinitions =
crReport.DataDefinition.ParameterFields
crParameterFieldDefinition_1 =
crParameterFieldDefinitions.Item("TitleOfReport")

' Add parameter value
crParameterValues = crParameterFieldDefinition_1.CurrentValues

crParameterValues.Add(crParameterDiscreteValue_1)

' Apply the current value to the parameter definition
crParameterFieldDefinition_1.ApplyCurrentValues(cr ParameterValues)

crParameterFieldDefinition_1.

'*******************************
'Show report
'*******************************
crReport.SetDataSource(m_datIssues.Tables(0))

CrystalReportViewer1.ReportSource = crReport

Thanks
Paul
May 11 '07 #1
0 1240

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

Similar topics

1
by: Stephan | last post by:
Hi, I'm using Visual Studio 2003 (C#) with the integrated Crystal Report software and have the following question: How can I assign a value (string) to an unbound (string) field in Crystal...
1
by: jandoca | last post by:
Hi, I am new to crystal reports and I have to build some reports and call them from an ASP page and display them. I am using Crystal Reports Developer 9.0 and the client has Professional 9.0. I...
1
by: Gudni G. Sigurdsson | last post by:
Hi. I am working on a program for the .NET Framework written in C# with Visual Studio .NET. With this program, one can print a report realized with the Crystal Report software included with VS...
2
by: Mythran | last post by:
In .Net, how can I go about and set a Crystal Reports namespace? Right now they use the Root Namespace (VB) from the project. How can I extend the namespace for a single report (which will be set...
1
by: CBKowitz | last post by:
I have an intermittent problem, when viewing a crystal report. This problem only happens to some users and some report formats. When they try to view the report in Microsoft Word format the...
1
by: Harshil | last post by:
Hi All, I am working on Vb.net application with oracle as my database. I have developed reports using crystal report 9. Usually when you open reports directly in crystal report viewer control it...
0
by: Rahul Chatterjee | last post by:
Hello All I have designed a dotnet application using VB which basically takes a selection and passes value to a crystal report which in turn passes the value to a Stored procedure. After the...
7
by: Henry | last post by:
I am writing a Windows forms VB.Net/MS SQL application via VS 2003 that utilizes Crystal Reports. I want to be able to dynamically set the report data source at run time. I'm trying to change...
0
by: kolalakitty | last post by:
Hello, I'm new to using Crystal Reports and have run into a problem. I'm currently designing a new database for a company. The front end application is being coded in C# using Visual Studio.Net...
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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...
0
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...
0
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,...

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.