Hi,
I want to print a report based on multiple selections using a xdialog check box. It prints fine when one selection is checked.
I inserted a UI_MSG_BOX to show the variable. The problem (I think) is that the variable shows selections on different lines
Mr. Smith
Mr. Jones
I need to either get them on the same line so I can use my filter "*any(Vendor-"Name,Var-"vName)" or I need to find another filter expression.
Suggestions?
Thanks - Tom
Here is the code generated:
'Create an XDialog dialog box to prompt for parameters.
DIM SHARED vName as C
DIM SHARED varC_result as C
auto_list_vName = table.external_record_content_get("vendor","Name","Name","")
temp_count = w_count(auto_list_vName,crlf())
DELETE a_vName
DIM a_vName[temp_count] as c
a_vName.initialize(auto_list_vName)
heading_string = "Select Vendor to print"
ok_button_label = "&OK"
cancel_button_label = "&Cancel"
varC_result = ui_dlg_box("Vendor List",""%dlg%
{region}
{text=55,1:heading_string};
{endregion};
{region}
:| [.40,5vName^$$a_vName];
{endregion};
{line=1,0};
{region}
"*15=ok_button_label!OK" "15=cancel_button_label!CANCEL"
{endregion};
%dlg%)
'Execute inline Xbasic code.
ui_msg_box("vName Variable",var-"vName)
'
query.filter = "*any(Vendor-"Name,Var-"vName)"
query.order = "recno()"
'replace variables in the filter with their actual values
query.filter = convert_expression(query.filter,"V")
'Prompt user whether to print, or preview the layout. Set default to Preview
prompt_result = ui_get_print_or_preview("Preview ")
If prompt_result = "Print" then
:Report.Print("vendpos",query.filter,query.order)
Else if prompt_result = "Preview" then
:Report.Preview("vendpos",query.filter,query.order)
End if
I want to print a report based on multiple selections using a xdialog check box. It prints fine when one selection is checked.
I inserted a UI_MSG_BOX to show the variable. The problem (I think) is that the variable shows selections on different lines
Mr. Smith
Mr. Jones
I need to either get them on the same line so I can use my filter "*any(Vendor-"Name,Var-"vName)" or I need to find another filter expression.
Suggestions?
Thanks - Tom
Here is the code generated:
'Create an XDialog dialog box to prompt for parameters.
DIM SHARED vName as C
DIM SHARED varC_result as C
auto_list_vName = table.external_record_content_get("vendor","Name","Name","")
temp_count = w_count(auto_list_vName,crlf())
DELETE a_vName
DIM a_vName[temp_count] as c
a_vName.initialize(auto_list_vName)
heading_string = "Select Vendor to print"
ok_button_label = "&OK"
cancel_button_label = "&Cancel"
varC_result = ui_dlg_box("Vendor List",""%dlg%
{region}
{text=55,1:heading_string};
{endregion};
{region}
:| [.40,5vName^$$a_vName];
{endregion};
{line=1,0};
{region}
"*15=ok_button_label!OK" "15=cancel_button_label!CANCEL"
{endregion};
%dlg%)
'Execute inline Xbasic code.
ui_msg_box("vName Variable",var-"vName)
'
query.filter = "*any(Vendor-"Name,Var-"vName)"
query.order = "recno()"
'replace variables in the filter with their actual values
query.filter = convert_expression(query.filter,"V")
'Prompt user whether to print, or preview the layout. Set default to Preview
prompt_result = ui_get_print_or_preview("Preview ")
If prompt_result = "Print" then
:Report.Print("vendpos",query.filter,query.order)
Else if prompt_result = "Preview" then
:Report.Preview("vendpos",query.filter,query.order)
End if
Comment