the summarize works, the problems is , that they summarize is results are without the value behind the comma, is this correct? what can I do to receive the value behind the commas, I use the operation tab and create the code via XB.
Like that:
Regards Ralf.
Like that:
'In case the destination table name is stored as a relative file name, or uses an alias
'in the drive/path specification, use the filename_decode() function to convert the
'filename to an absolute filename.
summarize_db_name = filename_decode("Summe_Jahr_Etage.DBF")
if file.exists(summarize_db_name) then
overwrite_result = ui_msg_box("Warning","'"+summarize_db_name+"' already exists." + crlf(2) + "Would you like to overwrite it?",UI_INFORMATION_SYMBOL+UI_YES_NO)
if overwrite_result <> UI_YES_SELECTED then
end
end if
end if
dim tbl as p
tbl = table.open("zahlung")
ON ERROR GOTO ERROR02092007142453517
sum.db = summarize_db_name
sum.db_dd_delete = .F.
sum.result_overwrite = .F.
sum.order = "JAHR+STR(ETAGE,20,0)"
sum.filter = ""
sum.options = "I"
sum.fields = 7
sum.field1 = "Jahr"
sum.code1 = 0
sum.field2 = "ETAGE"
sum.code2 = 0
sum.field3 = "Grund_Euro"
sum.code3 = 1
sum.field4 = "Sonste"
sum.code4 = 1
sum.field5 = "Betriebe"
sum.code5 = 1
sum.field6 = "Gesamte"
sum.code6 = 1
sum.field7 = "Grdson"
sum.code7 = 1
'Prompt for confirmation before running the Operation.......
dim rec_count as n
rec_count = a5_get_records_in_query("zahlung",sum.filter)
message_text = rec_count + " record(s) will be summarized from 'zahlung'. The result will be stored in '"+summarize_db_name+"'."+crlf(2)+ "OK to proceed?"
operation_result=ui_msg_box("Summarize Operation",message_text,UI_OK_CANCEL+ UI_FIRST_BUTTON_DEFAULT+ UI_INFORMATION_SYMBOL)
If operation_result <> ui_ok_selected then
end
end if
tbl.summarize()
GOTO CONTINUE02092007142453517
ERROR02092007142453517:
ON ERROR GOTO 0
ui_msg_box("Error","Error running Summarize Operation"+crlf()+error_text_get())
END
CONTINUE02092007142453517:
tbl.close()
'Add the table just created by the Summarize operation to the Database..
file_add_to_db(summarize_db_name)
'Display the results of the Operation using the default Browse for the resulting table
a5_open_default_browse(summarize_db_name)
'in the drive/path specification, use the filename_decode() function to convert the
'filename to an absolute filename.
summarize_db_name = filename_decode("Summe_Jahr_Etage.DBF")
if file.exists(summarize_db_name) then
overwrite_result = ui_msg_box("Warning","'"+summarize_db_name+"' already exists." + crlf(2) + "Would you like to overwrite it?",UI_INFORMATION_SYMBOL+UI_YES_NO)
if overwrite_result <> UI_YES_SELECTED then
end
end if
end if
dim tbl as p
tbl = table.open("zahlung")
ON ERROR GOTO ERROR02092007142453517
sum.db = summarize_db_name
sum.db_dd_delete = .F.
sum.result_overwrite = .F.
sum.order = "JAHR+STR(ETAGE,20,0)"
sum.filter = ""
sum.options = "I"
sum.fields = 7
sum.field1 = "Jahr"
sum.code1 = 0
sum.field2 = "ETAGE"
sum.code2 = 0
sum.field3 = "Grund_Euro"
sum.code3 = 1
sum.field4 = "Sonste"
sum.code4 = 1
sum.field5 = "Betriebe"
sum.code5 = 1
sum.field6 = "Gesamte"
sum.code6 = 1
sum.field7 = "Grdson"
sum.code7 = 1
'Prompt for confirmation before running the Operation.......
dim rec_count as n
rec_count = a5_get_records_in_query("zahlung",sum.filter)
message_text = rec_count + " record(s) will be summarized from 'zahlung'. The result will be stored in '"+summarize_db_name+"'."+crlf(2)+ "OK to proceed?"
operation_result=ui_msg_box("Summarize Operation",message_text,UI_OK_CANCEL+ UI_FIRST_BUTTON_DEFAULT+ UI_INFORMATION_SYMBOL)
If operation_result <> ui_ok_selected then
end
end if
tbl.summarize()
GOTO CONTINUE02092007142453517
ERROR02092007142453517:
ON ERROR GOTO 0
ui_msg_box("Error","Error running Summarize Operation"+crlf()+error_text_get())
END
CONTINUE02092007142453517:
tbl.close()
'Add the table just created by the Summarize operation to the Database..
file_add_to_db(summarize_db_name)
'Display the results of the Operation using the default Browse for the resulting table
a5_open_default_browse(summarize_db_name)
Comment