Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Crystal Reports Record Select using Starts With Parameter

Posted on 2014-01-10
6
Medium Priority
?
2,622 Views
Last Modified: 2014-01-16
Is it possible to have a Record Select using a "Starts With" pattern from a parameter prompt?

My Order Numbers have multiple Job Numbers associated, example:
OrderNo: 110954
JobNo: 110954-01, 110954-02, 110954-03, 110954-04... 110954-25
The "-" dash numbers represent subassemblies related to the OrderNo and master job "-01

The range of job numbers can vary so it may be easier to prompt for OrderNo and select all relative JobNo, rather than a prompting for a range of  JobNo.
0
Comment
Question by:Lee Ingalls
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
6 Comments
 
LVL 101

Accepted Solution

by:
mlmcc earned 2000 total points
ID: 39772300
Sure.  Just remember the selection may come to the user rather than being done on the server

{JobNoField} STARTSWITH {?OrderNo}

It might be better to use left

Left({JobNumberField},6) = {?OrderNo}

Can you build a query/view/sp in the database?
Can you use a command for the report rather than using tables?

mlmcc
0
 
LVL 9

Author Comment

by:Lee Ingalls
ID: 39772424
I needed to add a table to the Billing Rate Hours subreport for an OrderNo field. I made it a LEFT OUTER from OrderDet to TimeTicketDet... I'd say your specifying the LEFT in the formula gives me more flexibility (should I need it) by keeping the join an INNER?

The Data Source is MS SQL Server. We've recently changed how we process Orders/Jobs through our ERP -- from Job to Order specific. The canned reports prompt for JobNo and I'm attempting to re-purpose them to OrderNo prompts to include all related JobNo's.

I'm sure I could create some SQL VIEWS via the SQL Mgt Studio. I use queries for a number of Excel solutions. The others I hadn't considered; but I'm a willing student.

BudELee
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 39772619
Creating a view would allow you to convert the Job Number to drop the last several characters.  It could then be compared directly to the order number parameter.  You could also link the tables to gether.

mlmcc
0
New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

 
LVL 35

Expert Comment

by:James0628
ID: 39773214
Lee,

 You seem to be suggesting that using the Left function, instead of startsWith, would give you "more flexibility".  I don't really see that (they basically do the same thing), but maybe that's not what you meant.

 I'm also not sure how either of them would affect whether you use a Left Outer Join or an Inner Join, but I guess that might depend on why you're using a Left Outer Join.

 James
0
 
LVL 9

Author Closing Comment

by:Lee Ingalls
ID: 39783499
mlmcc, thank you; it worked as described.

James0628 I appreciate the feedback... I was mis-speaking my thought on mlmcc's use of the Left({JobNumberField},6) = {?OrderNo} in teh select forumula and interrepting that as being an alternative to my setting the additional table linkage specifically to LEFT OUTER join.
0
 
LVL 35

Expert Comment

by:James0628
ID: 39785178
OK.  I was just confused, and was trying to make sure that there wasn't more going on than we realized.

 James
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question