Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: IN Formula with Many Parameters Post Reply Post New Topic
Author Message
igendreau
Newbie
Newbie


Joined: 15 May 2008
Online Status: Offline
Posts: 12
Quote igendreau Replybullet Topic: IN Formula with Many Parameters
    Posted: 08 Aug 2018 at 5:13am
So I was asked to write a report that shows sales within a 50 miles radius. I used a tool on the web to generate the 977 zip codes that are included in that radius. But when I write my formula:

{MyTable.MyField} in {"19508", "19543", "19875"} (except with my 977 zip codes pasted here) I keep getting an error that "The matching " for this string is missing".

I've tried bringing it into notepad, copying and pasting it multiple ways. Is there a limit to how long a list of values like that can be in Crystal? Or is there a better way that I can do this?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 09 Aug 2018 at 9:49am
I am not sure about the length of a specific item like that.
Your sure they are all double quotes and not any single quotes next to each that look like a double quote?
You can also try and break it into parts with an OR between each subpart
(
{MyTable.MyField} in ["19508", "19543", "19875"]
Or
{MyTable.MyField} in ["19509", "19544", "19876"]
OR
{MyTable.MyField} in ["19510", "19545", "19877"]
)

maybe add a table or stored proc as a temp table result of the 977 rows that is the list and just join it to limit?
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.031 seconds.