Solved

Crystal Reports Record Select using Starts With Parameter

Posted on 2014-01-10
6
2,201 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
  • 2
  • 2
  • 2
6 Comments
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 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 7

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 100

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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 34

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 7

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 34

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

708 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now