ASCII Code in C/Side Code

sakameeran
Member Posts: 52
Hi Experts,
Is there any ways to use ASCII codes in C/SIDE Code language?
For example, In Report i am getting output as "HS0001, HS0002, HS0003" in a single variable. I want to put ASCII Code of "Enter" instead of ','.
I mean my output should be like
HS0001
HS0002
HS0003
instead of HS0001,HS0002,HS0003.
Is that possible to do so? IF any alternate solution is for this?
Is there any ways to use ASCII codes in C/SIDE Code language?
For example, In Report i am getting output as "HS0001, HS0002, HS0003" in a single variable. I want to put ASCII Code of "Enter" instead of ','.
I mean my output should be like
HS0001
HS0002
HS0003
instead of HS0001,HS0002,HS0003.
Is that possible to do so? IF any alternate solution is for this?
0
Comments
-
Use character '\' for creating new lines insteadThat's what she said!0
-
the Backspace will work in a message, but not in a report.
If you want to put it on seperate lines on a report I guess you will have to split the variable into as many texts as you want to and use an integer dataelement for output.
Example:Variables; NoOfTexts: integer Intext: Text(100) 'Text1, text2, text3' OutText: Text(30) InTextArray: Text(30) Dimensions maybe 30 or how many you need end of variables NoOfTexts = fnsplit(Intext) // splits the text into TextArray: number of commas in text + 1 - use STRPOS and a loop (FOR i := 1 to STRLEN(InText)) Integer - OnPreDataItem SETRANGE(Number,1,NoOfTexts); Integer - OnAfterGetRecord outtext = InTextTable[Number]; //then use outtext in the body section for integer
Anyway that's how I would do it
Best regards
John0 -
I am not quite sure what you are trying to do..
Simply create text box, make it MultiLine enabled and set SourceExpr to 'First Line Text\Second Line Text'That's what she said!0 -
Hi Androjdaz,
It all depends on what you have to do.
With your solution the text will always take up the same space on the report regardless of how many texts should be split and put out - maybe that's ok - we don't know from the question.
My solution takes up one line per text so if it should be split up in 4 there will be 4 lines - if it's just one it will take up one line on the report.
If you know that you will receive 3 textbits (or a maximum that fits in your textbox) your solution is much easier
br.
John0 -
[Topic moved from 'NAV 2009' forum to 'NAV/Navision' forum]Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions