Re: Boolean field in dataset



That's not the problem either. Crystal only formats the datetime data in the
dataset extracted from sql database but not the datetime variable data that I
inserted into the dataset. Apparently, it recognized it to be datetime field
(well, it is specified as such in the dataset), and provides the datetime
format tab when edit the field but the actual output doesn't change. I get
around this problem by formatting it properly in the C# code.

I still haven't solved my error I get in the spress section of the report
using the int type flages though.



"Alpha" wrote:

> Thank you for the help. {global.Financial} was a boolean vairable value
> that I created in the dataset then change later to int so it should have
> worked. But I think the problem may not be my Crystal code but in my C# code
> in passing in 2 other fields I want to print out depending the values of
> these 2 flags. These 2 fields are 2 datetime fields. I formated these 2
> fields' output format to customize format like " Mar-1999" and it still
> prints out the full date and time.
>
> Now I'm really confused. When I format these 2 datetime fields Crystal
> gives me the datatime format tab to work with so it should recognize it as
> datetime. But doesn't matter how I change the format it would still print
> out the full date and time information.
>
>
>
> "Briscobar" wrote:
>
> > In news:3D4C111A-1ECB-4C8D-81BE-91013B5977CE@xxxxxxxxxxxxx,
> > Alpha <Alpha@xxxxxxxxxxxxxxxxxxxxxxxxx> rambled:
> > > Hi, I'm passing in 2 fields that are boolean variable from C#
> > > program. How can I verify their values in the "if" statement. I
> > > tried different ways but it either says it requires a boolean value
> > > or it requires a string. Do I need to change the flag to int in C#
> > > and just test it for 1 or 0? Thanks, Alpha
> > >
> > > WhilePrintingRecords;
> > > if {global.Financial}=TRUE THEN false ELSE true;
> > > or
> > > WhilePrintingRecords;
> > > if {global.Financial} THEN false ELSE true;
> >
> > After reading your reply, I see your problem.
> >
> > 1) Elminate the "WhilePrintingRecords;" clauses. CR is smart enough to know
> > when to apply suppression formulas; WhilePrintingRecords is redundant here.
> > 2) The second half of your formula has bad syntax.
> > if {global.Financial} THEN false ELSE true;
> > It should probably be:
> > if {global.Financial} = FALSE THEN false ELSE true;
> >
> > However, in the context of your overall formula, this makes no sense as
> > well. Your section will never suppress, as the formula will always evaluate
> > to FALSE.
> >
> > Try this (or modify it if I'm getting the suppression backwards):
> > //suppression formula
> > {global.Financial} = false
> >
> > This will suppress the section when {global.Financial} is False (or 0). If
> > this is the opposite of what you want, switch "false" to "true".
> >
> > HTH.
> >
> >
> >
> >
> >
> > --
> >
> > KB - MCNGP "silent thug" #26
> >
> > Briscobar AT gmail DOT com
> >
> > You can check out Kat's hawt pics...er, pic...at www.mcngp.com.
> >
> >
> >
.



Relevant Pages

  • Re: Dates
    ... I have never ever had any problems with a date in ISO 8601 format. ... The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value. ... System.Data.Common.DbDataAdapter.FillFromReader(Object data, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue) +260 ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: How to Validate a Date Filed.
    ... I'm writing, and the fourth test is just getting fancy; ... IsValid As Boolean = True) As DateTime ... > You can validate a date using Regular Expressions. ... > objects and setting culture to a country that uses the date format you ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Date/Time. Looked Everywhere. Urgent. Thanks.
    ... to parse a date specified in the US English format: ... DateTime dtDate = DateTime.Parse(strDate, ifProvider); ... > Dim news As New XmlDocument ... I would use a DateTime field not only just ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: SqlCeEngine.CreateDataBase() - LCID - Datepart format problem
    ... Background info on why insert in your format doesn't work: ... datetime as string, SQL CE does an implicit convert from string to ... datetime formats with their style IDs are listed in CONVERT function in SQL ...
    (microsoft.public.sqlserver.ce)
  • Re: Searching on DATETIME Fields
    ... format since it is stored internally as numeric data. ... Another option your might consider is to pass the value as a datetime ... >> Tibor Karaszi, SQL Server MVP ... >>> The field I am querying is of DATETIME data type, ...
    (microsoft.public.sqlserver.server)

Quantcast