Populating Combobox runtime using query

edited June 2010 in FastReport .NET
I want to populate a combobox runtime using query on load of dialog.
How I achieve this? FYI - I want to display a DISTINCT Years from the table

Also CheckedListControl to populate with 2 fields "FirstName" and "LastName"?

THANKS IN ADVANCE

Comments

  • edited 7:47AM
    Hello,

    Use data filtering feature:
    http://fast-report.com/documentation/UserM...rhowitworks.htm

    Some report examples can be found in Demo.exe under the "Dialogs" category.
  • edited 7:47AM
    That I already checked.
    I think you are not getting my query.

    Here is my requirement.

    I have database named DB and have table CustomerMaster in that table i have "FirstName" and "lastName" filelds which I want to populated into the combobox place in dialog form.
    e.g
    Shailesh Bartakke
    Vinay Pujari

    is it possible?
  • edited 7:47AM
    The easiest way to do this is to create a new calculated column in the CustomerMaster datasource. This column will return the full name. To do this:
    - go to the "Data" window;
    - select the "CustomerMaster" datasource;
    - right-click it and select "New Calculated Column";
    - in the "Properties" window, set up the following properties of a column:
    Name = FullName
    DataType = String
    Expression = [CustomerMaster.FirstName] + " " + [CustomerMaster.LastName]

    Now you can use this column in the combobox. Put a combobox on the form and set its DataColumn property to CustomerMaster.FullName.
  • edited 7:47AM
    Hoorrrey!!!!!!!!!!!!!

    Gr8
    DONE
  • edited 7:47AM
    Hi
    Can I've the complete code please and steps
    I've a combo box . showing all the Regions which I like to select but ,It only allow me to select one.
    firstly does the ComboBox allow to select Multiple values If Yes please adivse How ?

    If not I can ListBox but can I've the code with the choice if the user can select 'All Regions' or 'Specific'
    wrote:
    If RegionRadioButton.Checked = True Then
    i = RegionNameComboBox.SelectedIndex
    RegionID = RegionIDComboBox.Items.Item(i)
    MsgBox(RegionID)
    Report.SetParameterValue("RegionID", RegionID)
    MsgBox("LastCheck",RegionID)
    End IF

    Many thanks

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.