hi all...
i want to create reports using sales shipment header
and then from this table i do query to pull another fields from customer
what i want to ask is...how to do grouping using this query fields?
thanks
this code will modify and insert to the temp table
ILETemp.reset;
ILETemp.SETRANGE("Document No.","Document No.");
ILETemp.SETRANGE("Item No.","Item No.");
IF ILETemp.FINDFIRST THEN BEGIN
// your code to modify
ILETemp.MODIFY;
END ELSE BEGIN
// Your code to insert
ILETemp.INSERT;
END;
i have 3 options
and then I set 3 conditions
here is the scenario
Sales Shipment Header table
- i add field (option type : 1st,2nd,3rd)
Customer table
- I add 3 fields Field : 1,2,3
when Sales Shipment Header = 1st, then i show field 1 from customer table
when Sales Shipment Header = 2nd, then i show field 2 from customer table
when Sales Shipment Header = 3rd, then i show field 3 from customer table
until here i'm able to do it
but how to group it...
let say i put it in temporary table, is it needed 3 temp table? or just 1?
there will a condition
Sales Shipment Header (SSH), I add field named Trip (option type : 1st,2nd,3rd)
Customer (Cust), I add 3 fields : Trip 1,Trip 2,Trip 3
if in the SSH they choose 1st then I pull Trip 1 from customer table
if in the SSH they choose 2nd then I pull Trip 2 from customer table
if in the SSH they choose 3rd then I pull Trip 3 from customer table
SSHemp.reset;
SSHTemp.SETRANGE("Trip","Your variable");
IF SSHTemp.FINDFIRST THEN BEGIN
// your code to modify
SSHTemp.MODIFY;
END ELSE BEGIN
// Your code to insert
TRIP := Yourvariable;
SSHTemp.INSERT;
END;
SSHemp.reset;
SSHTemp.SETRANGE("Trip","Your variable");
IF SSHTemp.FINDFIRST THEN BEGIN
// your code to modify
SSHTemp.MODIFY;
END ELSE BEGIN
// Your code to insert
TRIP := Yourvariable;
SSHTemp.INSERT;
END;
ok... i already move it the value from variable to this temp table
it is correct in the details
but how to group it?
above code you need to write in Sales Shipment Header-OnAfterGetrecord and in Integer OnAftergetrecord you have to repeat the temp tabel from first record
TempTable.Reset;
IF TempTable.FINDSET THEN
REPEAT
//Do what ever you want
UNTIL TempTable.Next = 0;
You want to show them on Preview or you want to do any thing else?
above code you need to write in Sales Shipment Header-OnAfterGetrecord and in Integer OnAftergetrecord you have to repeat the temp tabel from first record
TempTable.Reset;
IF TempTable.FINDSET THEN
REPEAT
//Do what ever you want
UNTIL TempTable.Next = 0;
You want to show them on Preview or you want to do any thing else?
i want to show them in preview
sorted.. so i can group them
so the code i put it in Sales Shipment Header and Integer?
Comments
http://www.mibuso.com/forum/viewtopic.php?f=23&t=47629
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
hmmmm but how to do the grouping using temp table?
is there a way?
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
is it like this?
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
but how do we group it
i'm a little bit confuse
this is just an exaample..
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
i have 3 options
and then I set 3 conditions
here is the scenario
Sales Shipment Header table
- i add field (option type : 1st,2nd,3rd)
Customer table
- I add 3 fields Field : 1,2,3
when Sales Shipment Header = 1st, then i show field 1 from customer table
when Sales Shipment Header = 2nd, then i show field 2 from customer table
when Sales Shipment Header = 3rd, then i show field 3 from customer table
until here i'm able to do it
but how to group it...
let say i put it in temporary table, is it needed 3 temp table? or just 1?
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
Sales Shipment Header (SSH), I add field named Trip (option type : 1st,2nd,3rd)
Customer (Cust), I add 3 fields : Trip 1,Trip 2,Trip 3
if in the SSH they choose 1st then I pull Trip 1 from customer table
if in the SSH they choose 2nd then I pull Trip 2 from customer table
if in the SSH they choose 3rd then I pull Trip 3 from customer table
in this case, i'm using variable...
it can....
the problem is.. i cannot group this variable
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
it is correct in the details
but how to group it?
If it finds any Trip1 first time. it inserts into temp table..
second time if it finds, it vl update the existing line of temp table..
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
but my report still the same
HC
HC
AT
BU
CU
BU
AT
HC
BU
CU
by the way... do i need to fill the data item with sales shipment header?
because it is not sorted
take an integer dataitem and repeat it with temptable data
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
- Sales Shipment Header
- Integer DataItemTableView --> SORTING(Number) WHERE(Number=CONST(1))
in the section
I put it in the integer body
i pull from TempTable
but still not sorted
You want to show them on Preview or you want to do any thing else?
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
sorted.. so i can group them
so the code i put it in Sales Shipment Header and Integer?
in Integer OnPreDataItem
Remove Filter in integer dataitem
Show Data in Integer Body Sections..
It should work now..check
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
not sorted...