Showing posts with label crystal. Show all posts
Showing posts with label crystal. Show all posts

Monday, March 19, 2012

Conditional suppression formula PLEASE HELP

I have Crystal reports 8.5 and Im trying to generate a report that will give all of my sales orders with the part numbers price and the address they shipped to but I keep getting alot of duplicate fields so I used a suppresion forumla below

{InvoiceDetail.PartNumber} = previous({InvoiceDetail.PartNumber})

That did a great job of eliminated the duplicates but I found out that I have some orders that are in succesion with identical part numbers and they were being suppressed so I tried this formula

{InvoiceDetail.PartNumber} and {InvoiceHeader.SONumber} = previous({InvoiceDetail.PartNumber}) and {InvoiceHeader.SONumber}

thinking that will suppress any field that has the same part number and so number but it errors our and tells me I need a boolean.

I've tried just about everything and Im sure im missing something very simple but I dont know what it is.

PLEASE HELP{InvoiceDetail.PartNumber} and {InvoiceHeader.SONumber} = previous({InvoiceDetail.PartNumber}) and {InvoiceHeader.SONumber}

The very first thing is try to find out why you are getting duplicate data. Something must be wrong with you linking.

To suppress try this:

{InvoiceDetail.PartNumber} = previous({InvoiceDetail.PartNumber}) AND {InvoiceHeader.SONumber} = previous({InvoiceHeader.SONumber})

Thursday, March 8, 2012

Conditional Page Header

Will Crystal Reports have a page header that will hide if a condition is not met or viceaversa? If so how is this done?
Example: If Company_Name = 'xyz' then unhide page header A
thanks in advance
cgInstead of hard coding the header,write a formula like :

if companyname = 'xyz' then

'Header name'

else

' '

and drag the formula in page header!

or

right click on Page header section,select Section Expert,select Common Tab,
click formula button on right of suppress button ,and write

companyname <> 'xyx'|||how exactly do i do this in Crystal? I will have to do the same for the footer too.

thanks
cg|||you mean writing the formula ?

I think you should go for 2nd option for both header and footer i.e suppress the section based on your condition.|||i tried the conditional supressing the header and it is not working.
i have tried with and with out checking the supress box with the formula in there.

this is what i have in the formula, the first 2 are the same. i was testing if it was case sensitive or not. this is a parameter field instead of a db field.

{?CustomerName} <> "Typenex Medical, LLC"
or
{?CustomerName} <> "TYPENEX MEDICAL, LLC"
or
{?CustomerName} <> "TYPENEX MEDICAL LLC"
or
{?CustomerName} <> "TYPENEX MEDICAL L.L.C."
or
{?CustomerName} <> "TYPENEX"
or
{?CustomerName} <> "TYPENEX LLC"

not sure if this makes a difference but i have version 8.5

thanks
cg|||i tried the conditional supressing the header and it is not working.
i have tried with and with out checking the supress box with the formula in there.

this is what i have in the formula, the first 2 are the same. i was testing if it was case sensitive or not. this is a parameter field instead of a db field.

{?CustomerName} <> "Typenex Medical, LLC"
or
{?CustomerName} <> "TYPENEX MEDICAL, LLC"
or
{?CustomerName} <> "TYPENEX MEDICAL LLC"
or
{?CustomerName} <> "TYPENEX MEDICAL L.L.C."
or
{?CustomerName} <> "TYPENEX"
or
{?CustomerName} <> "TYPENEX LLC"

not sure if this makes a difference but i have version 8.5

thanks
cg

You have written the expression wrong.
Whatever you have written will be always true in any condition. Just check it properly. Use

NOT (condition1 AND condition2 AND so on)|||Make it simple :

- Right click on Formula field in field explorer

- click New

-name your formula

Type this

if {?CustomerName} <> 'ABC' and {?CustomerName} <> 'XYZ' then

' '
else

'HEADER'

Drag the formula field in report where you want to print the header.

Saturday, February 25, 2012

Conditional Displaying

Hi all,

I am using Crystal reports XI R1 . Here is the problem, I have an integer field (x), i need to display three more fields (a,b,c) based on that integer field (x) when it is maximum.

for example
when max(x) then i need to display the corresponding records of a, b, and c.

Any help would be greatly appreciated.

Thanks in advance
Sudharsan.What is the database?
I think you need to write the query

Select * from table
where x=(select max(x) from table)

and design the report using that query

Friday, February 24, 2012

Condition validation on Crystal report Fields

Hi Folks,

I am CR XI..I have 2 numeric Fields in Report.I want to update the Field Data based on Below Condition.

Let us assume report Fields Like A, B

Condition: if A>10 and B=10 then B='Good'(String)
else B=B(earlier data)

Please help me out How do I apply this logic

Urgent...

ThnaksIf the field was numeric in the DB, and you want to change the value of the field in some records to an alphanumeric ('Good') you gotta problem. Create another field.|||Hi Folks,

I am CR XI..I have 2 numeric Fields in Report.I want to update the Field Data based on Below Condition.

Let us assume report Fields Like A, B

Condition: if A>10 and B=10 then B='Good'(String)
else B=B(earlier data)

Please help me out How do I apply this logic

Urgent...

Thnaks

you can't update field of your data base and which are used in
crystal report.

you would have create a formula to it.