[REPORTS] merging two equal sections into one

Boom-Box
Member Posts: 27
Hello,
by such a title, I probably scared some people... but there's no way I can resume my doubts in one sentence...
I faced the following problem with a report:
I had one DataItem (BankAccountLedgerEntry1) to which I wanted to set a group of conditions, filters and ranges and print the results; then, I must reset all conditions and give a new set of filters and ranges, get the results and print them in the same body!
In order to make it possible for the record to obey to this different and sometimes antagonistic conditions, I used a Integer DataItem and made BankAccountLedgerEntry1 dependent of it.
so now I Have the followiing code:
And now comes my real report problem:
Instead of putting all the lines in the same body, I get two equal sections (with different records, the ones I want) but I would like to merge it into the same body...
is this possible?how can I do it?
Thanks In Advance,
michael
by such a title, I probably scared some people... but there's no way I can resume my doubts in one sentence...
I faced the following problem with a report:
I had one DataItem (BankAccountLedgerEntry1) to which I wanted to set a group of conditions, filters and ranges and print the results; then, I must reset all conditions and give a new set of filters and ranges, get the results and print them in the same body!
In order to make it possible for the record to obey to this different and sometimes antagonistic conditions, I used a Integer DataItem and made BankAccountLedgerEntry1 dependent of it.
so now I Have the followiing code:
BankAccountLedgerEntry1 - OnPreDataItem() CASE RecordLoop1.Number OF 1: BEGIN ... END; 2: BEGIN .... END
And now comes my real report problem:
Instead of putting all the lines in the same body, I get two equal sections (with different records, the ones I want) but I would like to merge it into the same body...
is this possible?how can I do it?
Thanks In Advance,
michael
0
Answers
-
If I understood you...
Process bankaccount with first set of filters and store the records in a bankaccount temptable.
Process integer with the second set of filters and store the records in the SAME bankaccount temptable
Delete your sections
Create one new integer section (setrange number,1,temptable.count)
process the temp tableusing the "NEXT" statement and show your temptable fields in this section.
code in this new integer aftergetrecord:if number = 1 then temptable.findfirst else temptable.next
if I guess what you want, you can use another bankaccount dataitem instead of YOUR integer dataitem.
Hope it's clear0 -
HI AGAIN,
i found a different solution...
both the Header and footer now belong to the integer, and the ledgerEntry only print as body!
i also have to check if I have record or not to show the section or not:IF BankAccountLedgerEntry1.COUNT = 0 THEN CurrReport.SHOWOUTPUT(FALSE);
this is worknig right now!
thanks for your help!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