Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Multiple Numeric Values on One Parameter Post Reply Post New Topic
Author Message
dmkanz
Newbie
Newbie


Joined: 27 Sep 2016
Online Status: Offline
Posts: 18
Quote dmkanz Replybullet Topic: Multiple Numeric Values on One Parameter
    Posted: 28 Aug 2017 at 8:55am
Is there a way to create a single parameter that allows users to enter multiple numeric values separated by a comma?

I have done this before with text using the split() function but I am not clear on how to do it with a numeric value.

I have create a parameter called owner where I would like the users to enter one or multiple owners

i.e 10, 20 , 13000, etc.

My udOwner column is an integer on my table

Any help or advise would be greatly appreciated

Thanks,

DMKanz

IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 28 Aug 2017 at 9:16am
Would it work to convert the database value to text in a formula?
IP IP Logged
dmkanz
Newbie
Newbie


Joined: 27 Sep 2016
Online Status: Offline
Posts: 18
Quote dmkanz Replybullet Posted: 28 Aug 2017 at 9:39am
(if {?Owners} <> '' then cstr({Job.udOwner}) in split({?Owners},",")
else 1=1)

if i use 10,20 for my parameter nothing shows up but if I use blank everything show up.

Not sure if this is correct syntax

Also I placed this in my report > selection formulas > record and have a group header by {Job.Owner}

Thanks in advance

Edited by dmkanz - 28 Aug 2017 at 9:46am
IP IP Logged
dmkanz
Newbie
Newbie


Joined: 27 Sep 2016
Online Status: Offline
Posts: 18
Quote dmkanz Replybullet Posted: 28 Aug 2017 at 9:52am
I figured it out. Had to remove the decimals.

Thank you for the advice
IP IP Logged
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.016 seconds.