Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Table will not hold Post Reply Post New Topic
Author Message
sri-knight22
Newbie
Newbie
Avatar

Joined: 06 Jan 2012
Online Status: Offline
Posts: 16
Quote sri-knight22 Replybullet Topic: Table will not hold
     Posted: 10 Jan 2012 at 8:38am
I have two issues with the same field i am working with.

In my system I have 5 different types of purchase orders that can be created.  In the database these types are identified by 1, 2, 3, and 4.  I have a field in my report called PO Type and it pulls this number in.  I am trying to create a parameter that will allow a user to either look at all types or pick one.

I have tried created both a parameter that represents a number as well as a string.  The parameter is static and I pull in all values.  I also create a custom value called 'All'.  I assign descriptions to these parameters and allow multiple values. 

the first issue I have that the value field will not hold. I have added it several times, saved the report, but it always reverts back to none. 

My next problem is  when adding a record selection formula I use the following statement

(is {?POType} = 'All'
then true
else
{PO.Purchaseordertype} =  {?POType})

when I put this in Crystal tells me that where I have {?POType} a number value is required there. 


With both of these issue im not sure how to proceed.            
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 10 Jan 2012 at 9:10am
you can never cross data types in the same formula output. It has to be both numeric or both text.
You can make it a numeric parameter type with 0,1,2,3,4 as the value and descriptions 0 as ALL and whatever you need for 1-4.
Set it to allow for multiple values
 
Your select statement would be:
 
({?POType} = 0
or
{PO.Purchaseordertype} =  {?POType})
 


Edited by DBlank - 10 Jan 2012 at 9:11am
IP IP Logged
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