Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: 'All" Post Reply Post New Topic
Page  of 2 Next >>
Author Message
gizmosilly
Newbie
Newbie
Avatar

Joined: 04 Aug 2009
Location: United States
Online Status: Offline
Posts: 26
Quote gizmosilly Replybullet Topic: 'All"
    Posted: 05 Aug 2009 at 1:28pm
I am creating a report that has a receipt # parameter where they can either choose one receipt# or all receipt#'s... I was able to get the ALL part to work but not the individual receipts any suggestions????
(this is the formula that I used I also had to convert the number field to text field in order for this to work)
{?Receipt#}='ALL' THEN
TRUE ELSE {@Recline Conversion}={?Receipt#}


Edited by gizmosilly - 05 Aug 2009 at 1:29pm
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 05 Aug 2009 at 1:56pm
{?Receipt#}='ALL' OR {?Receipt#}={@Recline Conversion}
IP IP Logged
gizmosilly
Newbie
Newbie
Avatar

Joined: 04 Aug 2009
Location: United States
Online Status: Offline
Posts: 26
Quote gizmosilly Replybullet Posted: 05 Aug 2009 at 2:03pm

DBlank thanks for responding...unfortunately that did not work all it did was return a false and it printed all the receipts.. any more suggestions?

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 05 Aug 2009 at 2:07pm
1. I assume you are using a string param type
2. Are you using a Static or Dynamic param?
3. If it is Dynamic what are the values that are pulled int it and how did you insert the word "ALL"?
IP IP Logged
gizmosilly
Newbie
Newbie
Avatar

Joined: 04 Aug 2009
Location: United States
Online Status: Offline
Posts: 26
Quote gizmosilly Replybullet Posted: 05 Aug 2009 at 2:16pm
1. Yes you are correct it is a string
2. sorry for my ignorance but I am not sure what static vs Dynamic is can you please explain
3. I put the word All in as a default value in the system parameters


Edited by gizmosilly - 05 Aug 2009 at 2:17pm
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 05 Aug 2009 at 2:18pm
Static allows you to manually build a list or just type in a value.
Dynamic is built from pulling the fields from the DB.
IP IP Logged
gizmosilly
Newbie
Newbie
Avatar

Joined: 04 Aug 2009
Location: United States
Online Status: Offline
Posts: 26
Quote gizmosilly Replybullet Posted: 05 Aug 2009 at 2:20pm
then it is Dynamic
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 05 Aug 2009 at 2:26pm
It is a drop down list automatically change when the values in the Databse change?
As I review I don't think that is what is happening.
My guess is that the @Recline Conversion formula is leaving ".00" on the end when you convert it from a Number to Text.
Try and alter that formula to:
totext({table.numberfield},0,"")
this removes all comma seperators and all decimals to match a string exactly.
Then use my original post for the select statement...
{?Receipt#}='ALL' OR {?Receipt#}={@Recline Conversion}
 
If that is not it can you post your @Recline Conversion formula?


Edited by DBlank - 05 Aug 2009 at 2:27pm
IP IP Logged
gizmosilly
Newbie
Newbie
Avatar

Joined: 04 Aug 2009
Location: United States
Online Status: Offline
Posts: 26
Quote gizmosilly Replybullet Posted: 05 Aug 2009 at 2:36pm
You are correct it is not a drop down list that automatically changes. That did not either but this time instead of just returning a false on the receipt# that i put in the parameter it did put true next to it and false next to the othe receipts.  My conversion formula is
totext({RECLINE.RECEIPT_NO})
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 05 Aug 2009 at 4:42pm

if you are matching Text / strings it has to be exact.

totext({RECLINE.RECEIPT_NO}) most likely will convert the number of
1234 to "1,234.00"
 
totext({RECLINE.RECEIPT_NO},0,"") will convert 1234 to "1234".
 
If you are using the formula I gave you ...
{?Receipt#}='ALL' OR {?Receipt#}={@Recline Conversion}  ...
as a fomrula field placed on the report detail row it will only return True OR False per row but does not alter the data coming into the report.
You have to use it in the Select Expert for it to actually filter the data.
If a user enters "ALL" then the first part of the statement ({?Receipt#}='ALL') is TRUE so the statement stops and and the report does no filtering therefore returning all data. If is is not +All then it applies the next part of the statement ({?Receipt#}={@Recline Conversion}) and filters where the string is an exact match.
Does this help? 
 


Edited by DBlank - 05 Aug 2009 at 4:44pm
IP IP Logged
Page  of 2 Next >>
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.047 seconds.