Print Page | Close Window

'All"

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=7262
Printed Date: 29 Apr 2024 at 3:17am


Topic: 'All"
Posted By: gizmosilly
Subject: 'All"
Date 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 mailto:%7b@Recline - {@Recline Conversion}={?Receipt#}



Replies:
Posted By: DBlank
Date Posted: 05 Aug 2009 at 1:56pm
{?Receipt#}='ALL' OR {?Receipt#}= mailto:%7b?Receipt#%7d=%7b@Recline - {@Recline Conversion}


Posted By: gizmosilly
Date 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?



Posted By: DBlank
Date 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"?


Posted By: gizmosilly
Date 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


Posted By: DBlank
Date 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.


Posted By: gizmosilly
Date Posted: 05 Aug 2009 at 2:20pm
then it is Dynamic


Posted By: DBlank
Date 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#}= mailto:%7b?Receipt#%7d=%7b@Recline - {@Recline Conversion}
 
If that is not it can you post your @Recline Conversion formula?


Posted By: gizmosilly
Date 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})


Posted By: DBlank
Date 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#}= mailto:%7b?Receipt#%7d=%7b@Recline - {@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#}= mailto:%7b?Receipt#%7d=%7b@Recline - {@Recline Conversion}) and filters where the string is an exact match.
Does this help? 
 


Posted By: gizmosilly
Date Posted: 11 Aug 2009 at 12:00pm
DBlank if you are there thank you very much for your help your last entry clarified things and I was able to get my report to work.  Sorry I am just know getting back to you but my son was sick and I just came back to the office today.



Print Page | Close Window