How to use or simulate INCSTR in new VS report environment

victor73
Member Posts: 55
Hello I have the following Issue:
in a report header section as GL Entry (in classic client navision 2009) i need to simply
view a text using the following code line
VAT Register, Header (2) - OnPreSection()
CurrReport.SHOWOUTPUT(Type = Type::Sale);
IF Type = Type :: Sale THEN BEGIN
IF gBlnFirstPage THEN
gBlnFirstPage:= FALSE
ELSE
gCodNoSeriesForPage:= INCSTR(gCodNoSeriesForPage);
END
lets focus on the following line: gCodNoSeriesForPage:= INCSTR(gCodNoSeriesForPage);
this obviously increases the string (a series number)
I know that The trigger is not supported in RDLC environment, so I tried to define a textbox in the VAT Register, Header (2) - OnPreSection() in nav client
and set its sourexpr to a function that does what the OnPreSection exactly does: it returns the string increased by 1.
On the Classic nav client it works but I don't know how I can do the same exaclty thing in the rdlc side (in Visual Studio).
Can someone help me?
Thank you in advance
in a report header section as GL Entry (in classic client navision 2009) i need to simply
view a text using the following code line
VAT Register, Header (2) - OnPreSection()
CurrReport.SHOWOUTPUT(Type = Type::Sale);
IF Type = Type :: Sale THEN BEGIN
IF gBlnFirstPage THEN
gBlnFirstPage:= FALSE
ELSE
gCodNoSeriesForPage:= INCSTR(gCodNoSeriesForPage);
END
lets focus on the following line: gCodNoSeriesForPage:= INCSTR(gCodNoSeriesForPage);
this obviously increases the string (a series number)
I know that The trigger is not supported in RDLC environment, so I tried to define a textbox in the VAT Register, Header (2) - OnPreSection() in nav client
and set its sourexpr to a function that does what the OnPreSection exactly does: it returns the string increased by 1.
On the Classic nav client it works but I don't know how I can do the same exaclty thing in the rdlc side (in Visual Studio).
Can someone help me?
Thank you in advance
0
Comments
-
Hello to all mibuso collaborators, can anybody give me an answer, or try to do so, to my topic?
Thank you in advance0 -
So you need to code INCSTR in .NET?
Well parse the string backwards until you get to something that's not a number. From that point to end of the string is the number you want to increment. Use something Int16 or Int32.Parse to convert the string to a number. Add 1 to it and append it to the part of the first string that came before the number.0 -
Thank you for your response,
Exactly not,
My issue is how to transform the line codes in OnPreSection trigger of the classic report client into the new reporting client and at that point precisely where and how to put my INCSTR function (using the suggestions you have just made),
thank you0 -
why does your code need to be onpresection? and not onaftergetrecord trigger?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