473,657 Members | 2,567 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem in crystal report null value

Hello everyone,
I hav been facing a problem since a few days. I'm using crystal report with .net 2005 (.Net framework 2.0). In a report I'm retrieving the values from a database table and showing it. But the problem is that if a certain field is blank in database then it's showing a complete blank white field in the report also. This is what I don't want. For example- suppose there's a field in datbase named EntryDate which is not mandatory. So for a certain row if there's an entry for EntryDate it'll show it in the report otherwise if it's blank or null in database it'll show a user defined string in the report say 'Not Available' or something like that. For this I hav tried playing with the ZeroValueString property of the respective field in the crystal report also but of no avail. How can I solve it. Plz help with some code example.
Regards.
Sep 24 '08 #1
1 2493
On Sep 24, 10:08 am, Priyam Ganguly wrote:
Hello everyone,
I hav been facing a problem since a few days. I'm using crystal report with .net 2005 (.Net framework 2.0). In a report I'm retrieving the values from a database table and showing it. But the problem is that if a certain field is blank in database then it's showing a complete blank white field in the report also. This is what I don't want. For example- suppose there's a field in datbase named EntryDate which is not mandatory. So for a certain row if there's an entry for EntryDate it'll show it in the report otherwise if it's blank or null in database it'll show a user defined string in the report say 'Not Available' or something like that. For this I hav tried playing with the ZeroValueString property of the respective field in the crystal report also but of no avail. How can I solve it. Plz help with some code example.
Regards.
You have two options, you can either modify the query to return the
value you want instead of null using coalesce:
select coalesce( myColumn, 'N/A') ...

or you can modify how the field is displayed in the screen, you can
create a formula and take care of this in the report designer
Sep 24 '08 #2

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

Similar topics

0
2597
by: Max | last post by:
Hi wise people, Has anyone encountered the Crystal Reports problem I describe below? If so, how did you solve it? It seems that every article posted on google regarding CR and logon problems is still unanswered. I think I'm cursed. I originally created a crystal report which connects to a sql server server db on the same dev machine and it worked just fine. I tried to move it to another computer, but now I have to connect to an Oracle...
3
2535
by: michael haller | last post by:
In my project i have a textfile witch i import in my c# application. The datas in the textfile i show the datas in the textfile in my datagrid..ok that ist not my problem. Now i have a dataset (dataset.xsd the name is ds_BESR). How i can my datas in the datagrid into this dataset ds_BESR? Please help me...i need that. the reasen is my crystal report get the datas
0
6297
by: mharris | last post by:
I need help with merging two Word documents into one through C# code. The problem isn't so much getting the documents put into one as it is maintaining the appropriate formatting, or rather reformating, after the merge. This is a full description of my needs. I have a C# class library that creates two Crystal Reports, and then exports them to the harddrive as Word documents. One's orientation is landscape, the other is portrait. I then...
0
2063
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).
2
19330
by: PK | last post by:
Hi, I have an application that opens a Crystal report document and passes in a value to a parameter in the report (pointing to an Oracle DB). However, if I want to pass a "null" value to retrieve all records that have no data for the specified field that the parameter is a condition of (ie. SELECT * from <table> where <field> is null"), it returns nothing. I think CR is building the SQL statement like "SELECT * from <table> where <field>...
1
3554
by: Hardy Wang | last post by:
Hi all, I have a piece of code in my C# console application to export from crystal report files to PDF. For some reports files, I get errors below. I have Crystal Reports 8.5 with service pack installed on my local machine. What is the reason to cause this "Unknown Query Engine Error"? This is a report with 3 sub-reports, is there anything missing in my code to handle this type of reports? Thanks a lot! =====================Error Call...
0
7414
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 time into a Crystal Report. The path to the file is stored in a varchar(100) field in a table in SQL Server. The Crystal Report displays the bitmap in the IBlobField object but it
7
6702
by: Jlo | last post by:
Hi, I have a c# winforms application. When I call the report file, it shows me all the records in the table. How can I make it to call only a particular range. i have the following code Viewer1.ReportSource = Application.StartupPath + "//Label.rpt"; How can I assign it a dataset which have the data of a particular range.
1
4294
by: Priyam Ganguly | last post by:
Hello everyone, I hav been facing a problem since a few days. I'm using crystal report with vb.net 2005 (.Net framework 2.0). In a report I'm retrieving the values from a database table and showing it. But the problem is that if a certain field is blank in database then it's showing a complete blank white field in the report also. This is what I don't want. For example- suppose there's a field in datbase named EntryDate which is not mandatory....
0
8397
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8310
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8827
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
8732
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
8503
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
8605
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
7333
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...
0
4158
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...
1
2731
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.