Baanboard.com

Go Back   Baanboard.com > Forum > Baan Quick Support: Functional & Technical > Tools Development

User login

Frontpage Sponsor

Main

Google search


Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
36%
Installation Wizard into new VRC
36%
Manual into existing VRC
7%
Manual into new VRC
22%
Total votes: 45

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 20th July 2004, 10:48
mprakash mprakash is offline
Member
 
Join Date: Jun 2004
Posts: 38
mprakash is on a distinguished road
Baan: Baan 5c - DB: Oracle, sql 2000 - OS: unix, windows2000
Sorting in the report

My requirement:

Want all the customised items sorted as per the item code excluding the project part in the report (Baa5c)
i.e, item should be sorted from 10th position of the item code

below Solution tried but doesn't work so need help:

defined a report input variable itempart and used in the report script to take only item part as shown below
say,

after.whinr140.item.1:
before.layout:
itempart = whinr140.item(10;15)

Sorted the report input variable itempart as ascending with proper sort order.

Still output is not sorting the way I want

Question:
Sort order(sort mode and sort seq) defined in the report input varible session will take into consideration if the value of the same variable is changed in the report script? and sort the records according to the new value? (which it got in the report script)

If this is not the option how can I achieve my requirement? note that we dont have the source
Reply With Quote
  #2  
Old 20th July 2004, 13:37
günther günther is offline
Guru
 
Join Date: Jan 2002
Location: Ehingen, Germany
Posts: 575
günther is on a distinguished road
Baan: IVc4 - DB: Informix - OS: HP-UX
Have a look at my thread:

http://www.baanboard.com/baanboard/s...light=advanced

to get the basics.

Try the following way:
* add a report input variable "itempart" (don't worry about the fact, that that input variable won't be set by the session script).
* sort on that variable -- This is essential, that bic_gen generates the r.write.seq.file() calls that we use.
* in the report script, add code similiar to my thread, except that you initialized your variable *before* ORIGINALFUNCTION() -- and you can remove the other stuff.

So it should look like:
Code:
|**
|* Report Script
|**

declaration:

|**
|* rename the function that will be generated by bic_repgen
|**
#define ORIGINAL.FUNCTION()     originally.generated.r.write.seq.file()
#define r.write.seq.file()      ORIGINAL.FUNCTION()

functions:

#undef  r.write.seq.file()

function        extern r.write.seq.file()
{
        |**
        |* initialize your sorting variable here, e.g.
        |**
        itempart = whinr140.item(10;15)

        |**
        |* call the original function
        |**
        ORIGINAL.FUNCTION()
}
Reply With Quote
Sponsored Links
  #3  
Old 20th July 2004, 16:03
mprakash mprakash is offline
Member
 
Join Date: Jun 2004
Posts: 38
mprakash is on a distinguished road
Baan: Baan 5c - DB: Oracle, sql 2000 - OS: unix, windows2000
Thanks

Thanks a lot Gunthar!!!!. It worked perfectly! great

I achieved my results 50%. To achieve it fully I have something left over

In Baan5, item code includes prefixed project code with it. So in any print session I cannot give a range for only the item part, and get the report for the only specific item (specif item which is there in all the projects)

for example say A and Z are the projects, A1 and Z1 are the customised items

If I select the item range in the print session as 1 to Z1, report prints all the items within this range including A1 and Z1.

How can I get the report output which containes only A1 and Z1 items?? (including 1, A1, B1, C1,.....,Z1)

Without the sourcecode is it possible to achieve?

Thanks again
Reply With Quote
  #4  
Old 21st July 2004, 07:03
günther günther is offline
Guru
 
Join Date: Jan 2002
Location: Ehingen, Germany
Posts: 575
günther is on a distinguished road
Baan: IVc4 - DB: Informix - OS: HP-UX
Post

Hmh, I see. I assume you have a standard session with input fields like cprj.f / cprj.t and item.f / item.t. That session delivers too much data for your requirement. So you could try to filter out the data that you don't want to see on the report itself (well, its not the best performance but anyway).

Since I only have IVc4, the following might work but is untested:
Code:
|**
|* Report Script
|**

declaration:

|**
|* rename the function that will be generated by bic_repgen
|**
#define ORIGINAL.FUNCTION()     originally.generated.r.write.seq.file()
#define r.write.seq.file()      ORIGINAL.FUNCTION()

functions:

#undef  r.write.seq.file()

function        extern r.write.seq.file()
{
        domain tccprj cprj.part
        domain tcitem item.part

        |**
        |* initialize your variables here
        |**
        cprj.part = ...
        item.part = ...

        if item.part >= item.f and item.part <= item.t then
            |**
            |* call the original function
            |**
            ORIGINAL.FUNCTION()
        else
            |**
            |* simply do nothing; no spooling
            |**
        endif
}
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
sorting of records in report mostrightfuture Tools Development 7 9th October 2004 07:12
Field sorting in Report manusatsangi Tools Development 4 24th February 2003 06:35
tfacp9450m000 FIBU Brush Up Kai's Forum Users Deutsches Forum 1 16th November 1999 00:00


All times are GMT +2. The time now is 06:34.


©2001-2017 - Baanboard.com - Baanforums.com