Hi,
I have two tableboxes on my form and either the form or the tableboxes are bound to a table named G/L Entry. These tableboxes opens with the control of a checkbox.
TableBox1 has 10 fields and Tablebox2 has 3(date, no, username). What I want to do is when I press the button TableBox2.visible=true (and TableBox1.Visible=false) and I want to group records of TableBox2 for 2 fields(date and no). Visible property is ok but I cannot group records in TableBox2. There are lots of entries for TableBox2 with the same date and no. I want to show the same records with one row.!!
By the way the fields I want to group by is a key in related table.
I don't want to use temporary table in order the form run faster.
Can someone please help me???
The code goes something like this...;
reset;
...(some setfilter statements for the table)
IF chkbox = true then begin //open tablebox2
//GROUPING RECORDS MUST BE IN HERE
currform.tablebox2.visible(true);
currform.tablebox1.visible(false)
END ELSE BEGIN
currform.tablebox2.visible(false);
currform.tablebox1.visible(true)
END;
Thanks a lot...
0
Comments
Nothing has changed..!!!
1:"Entry No."
3:"G/L Account No."
4:"Posting Date"
with primary key, the first field and as secondary key Fields 3 and 4.
These you can update in codeunit 12, Function "FinishCodeunit()", just after the command "GLEntry.INSERT;".
After this command, run a function (Eg. "InsertGLEntryGrouping()" that inserts a record in the new table if necessary. You don't have to worry about a unique primary key. The record "GLEntry" takes care of this, because this one is unique.
The negative effect is that posting will be slowed a little because you have to create extra records in a new table. To not slow it too much, try to limit as much the fields and the indexes in the new table.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Let me tell what i want to do.
I have a form based on GL Entry table and there are two tableboxed in it. One is GL Entry records and the other is grouped records. In the first tablebox there is no problem. 203k of rows are displayed.
There is a filter selection in the form and users can filter the records as they wish. There is a checkbox whether they want to see summary or detail. Detail is GL Entry table box and this is ok. But when user want summary i want to group those records of GL Entry with Document No and Posting Date. This must be so easy without using temporary table. I want to group records of filtered GL Entry table with Document No and Posting Date.
You can skip the records you don't want to see and use variables for the totals.
However I think a Temptable is faster and easier.
The first tablebox is
SELECT * FROM [Company Name$G_L Entry] WHERE user based filter.
I want the second one would be
SELECT "Document No", "Posting Date" FROM [Company Name$G_L Entry] WHERE user based filter GROUP BY "Document No", "Posting Date";
This must be the fastest way, cause if you use temporary table, you first read from database, then write to temp table with grouping, then read from temp table again. But in SQL logic you can read once with the filters and groups and display.
Am I wrong???
But this requires a new table and a new form.