Wrox Programmer Forums
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 27th, 2007, 04:26 AM
Authorized User
 
Join Date: Aug 2006
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
Default Crystal Report

hi,
I am working with vb.net and sql express. i have created a crystal report in my application. There is a field called InOut in my table,its Of Integer datatype. I would like to display the value of this field in string format.(eg:- if the value of field is 1,then i have to display it as "In" if it is 0, display it as "Out" in the crystal report.) what i have to do for this?can any one help me?
pls give me a step by step prcedure

thanks in advance..
__________________
sumith
 
Old September 27th, 2007, 04:42 AM
Authorized User
 
Join Date: Aug 2007
Posts: 70
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to yukijocelyn
Default

you can extract the data out 1st, then compare.
Say for example, I'm using a label called "lblResult" to show whether it's "In", or "Out".

Dim data as integer = dataread("InOut")
if data = 0 then
  lblResult.Text = "Out"
elseif data = 1 then
  lblResult.Text = "In"
End if

to use the dataread, you need to declare it as a DataReader 1st. It can be declared by using this,
"dim dataread as SQLDataReader = sqlcommand.exucutereader"

Hope that this helps...
 
Old September 27th, 2007, 10:45 PM
Authorized User
 
Join Date: Aug 2006
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
Default

but i need to display the details in a crystal report. in crystal report,how to write the formula?? please help me.





Similar Threads
Thread Thread Starter Forum Replies Last Post
simple report and crystal report in vb.net saket123 .NET Framework 2.0 0 August 13th, 2008 06:55 AM
VS 2002 Crystal Report opens Seagate crystal 8 tusis_1 Crystal Reports 0 May 12th, 2007 11:45 AM
Crystal Report in C# 2.0 sh.rajkumar C# 0 August 18th, 2006 11:33 PM
Crystal report help Samk Crystal Reports 2 October 13th, 2004 10:11 AM
Error While printing report (Crystal report) vikaspaweb Pro VB 6 0 March 8th, 2004 09:53 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.