Re: Boolean field in dataset
- From: "Alpha" <Alpha@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 13 May 2005 12:56:03 -0700
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.
> >
> >
> >
.
- References:
- Boolean field in dataset
- From: Alpha
- Re: Boolean field in dataset
- From: Briscobar
- Re: Boolean field in dataset
- From: Alpha
- Boolean field in dataset
- Prev by Date: Re: Boolean field in dataset
- Next by Date: VB6 Export to MAPI Runtime Error on Export
- Previous by thread: Re: Boolean field in dataset
- Next by thread: Re: Have VS.NET2003 EA w/CR-for-.NE, can I install Crystal 10 Pro on same box?
- Index(es):
Relevant Pages
|