Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Parse field in Crystal Reports for a Barcode created by idautomation code

Posted on 2013-12-27
2
Medium Priority
?
488 Views
Last Modified: 2013-12-27
I have a database field in my ERP application that contains a number that needs to be parsed so that only half the number gets converted to a barcode. Unfortunately I cannot add a field with the parsed number to the report so I need to do it in the code for the Crystal report. If you need for me to paste the code into this case but really don't know how to do this. I can create a field and use SQL to parse the number but don't know how to do this in the report.

Here is the top of the code and think that if I could parse the data and place the value into a variable for  "DataToEncode" this would work.

'*********************************************************************
'*  Native Barcode Generator for Crystal Reports
'*  Version 2006
'*  Copyright, IDAutomation.com, Inc. All rights reserved.
'*  Portions of this source code and process are Patent Pending.
'*
'*  Online Tutorial: www.idautomation.com/crystal/native/
'*
'*  You may incorporate this Source Code in your application
'*  only if you own a valid license from IDAutomation.com, Inc.
'*  for the associated product and the copyright notices are not
'*  removed from the source code.
'*
'*  Distributing this source code outside your
'*  organization requires a Developer License.
'*********************************************************************
Dim DataToEncode As String
Dim BarHeight As Number
Dim N_Dimension As Number
Dim IncludeCheckDigit As Boolean

'Modify the next line to connect to the data source:
DataToEncode = {HDRXXXXDEF.PO_NO}

I am trying to create a formula using the below which I use in SQL but it keeps complaining about CHARINDEX

LEFT({HDRXXXXDEF.PO_NO}, CHARINDEX('^', oh.po_no + '^') - 1)
0
Comment
Question by:tparus
[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 Comments
 
LVL 101

Accepted Solution

by:
mlmcc earned 2000 total points
ID: 39742828
Try this

LEFT({HDRXXXXDEF.PO_NO}, InStr( {HDRXXXXDEF.PO_NO} + '^','^') - 1)

mlmcc
0
 

Author Closing Comment

by:tparus
ID: 39742882
Perfect! Thanks for you help with this.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
I am showing a way to read/import the excel data in table using SQL server 2005... Suppose there is an Excel file "Book1" at location "C:\temp" with column "First Name" and "Last Name". Now to import this Excel data into the table, we will use…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

609 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