Solved

Crystal Reports Record Select using Starts With Parameter

Posted on 2014-01-10
6
2,311 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 8

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
Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 
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 8

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

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. …
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…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

772 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