Hi there,
I am having a problem customising this report for a customer and was wondering if someone could point out the error of my ways please?
I need the report to be grouped at 2 different levels :=-
Level 1 Gen. Product Posting group
Level 2 Customer
I have created a new key on the value entry table as follows :-
Gen. Product Posting group, Source Type, Source No., Item No. Posting Date
I have set the main group as Gen. Product Posting group table on the report and have set the new key as the table view for data item Value Entry. I am linking on Gen. Product Posting group from Value Entry table to Code on Gen. Product Posting group table. This works fine so far.
My problem is that I cannot group on Customer as this section on the report is reporting on a temporary table, i.e. Value Entry Buffer, to group on Item No.
Has anyone got any ideas?
I basically need the report to break and print a new header for each customer within the Gen. Product Posting grouping.
Thanks in advance.
Fiona
0
Comments
Gen. Product Posting Group
Customer
Value Entry
Try the following:
- link the Value Entry to the Gen. Product Posting Group
- filter the Value Entry in the PreSection on Customer (with SETRANGE)
Add totals in the footers of DataItem 1 and 2.
This is no nice code, because you are going through every Customer as many times as you have Gen. Product Posting Groups, but it might work.
It is better you read the Value entry with the filters you want and with a good key to find the records as fast as possible.
Then you save those records (or the values) in temptables. Also in temptables other then the ones you need.
You might re-use other tables for this.
Or create a completely new table to be used only as temptable. If you use a table as a temptable, it is not necessary to have your (or better:your customers) license changed.
So create a table with primary key "Gen. Product Posting group","Customer No." and add the fields you need.
Then you begin to fill the temptable up (by reading Value Entry and adding info in the correct temptable-record) and after that, you can start printing it using virtual table "Integer".
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
I will implement as suggested and thank you for pointing me in the correct direction
Fiona
I think if you create this key and instead of trying to customize this report, you just create a new one, on Value Entries, and just set the grouping in the Report Wizard, it can accomplish most of the task automatically.
P.S. I really like your name. I always admired Celtic culture and your name just sounds like something out of Leon Uris's Trinity book. Oh sorry, it's offtopic.
I have just one more issue with this report if you have some time? I think the reason they requested to base this new report on the Customer/Item Sales report is that it groups the information on Item No.
i.e. you only see one line per Item No. per Customer. The Customer/Item Sales report used the temporary table ValueEntryBuffer to achieve this. Is there any other way to do this do you know?
Not sure if that's a clear enough description, but if not let me know?
Thanks,
Fiona
P.S. check your private messages
Haven't seen that CurrReport.TOTALSCAUSEDBY but sounds cool and exactly what I need in this situation I would imagine.
You've been a great help on this. Thanks very much !
P.S. Saw the message and will reply soon
I agree in that in the beginning working with temptables can be a little confusing, but it is best one learns it as fast as possible because in the end, it makes (the programmers') live a lot easier.
The problem is if later you have to redesign the report, you spend again time on it. And someone has to pay that time.
And remember to avoid a problem is always better then to cure it.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!