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

Update a field in a crystal report at run time

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
Nov 21 '05 #1
5 1993
Create a parameter, then create a formula that passes the value from that
parameter into the text field.
Or
Drag the parameter onto the CR and when the report runs have a formula that
controls when the parameter supressed.
Or
If you are getting you data from a dataset just drag that field onto the
report.

http://www.wizkil-webs.net/NET/DotNe...pt_Samples.htm

Hope one of those helped.
BrianDH
"Li Pang" wrote:
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

Nov 21 '05 #2
Instead of using a blank text field, use a parameter field. Create a
parameter in your report, and then place it on your report. To pass a value
into the parameter, see if this helps:
"Li Pang" <Li****@discussions.microsoft.com> wrote in message
news:9B**********************************@microsof t.com...
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

Nov 21 '05 #3
Sorry about that--

see if this helps:
http://blogs.aspadvice.com/rjdudley/...2/21/2737.aspx
"Li Pang" <Li****@discussions.microsoft.com> wrote in message
news:9B**********************************@microsof t.com...
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

Nov 21 '05 #4
Code example using a parameter thats been placed on the report.
///
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared

Dim crReportDocument As New ReportName
Dim crParameterFieldDefinitions As ParameterFieldDefinitions
Dim crParameterFieldDefinition As ParameterFieldDefinition
Dim crParameterValues As New ParameterValues
Dim crParameterDiscreteValue As New ParameterDiscreteValue

crParameterFieldDefinitions =
crReportDocument.DataDefinition.ParameterFields()
crParameterDiscreteValue = New ParameterDiscreteValue
crParameterFieldDefinition = crParameterFieldDefinitions.Item(0)
crParameterValues = crParameterFieldDefinition.CurrentValues
crParameterDiscreteValue.Value = "Pass Value Here"
crParameterValues.Add(crParameterDiscreteValue)
crParameterFieldDefinition.ApplyCurrentValues(crPa rameterValues)

CrystalReportViewer1.ReportSource = crReportDocument
CrystalReportViewer1.Visible = True
\\\
"Li Pang" wrote:
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

Nov 21 '05 #5
BrianDH & Richard Dudley,

Thanks for your helps. It works fine by using parameters in CR.

Li

"Li Pang" wrote:
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

Nov 21 '05 #6

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

Similar topics

1
by: Scott | last post by:
Hello: I have a stored procedure for generating our invoices in Crystal Reports. I have added a new field to the SP, but when I try to add the field to my Crystal Report invoice, the field isn't...
1
by: Manal/report designer | last post by:
Thank you in advance for any suggestions... I'm using crystal reports version 8 & SQL server. I've created a report that is composed of 2 parts: 1st part contains the main report which uses...
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...
2
by: aldous scotch | last post by:
I designed a Crystal Report .rpt from within Microsoft Development Environment 2003 Version 7.1.3088 (VB .NET IDE). I selected database fields from the left side Field Explorer onto the Details...
0
by: Jeff | last post by:
Help!!! The bitmap I am trying to display in a sample Crystal Report is coming up with much less quality than the original bitmap. I have a 300x300 dpi bitmap file that I want to insert at run...
2
by: Jason Huang | last post by:
Hi, The Crystal Report bundled with .Net 2003 is version 9. How do I update the Crystal Report V9 in my .Net 2003 to Version 11 so that whenever I open a .rpt file in my VS 2003, the Crystal...
11
by: =?Utf-8?B?cmtibmFpcg==?= | last post by:
How can I stop receiving this message while calling a crystal report? "The report you requested requires further information." Thanks
6
by: Miro | last post by:
I can run an exe ( and its install ) i have created on my machine. The exe has a button that populates a dataset and then shoots it to a crystal report. But... Installing the setup.exe on my...
4
by: Miro | last post by:
<i have also added this reply to the other newsgroup - now that I have realizd ( and assuming ) it is not a localized error directly to vb.> I have found this link on the website:...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.