How to display calender

Hi,
Iam developing a swings application..in that i have adate column..if the user selects a date feild then in tha corresponding value column it should display the month calender for date picking..so that he can select the date from that calender and submits..
plz reply me..
regards,
sam

Plz try this one
1. DateComboBox.java
package test;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
import java.awt.event.KeyListener;
import java.awt.event.MouseEvent;
import java.awt.event.KeyEvent;
import java.awt.event.MouseAdapter;
import java.awt.Color;
import java.awt.BorderLayout;
import java.awt.GridLayout;
import java.util.Date;
import java.util.Calendar;
import java.text.SimpleDateFormat;
import javax.swing.JComboBox;
import javax.swing.JPanel;
import javax.swing.JFrame;
import javax.swing.JButton;
import javax.swing.JPopupMenu;
import javax.swing.JLabel;
import javax.swing.UIManager;
import javax.swing.JList;
import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.SwingUtilities;
import javax.swing.BorderFactory;
import javax.swing.event.PopupMenuListener;
import javax.swing.event.PopupMenuEvent;
import javax.swing.plaf.ComboBoxUI;
import javax.swing.plaf.basic.ComboPopup;
import javax.swing.border.Border;
import javax.swing.border.EtchedBorder;
import javax.swing.border.EmptyBorder;
import com.sun.java.swing.plaf.windows.WindowsComboBoxUI;
public class DateComboBox extends JComboBox
private SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
private SimpleDateFormat montFormat = new SimpleDateFormat("MM");
private int month = Integer.parseInt(montFormat.format(new Date()));
private int limit = month;
private int mbase = month;
private boolean prevLimit = false;
private boolean nextLimit = false;
public DateComboBox(boolean prevLimit, boolean nextLimit,
int prevMax, int nextMax)
this.prevLimit = prevLimit;
this.nextLimit = nextLimit;
this.mbase = month - prevMax;
this.limit = month + nextMax;
public void setDateFormat(SimpleDateFormat dateFormat)
this.dateFormat = dateFormat;
public void setSelectedItem(Object item)
removeAllItems(); // hides the popup if visible
addItem(item);
super.setSelectedItem(item);
public Object getSelectedItem()
Object obj = super.getSelectedItem();
return obj;
public void updateUI()
setUI(new WindowsDateComboBoxUI());
class WindowsDateComboBoxUI extends WindowsComboBoxUI
protected ComboPopup createPopup()
return new DatePopup( comboBox );
protected JButton createArrowButton()
return new JComboButton(1, Color.darkGray,
UIManager.getColor("ComboBox.buttonShadow"),
UIManager.getColor("ComboBox.buttonDarkShadow"),
UIManager.getColor("ComboBox.buttonHighlight"));
private class DatePopup implements ComboPopup, MouseMotionListener,
MouseListener, KeyListener, PopupMenuListener
protected JComboBox comboBox;
protected Calendar calendar;
protected JPopupMenu popup;
protected JLabel monthLabel;
protected JPanel days = null;
protected SimpleDateFormat monthFormat = new SimpleDateFormat("yyyy MMM");
protected Color selectedBackground;
protected Color selectedForeground;
protected Color background;
protected Color foreground;
public DatePopup(JComboBox comboBox)
this.comboBox = comboBox;
String[] ids = java.util.TimeZone.getAvailableIDs(+9 * 60 * 60 * 1000);
java.util.SimpleTimeZone kor = new java.util.SimpleTimeZone(+9 * 60 * 60 * 1000, ids[0]);
calendar = Calendar.getInstance(kor);
calendar.setTime(new Date());
background = UIManager.getColor("ComboBox.background");
foreground = UIManager.getColor("ComboBox.foreground");
selectedBackground = UIManager.getColor("ComboBox.selectionBackground");
selectedForeground = UIManager.getColor("ComboBox.selectionForeground");
initializePopup();
public void show()
try
calendar.setTime( dateFormat.parse( comboBox.getSelectedItem().toString() ) );
catch (Exception e) {}
updatePopup();
popup.show(comboBox, 0, comboBox.getHeight());
public void hide()
popup.setVisible(false);
protected JList list = new JList();
public JList getList()
return list;
public MouseListener getMouseListener()
return this;
public MouseMotionListener getMouseMotionListener()
return this;
public KeyListener getKeyListener()
return this;
public boolean isVisible()
return popup.isVisible();
public void uninstallingUI()
popup.removePopupMenuListener(this);
public void mousePressed( MouseEvent e ) {}
public void mouseReleased( MouseEvent e ) {}
public void mouseClicked(MouseEvent e)
if (!SwingUtilities.isLeftMouseButton(e) )
return;
if (!comboBox.isEnabled() )
return;
if (comboBox.isEditable() )
comboBox.getEditor().getEditorComponent().requestFocus();
else
comboBox.requestFocus();
togglePopup();
protected boolean mouseInside = false;
public void mouseEntered(MouseEvent e)
mouseInside = true;
public void mouseExited(MouseEvent e)
mouseInside = false;
public void mouseDragged(MouseEvent e) {}
public void mouseMoved(MouseEvent e) {}
public void keyPressed(KeyEvent e) {}
public void keyTyped(KeyEvent e) {}
public void keyReleased( KeyEvent e )
if ( e.getKeyCode() == KeyEvent.VK_SPACE ||
e.getKeyCode() == KeyEvent.VK_ENTER )
togglePopup();
public void popupMenuCanceled(PopupMenuEvent e) {}
protected boolean hideNext = false;
public void popupMenuWillBecomeInvisible(PopupMenuEvent e)
hideNext = mouseInside;
public void popupMenuWillBecomeVisible(PopupMenuEvent e) {}
protected void togglePopup()
if ( isVisible() || hideNext )
hide();
else
show();
hideNext = false;
protected JLabel createUpdateButton(final int field, final int amount)
final JLabel label = new JLabel();
final Border selectedBorder = new EtchedBorder();
final Border unselectedBorder = new EmptyBorder(
selectedBorder.getBorderInsets(new JLabel()));
label.setBorder(unselectedBorder);
label.setForeground(foreground);
label.addMouseListener(new MouseAdapter()
public void mouseReleased(MouseEvent e)
if ( prevLimit && nextLimit)
if ( (month + amount) >= mbase &&
(month + amount) <= limit)
month = month + amount;
calendar.add(field, amount);
updatePopup();
else
calendar.add(field, amount);
updatePopup();
public void mouseEntered(MouseEvent e)
label.setBorder(selectedBorder);
public void mouseExited(MouseEvent e)
label.setBorder(unselectedBorder);
return label;
protected void initializePopup()
JPanel header = new JPanel(); // used Box, but it wasn't Opaque
header.setLayout(new BoxLayout(header, BoxLayout.X_AXIS));
header.setBackground(background);
header.setOpaque(true);
JLabel label;
header.add(Box.createHorizontalStrut(25));
label = createUpdateButton(Calendar.MONTH, -1);
label.setText("<<");
label.setToolTipText("Previous Month");
header.add(label);
monthLabel = new JLabel("", JLabel.CENTER);
monthLabel.setForeground(foreground);
header.add(Box.createHorizontalGlue());
header.add(monthLabel);
header.add(Box.createHorizontalGlue());
label = createUpdateButton(Calendar.MONTH, 1);
label.setText(">>");
label.setToolTipText("Next Month");
header.add(label);
header.add(Box.createHorizontalStrut(25));
popup = new JPopupMenu();
popup.setBorder(BorderFactory.createLineBorder(Color.black));
popup.setLayout(new BorderLayout());
popup.setBackground(background);
popup.addPopupMenuListener(this);
popup.add(BorderLayout.NORTH, header);
// update the Popup when either the month or the year of the calendar has been changed
protected void updatePopup()
monthLabel.setText( monthFormat.format(calendar.getTime()) );
if (days != null)
popup.remove(days);
days = new JPanel(new GridLayout(0, 7));
days.setBackground(background);
days.setOpaque(true);
Calendar setupCalendar = (Calendar) calendar.clone();
setupCalendar.set(Calendar.DAY_OF_WEEK, setupCalendar.getFirstDayOfWeek());
for (int i = 0; i < 7; i++)
int dayInt = setupCalendar.get(Calendar.DAY_OF_WEEK);
JLabel label = new JLabel();
label.setHorizontalAlignment(JLabel.CENTER);
label.setForeground(foreground);
if (dayInt == Calendar.SUNDAY)
label.setText("Sun");
else if (dayInt == Calendar.MONDAY)
label.setText("Mon");
else if (dayInt == Calendar.TUESDAY)
label.setText("Tue");
else if (dayInt == Calendar.WEDNESDAY)
label.setText("Wed");
else if (dayInt == Calendar.THURSDAY)
label.setText("Thu");
else if (dayInt == Calendar.FRIDAY)
label.setText("Fri");
else if (dayInt == Calendar.SATURDAY)
label.setText("Sat");
days.add(label);
setupCalendar.roll(Calendar.DAY_OF_WEEK, true);
setupCalendar = (Calendar) calendar.clone();
setupCalendar.set(Calendar.DAY_OF_MONTH, 1);
int first = setupCalendar.get(Calendar.DAY_OF_WEEK);
for (int i = 0; i < (first - 1); i++)
days.add(new JLabel(""));
for (int i = 1; i <= setupCalendar.getActualMaximum(Calendar.DAY_OF_MONTH); i++)
final int day = i;
final JLabel label = new JLabel(String.valueOf(day));
label.setHorizontalAlignment(JLabel.CENTER);
label.setForeground(foreground);
label.addMouseListener(new MouseListener()
public void mousePressed(MouseEvent e) {}
public void mouseClicked(MouseEvent e) {}
public void mouseReleased(MouseEvent e)
label.setOpaque(false);
label.setBackground(background);
label.setForeground(foreground);
calendar.set(Calendar.DAY_OF_MONTH, day);
comboBox.setSelectedItem(dateFormat.format(calendar.getTime()));
hide();
comboBox.requestFocus();
public void mouseEntered(MouseEvent e)
label.setOpaque(true);
label.setBackground(selectedBackground);
label.setForeground(selectedForeground);
public void mouseExited(MouseEvent e)
label.setOpaque(false);
label.setBackground(background);
label.setForeground(foreground);
days.add(label);
popup.add(BorderLayout.CENTER, days);
popup.pack();
public static void main(String[] args)
JFrame frm = new JFrame();
frm.getContentPane().setLayout(new BorderLayout());
DateComboBox box = new DateComboBox(false, false, 12, 12);
box.setPreferredSize(new java.awt.Dimension(150, 30));
frm.getContentPane().add(box, BorderLayout.NORTH);
frm.setSize(150, 75);
frm.setLocation(500, 400);
frm.setVisible(true);
2. JComboButton.java
package test;
import java.awt.*;
import java.awt.event.*;
import javax.swing.table.*;
import javax.swing.*;
import javax.swing.plaf.basic.*;
public class JComboButton extends BasicArrowButton
Color background,shadow,darkShadow;
public JComboButton(int direction, Color background, Color shadow,
Color darkShadow, Color highlight)
super(direction,background,shadow,darkShadow,highlight);
this.background=background;
this.shadow=shadow;
this.darkShadow=darkShadow;
public void paintTriangle(Graphics g, int x, int y, int size, int direction, boolean isEnabled)
int w=getWidth()/2;
int h=getHeight();
Color oldColor=g.getColor();
g.setColor(new Color(193, 193, 193));
g.drawRect(0, 0, getWidth(), h);
g.setColor(new Color(230, 230, 230));
g.fillRect(1, 1, getWidth()-1, h-1); // this should clear the border for you
g.setColor(Color.black);
Polygon po = new Polygon(); // polygon for arrow
po.addPoint(w-2, h-9);
po.addPoint(w+2, h-9);
po.addPoint(w, h-7);
g.drawPolygon(po);
g.setColor(Color.darkGray);
g.fillPolygon(po);
g.setColor(oldColor);

Similar Messages

  • How to display Calender Please help

    Hello i am new to Java Programming not much experienced. Actually i wanna display a calender on screen. The basic idea is to find what day of the week the first of the month is and print blank columns for the days of the week before the month begins. Then, print the numbers from 1 to the end of the month, starting a new row after you get to the last day of each week.
    Here is the out put i am expecting
    C:\> java CalendarPage 6 2007 //Here in command line arguments 6
    // (Month June) and year 2007 is given.
    June 2007
    Su Mo Tu We Th Fr Sa
    1 2
    3 4 5 6 7 8 9
    10 11 12 13 14 15 16
    17 18 19 20 21 22 23
    24 25 26 27 28 29 30
    C:\>java CalendarPage //if no command line arguments are provided
    //the current month and year will be displayed
    May 2006
    Su Mo Tu We Th Fr Sa
    1 2 3 4 5 6
    7 8 9 10 11 12 13
    14 15 16 17 18 19 20
    21 22 23 24 25 26 27
    28 29 30 31
    Please Tell me how can produce such ouput. Your Help is always appriciated.

    this might help,
    to add calendar help you need to set the following attributes for the inputfield :
    type = 'DATE' showHelp = 'true'

  • How to display accounting periods in a fiscal year?

    hi gurus,
    could you please tell me how to display accounting wise calculations like AP1, AP2 ... AP12 in a given fiscal year in Bex (BI7.0)?
    please tell me the logic?
    regards

    You can create them
    Non calender year
    Non Year dependent
    Number of Periods 16, Special Periods XX (based on your requirement)
    Use -1 or +1 year shift based on your requirement.
    However, your requirement is wrong. December month is overlapping in both the years. Please recheck.
    Regards,
    Ravi

  • How to get calender in f4 helpfor select options in module pool (urgent)

    Hi All,
    how to get calender in f4 help for select options in module pool
    Please help .
    Thanx in advance,
    amruta

    Hi,
    Check this Example..
    Tables:Mara.
    Select-options:s_matnr for mara-matnr.
    Types:Begin of i_mara,
           matnr like mara-matnr,
           end of i_mara.
      data:it_mara type standard table of i_mara.
      At selection-screen on value-request for s_matnr-low.
      Select matnr from mara into table it_mara.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
        DDIC_STRUCTURE         = ' '
          RETFIELD               = 'MATNR'
        PVALKEY                = ' '
         DYNPPROG               = SY-REPID
         DYNPNR                 = SY-DYNNR
         DYNPROFIELD            = 'S_MATNR-LOW'
        STEPL                  = 0
        WINDOW_TITLE           =
        VALUE                  = ' '
         VALUE_ORG              = 'S'
        MULTIPLE_CHOICE        = ' '
        DISPLAY                = ' '
        CALLBACK_PROGRAM       = ' '
        CALLBACK_FORM          = ' '
        MARK_TAB               =
      IMPORTING
        USER_RESET             =
        TABLES
          VALUE_TAB              = IT_MARA
        FIELD_TAB              =
        RETURN_TAB             =
        DYNPFLD_MAPPING        =
       EXCEPTIONS
         PARAMETER_ERROR        = 1
         NO_VALUES_FOUND        = 2
         OTHERS                 = 3

  • How to display Caleder to select Date...Forms 6I

    I am using Oracle form 6i, DB 10G.
    In Scott schema, i made a simple data entry form to enter employee.
    In hire date column , now user entering date by keyboard, but my manager want to display calender there, so that user can select the date by mouse.
    Can you please guide me to make calender.
    Thanks

    Download oracle form 6i demo
    -How to Use the Calendar Class Demo in your Application
    1. Install the Demos that come with Oracle Forms
    2. Open the Calendar.fmb situated in C:\Forms6i_demo\Win32\PMBF\6_0_8_8\Demo\Forms
    3. Copy the Program Unit: Date_Chosen to your application
    4. Get the Object Library: STNDRD20.OLB located in C:\Forms6i_demo\Win32\PMBF\6_0_8_8\Demo\Forms
    5. Get the Attached Library: Calendar.pll located in C:\Forms6i_demo\Win32\PMBF\6_0_8_8\Demo\Forms
    6. Drag the Object Groups: Calendar from calendar.fmb to your application and copy it.
    In the item to get the date, in the Key_ListVal trigger enter the following code:
    date_lov.get_date(sysdate, -- initial date
    's_inventory.text_item5', -- return block.item
    240, -- window x position
    60, -- window y position
    'Start Date', -- window title
    'OK', -- ok button label
    'Cancel', -- cancel button label
    TRUE, -- highlight weekend days
    FALSE, -- autoconfirm selection
    FALSE); -- autoskip after selection
    In either a button when button pressed trigger or on the mouse double-click trigger of the text item that will get the date, enter the following code:
    begin
    go_block('s_inventory'); --this  is  the  block
    go_record(to_number(:system.cursor_record));
    go_item('s_inventory.Text_item5'); -- this is the item
    do_key('list_values'); --this  calls  the  Key_ListVal  trigger  of  the  item
    end;

  • Idoc-xi-file scenario.  how to display file in html format

    I am not sure whether this is a valid question.........but want to confirm as it was asked by somebody
    In idoc-xi-file scenario.......  how to display file in html format ??
    Thanks in advance
    Kumar

    Hi Vijayakumar,
    Thanks for your reply !! You mean to say I got to use XSLT mapping and also .htm and .html extension together to produce the html file ?? or it is sufficient to use any one of them to produce the html file ??
    Regards
    Kumar

  • In sap scripts how to display the driver program

    Hi,
        I Want to know the sap scripts How to display the output to driver program

    Hi,
    Go to NACE Transaction.
    Select application for ex: if sales V1.
    Click on output types.
    Select the output type for ex : BA00
    Double click on Processing routines.
    There you can find the Driver Program name and Script/smart form name.
    Reward if useful.
    Thanks,
    Raju

  • How to display username in RTF BI publisher report?

    Please advice how to display username in RTF BI publisher report?
    May be this can be done via hidden parameter of BIP report which default value will be set up with macro like {$username$} (or smth like)?
    Thanks in advance!

    Thanks. That worked. I was trying to get it as part of a multi-table query, aliasing dual. But that doesn't work in SQL Plus either so I guess I can't do that.
    I was trying
    select o.*, d.:xdo_user_name
    from oblix_audit_events o, dual d
    Before that I was trying
    select
    :xdo_user_name as USER_ID,
    :xdo_user_roles as USER_ROLES,
    :xdo_user_report_oracle_lang as REPORT_LANGUAGE,
    :xdo_user_report_locale as REPORT_LOCALE,
    :xdo_user_ui_oracle_lang as UI_LANGUAGE,
    :xdo_user_ui_locale as UI_LOCALE
    from dual
    but I must have fat fingered something because that works now too. Thanks.
    So if I need to do this in it's own query and I'm using an RTF template, how do I make that work?
    If I have to do it with it's own

  • How to display and edit the clob datatype column from Data base

    Hi ,
    I have a requiremsnt as below
    1) One Table having some columns with CLOB data type along with varchar columns
    2) need to display the data from DB in search screen and need to be edited clob column in edit screen
    I created EO and VO with that Table and how to display the clob value into the input box for editing.
    using Jdev 11.1.1.5.0 version.
    Can you please help on this.
    THanks & REgards,
    Madhu

    Hi,
    If you are using an inputText component to display a Character Large Object (CLOB), then you will need to create a custom converter that converts the CLOB to a String.
    For custom convertor refer below link,
    http://docs.oracle.com/cd/E2438201/web.1112/e16181/af_validate.htm#BABGIEDH
    (section7.4 Creating Custom JSF Converters)
    Thanks,
    Santosh M E

  • How to display URL images and URL link (html) from Smartforms?

    Hi Gurus,
    I'm having difficulty on how to display targeted URL images and URL link from the smartforms, after i sending it out as html mail. The mail i sent just can be preview as a plain text, which can't execute the html code that i put inside the smartforms itself. I follow a few step from this very useful blog.. Hopefully, you guys can give me some solutions or ideas on this.
    /people/pavan.bayyapu/blog/2005/08/30/sending-html-email-from-sap-crmerp -thanks to Pavan for his useful blog.
    My code is like this..
    <--- Start Code.
    FORM call_smartforms.
      DATA : lv_subject TYPE so_obj_des,
             lc_true(1) VALUE 'X',
             lw_control_parameters TYPE ssfctrlop,
             lw_output_options TYPE ssfcompop,
             lc_graphics(8) VALUE 'GRAPHICS',
             lw_xsfparam_line TYPE ssfxsfp,
             lc_extract(7) VALUE 'EXTRACT',
             lc_graphics_directory(18) VALUE 'GRAPHICS-DIRECTORY',
             lc_mygraphics(11) VALUE 'mygraphics/',
             lc_content_id(10) VALUE 'CONTENT-ID',
             lc_enable(6) VALUE 'ENABLE',
             lw_job_output_info TYPE ssfcrescl,
             lw_html_data TYPE trfresult,
             lw_graphics TYPE ssf_xsf_gr,
             lt_graphics TYPE tsf_xsf_gr,
             lv_html_xstr TYPE xstring,
             lw_html_raw LIKE LINE OF lw_html_data-content,
             lv_incode TYPE tcp00-cpcodepage VALUE '4110',
             lv_html_str TYPE string,
             lv_html_len TYPE i,
             lc_utf8(5) VALUE 'utf-8',
             lc_latin1(6) VALUE 'latin1',
             lv_offset TYPE i,
             lv_length TYPE i,
             lv_diff TYPE i,
             lt_soli TYPE soli_tab,
             lw_soli TYPE soli,
             lc_mime_helper TYPE REF TO cl_gbt_multirelated_service,
             lv_name TYPE mime_text VALUE 'sapwebform.htm',
             lv_xstr TYPE xstring,
             lw_raw TYPE bapiconten,
             lt_solix TYPE solix_tab,
             lw_solix TYPE solix,
             lv_filename TYPE string,
             lv_content_id TYPE string,
             lv_content_type TYPE w3conttype,
             lv_obj_len TYPE so_obj_len,
             lv_bmp TYPE so_fileext VALUE 'BMP',
             lv_description TYPE so_obj_des VALUE 'Graphic in BMP format',
             lc_doc_bcs TYPE REF TO cl_document_bcs,
             lc_bcs TYPE REF TO cl_bcs,
             lc_send_exception TYPE REF TO cx_root,
             lw_adsmtp TYPE lty_adsmtp,
             lv_mail_address TYPE ad_smtpadr,
             lc_recipient TYPE REF TO if_recipient_bcs,
             lc_send_request TYPE REF TO cl_bcs,
             lv_sent_to_all TYPE os_boolean.
      DATA : v_language TYPE sflangu VALUE 'E',
             v_e_devtype TYPE rspoptype.
      v_form_name = 'ZTEST_EMAIL'.
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          formname           = v_form_name
        IMPORTING
          fm_name            = v_namef
        EXCEPTIONS
          no_form            = 1
          no_function_module = 2
          OTHERS             = 3.
      IF sy-subrc = 0.
       break mhusin.
      ENDIF.
    starting here. ***
    Set title for the output
      lv_subject = 'Smartforms.'.
    Set control parameters to "no dialog"
      lw_control_parameters-no_dialog = lc_true.
    IF lw_service_subject-code = lc_fm1.
    *--- To get output device type
      CALL FUNCTION 'SSF_GET_DEVICE_TYPE'
        EXPORTING
          i_language    = v_language
          i_application = 'SAPDEFAULT'
        IMPORTING
          e_devtype     = v_e_devtype.
      lw_output_options-tdprinter = v_e_devtype.
      lw_control_parameters-getotf = 'X'.
      IF sy-subrc = 0.
       break mhusin.
      ENDIF.
    Set output options
      lw_output_options-xsf        = lc_true.
      lw_output_options-xsfcmode   = lc_true.
      lw_output_options-xsfoutmode = 'A'.
      lw_output_options-xsfoutdev  = space.
      lw_output_options-xsfformat  = lc_true.
      lw_xsfparam_line-name  = lc_graphics.
      lw_xsfparam_line-value = lc_extract.
      APPEND lw_xsfparam_line TO lw_output_options-xsfpars.
      lw_xsfparam_line-name  = lc_graphics_directory.
      lw_xsfparam_line-value = lc_mygraphics.
      APPEND lw_xsfparam_line TO lw_output_options-xsfpars.
      lw_xsfparam_line-name  = lc_content_id.
      lw_xsfparam_line-value = lc_enable.
      APPEND lw_xsfparam_line TO lw_output_options-xsfpars.
    Get the smartform content
      CALL FUNCTION v_namef
        EXPORTING
          control_parameters   = lw_control_parameters
          output_options       = lw_output_options
    *pass other application specific parameters (eg order number, items ).
      IMPORTING
          job_output_info    = lw_job_output_info
      TABLES
          tt_tabh              = tt_tabh
          tt_tabb              = tt_tabb
          tt_tabf              = tt_tabf
      EXCEPTIONS
          formatting_error = 1
          internal_error   = 2
          send_error       = 3
          user_canceled    = 4
          OTHERS           = 5.
      IF sy-subrc = 0.
       break mhusin.
      ENDIF.
      lw_html_data  = lw_job_output_info-xmloutput-trfresult.
      lt_graphics[] = lw_job_output_info-xmloutput-xsfgr[].
      CLEAR lv_html_xstr.
      LOOP AT lw_html_data-content INTO lw_html_raw.
        CONCATENATE lv_html_xstr lw_html_raw INTO lv_html_xstr IN BYTE MODE.
      ENDLOOP.
      lv_html_xstr = lv_html_xstr(lw_html_data-length).
      CALL FUNCTION 'SCP_TRANSLATE_CHARS'
        EXPORTING
          inbuff       = lv_html_xstr
          incode       = lv_incode
          csubst       = lc_true
          substc_space = lc_true
        IMPORTING
          outbuff      = lv_html_str
          outused      = lv_html_len
        EXCEPTIONS
          OTHERS       = 1.
    *HACK THE HTML CODE GENERATED BY SMARTFORM TO MAKE THE
    *EXTERNAL IMAGES APPEAR AS <IMG> TAG IN HTML
      REPLACE ALL OCCURRENCES OF '<IMG' IN lv_html_str WITH '<IMG' IGNORING CASE.
      REPLACE ALL OCCURRENCES OF '/>' IN lv_html_str WITH '/>' IGNORING CASE.
      REPLACE ALL OCCURRENCES OF '</A>' IN lv_html_str WITH '' IGNORING CASE.
      REPLACE ALL OCCURRENCES OF '<' IN lv_html_str WITH '<' IGNORING CASE.
      REPLACE ALL OCCURRENCES OF '>' IN lv_html_str WITH '>' IGNORING CASE.
    CALL METHOD html_control - >load_mime_object
       EXPORTING
         object_id  = 'ZWN'
         object_url = 'ZWN.GIF'
       EXCEPTIONS
         OTHERS     = 1.
      REPLACE ALL OCCURRENCES OF lc_utf8 IN lv_html_str WITH lc_latin1.
    REPLACE ALL OCCURRENCES OF lc_utf8 IN lv_html_str WITH 'iso-8859-1'.
       break mhusin.
      lv_html_len = STRLEN( lv_html_str ).
      lv_offset = 0.
      lv_length = 255.
      WHILE lv_offset < lv_html_len.
        lv_diff = lv_html_len - lv_offset.
        IF lv_diff > lv_length.
          lw_soli-line = lv_html_str+lv_offset(lv_length).
        ELSE.
          lw_soli-line = lv_html_str+lv_offset(lv_diff).
        ENDIF.
        APPEND lw_soli TO lt_soli.
        ADD lv_length TO lv_offset.
      ENDWHILE.
      CREATE OBJECT lc_mime_helper.
      CALL METHOD lc_mime_helper->set_main_html
        EXPORTING
          content     = lt_soli
          filename    = lv_name
          description = lv_subject.
      LOOP AT lt_graphics INTO lw_graphics.
        CLEAR lv_xstr.
        LOOP AT lw_graphics-content INTO lw_raw.
          CONCATENATE lv_xstr lw_raw-line INTO lv_xstr IN BYTE MODE.
        ENDLOOP.
        lv_xstr = lv_xstr(lw_graphics-length).
        lv_offset = 0.
        lv_length = 255.
        CLEAR lt_solix[].
        WHILE lv_offset < lw_graphics-length.
          lv_diff = lw_graphics-length - lv_offset.
          IF lv_diff > lv_length.
            lw_solix-line = lv_xstr+lv_offset(lv_length).
          ELSE.
            lw_solix-line = lv_xstr+lv_offset(lv_diff).
          ENDIF.
          APPEND lw_solix TO lt_solix.
          ADD lv_length TO lv_offset.
        ENDWHILE.
        CONCATENATE lc_mygraphics lw_graphics-graphics text-001 INTO lv_filename.
        CONCATENATE lc_mygraphics lw_graphics-graphics text-001 INTO lv_content_id.
        lv_content_type = lw_graphics-httptype.
        lv_obj_len      = lw_graphics-length.
    *Add images to the email
        CALL METHOD lc_mime_helper->add_binary_part
          EXPORTING
            content      = lt_solix
            filename     = lv_filename
            extension    = lv_bmp
            description  = lv_description
            content_type = lv_content_type
            length       = lv_obj_len
            content_id   = lv_content_id.
      ENDLOOP.
      TRY.
          lv_subject = lv_subject.
          lc_doc_bcs = cl_document_bcs=>create_from_multirelated(
                   i_subject          = lv_subject
                   i_multirel_service = lc_mime_helper ).
        CATCH cx_document_bcs INTO lc_send_exception.
        CATCH cx_bcom_mime INTO lc_send_exception.
        CATCH cx_gbt_mime INTO lc_send_exception.
      ENDTRY.
    Create send request
      TRY.
          lc_bcs = cl_bcs=>create_persistent( ).
        CATCH cx_send_req_bcs INTO lc_send_exception.
      ENDTRY.
      TRY.
          lc_bcs->set_document( i_document = lc_doc_bcs ).
        CATCH cx_send_req_bcs INTO lc_send_exception.
      ENDTRY.
    Set-up email receiver
      lv_mail_address = '[email protected]'.
    TRANSLATE lv_mail_address TO UPPER CASE.
      TRY.
          lc_recipient = cl_cam_address_bcs=>create_internet_address(
              i_address_string = lv_mail_address ).
        CATCH cx_address_bcs INTO lc_send_exception.
      ENDTRY.
      TRY.
          lc_bcs->add_recipient( i_recipient = lc_recipient ).
        CATCH cx_send_req_bcs INTO lc_send_exception.
      ENDTRY.
    Send smartforms as HTML email
      TRY.
          lc_bcs->send( ).
        CATCH cx_send_req_bcs INTO lc_send_exception.
      ENDTRY.
      COMMIT WORK.
      WRITE:/ 'Mail sent'.
    ENDFORM.                    "call_smartforms
    End Code --->
    Thanks and Regards.

    1- put your images in a directory under the web app directory. Example: app/images/
    2- in your jsp, use: String file = application.getRealPath("/images/"); to get the images directory. See http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html#getRealPath(java.lang.String)
    3- it's not the right forum to post this kind of question. Post them in the JSP/Servlet JSTL forum instead

  • How to Display Excel Report in Client machine  in Forms11g

    Hi All,
    we are running database in Linux server and separate Linux Application Server , But my question is how to display the data to Excel Report in the Client machine
    in Forms11g applications.
    Plesase suggest any method.
    Regards
    Venkatesulu Gunisetty

    You should use webutils.
    For proper answer, place ur request here in oracle Forms Thread,
    Forms

  • Please Help::How to display a Map with LIsts as Keys and Values using JSTL

    Hi,
    I need some assistance on how to display a Map in JSP using struts or core JSTL. I have a HashMap which has a List of keys and each key maps to a value of an ArrayList.i.e I have an ArrayList of taxCodes and each taxCode maps to a value of taxDetails which is an ArrayList of details for for that particular taxCode. I have some trouble to display each taxCode then display taxDetails for each taxCode. Here is my code below:
    OrderDetails.java
    package orderitems;
    import java.sql.*;
    import java.util.*;
    public class OrderDetails {
        private LineOder lineOrder;
        private Map lineItems;
        //returns an item number, key_item, from its unique keys
        public int getItemNumber(int key_item, String key_year,
                String key_office,String key_client,String key_company){
            Connection conn = null;
            Statement stat = null;
            ResultSet rst = null;
            int itmNum = 0;
             * key_item a unique number for an item.
             * key_year,key_office,key_client,key_company unique keys
             * for each order where this key_item is taken
             * from.
            String select = "SELECT key_item FROM "+
                    Constants.WEB_TABLE +" WHERE key_item = " + key_item +
                    " AND key_year = '" + key_year + "'" +
                    " AND key_office = '" + key_office + "'" +
                    " AND key_client = '" + key_client + "'" +
                    " AND key_company = '" + key_company +"'";
            DbConnection dbConn = new DbConnection();
            try {
                conn = dbConn.getDbConnection(Constants.WEB_JNDI);
                stat = conn.createStatement();
                rst = stat.executeQuery(select);
                if(rst.next()){
                    itmNum = Integer.parseInt(rst.getString("key_item"));
            } catch (SQLException ex) {
                ex.printStackTrace();
            } finally{
                SQLHelper.cleanUp(rst, stat, conn);
            return itmNum;
        //get a list of item number(item codes)
        public List getAllItemNumbers(String key_year,
                String key_office,String key_client,String key_company){
            List itemNumbers = new ArrayList();
            LineItem itemNumber = null;
            Connection conn = null;
            Statement stat = null;
            ResultSet rst = null;
            String select = "SELECT key_item FROM "+ Constants.WEB_TABLE +
                    " WHERE key_year = '" + key_year + "'" +
                    " AND key_office = '" + key_office + "'" +
                    " AND key_client = '" + key_client + "'" +
                    " AND key_company = '" + key_company + "'";
            DbConnection dbConn = new DbConnection();
            try {
                conn = dbConn.getDbConnection(Constants.WEB_JNDI);
                stat = conn.createStatement();
                rst = stat.executeQuery(select);
                while(rst.next()){
                    itemNumber = new LineItem();
                    itemNumber.setKey_item(Integer.parseInt(rst.getString("key_item")));
                    itemNumbers.add(itemNumber);
            } catch (SQLException ex) {
                ex.printStackTrace();
            } finally{
                SQLHelper.cleanUp(rst, stat, conn);
            return itemNumbers;
        //get a list of tax codes
        public List getAllTaxCodes(int key_item, String key_year,
                String key_office,String key_client,String key_company){
            Connection conn = null;
            Statement stat = null;
            ResultSet rst = null;
            ItemTax taxCode;
            List taxCodes = new ArrayList();
            int itemNum = getItemNumber(key_item, key_year,
                    key_office,key_client,key_company);
            String select = "SELECT key_tax_code FROM "+
                    Constants.WEB_TABLE +" WHERE key_item = " + itemNum +
                    " AND key_year = '" + key_year + "'" +
                    " AND key_office = '" + key_office + "'" +
                    " AND key_client = '" + key_client + "'" +
                    " AND key_company = '" + key_company +"'";
            DbConnection dbConn = new DbConnection();
            try {
                conn = dbConn.getDbConnection(Constants.WEB_JNDI);
                stat = conn.createStatement();
                rst = stat.executeQuery(select);
                while(rst.next()){
                    taxCode = new ItemTax();
                    taxCode.setKey_tax_code(rst.getString("key_tax_code"));
                    taxCodes.add(taxCode);
            } catch (SQLException ex) {
                ex.printStackTrace();
            } finally{
                SQLHelper.cleanUp(rst, stat, conn);
            return taxCodes;
        /////This methode returns a Map which am trying to display in JSP
        //use tax code to get tax details
        public Map getItemTaxDetails(String key_year,String key_office,
                String key_client,String key_company,int key_item){
            ItemTax taxDetail = null;
            List taxDetails = new ArrayList();
            List itemTaxCodes = new ArrayList();
            Map itemTaxDetails = new HashMap();
            Connection conn = null;
            Statement stat = null;
            ResultSet rst = null;
            //get a list of all tax codes of an item with a
            //given item number
            itemTaxCodes = getAllTaxCodes(key_item,key_year,
                    key_office,key_client,key_company);
            DbConnection dbConn = new DbConnection();
            try {
                conn = dbConn.getDbConnection(Constants.WEB_JNDI);
                stat = conn.createStatement();
                for(Iterator taxCodeIter= itemTaxCodes.iterator(); taxCodeIter.hasNext();){
                    ItemTax itemTaxCode = (ItemTax)taxCodeIter.next();
                    String taxCode = itemTaxCode.getKey_tax_code();
                    String select = "SELECT tax_type,tax_value," +
                            "tax_limit_val FROM "+ Constants.WEB_TABLE +
                            " WHERE key_item = "+ key_item +
                            " AND key_year = '" + key_year + "'" +
                            " AND key_office = '" + key_office + "'" +
                            " AND key_client = '" + key_client + "'" +
                            " AND key_company = '" + key_company +"'" +
                            " AND key_tax_code = '" + taxCode + "'";
                    rst = stat.executeQuery(select);
                    while(rst.next()){
                        taxDetail = new ItemTax();
                        //records to be displayed only
                        taxDetail.setKey_item(Integer.parseInt(rst.getString("key_item")));
                        taxDetail.setTax_value(rst.getString("tax_value"));
                        taxDetail.setTax_limit_val(Float.parseFloat(rst.getString("tax_limit_val")));
                        //////other details records ommited//////////////////////////
                        taxDetails.add(taxDetail);////An ArrayList of taxDetails for each taxCode
                     * A HashMap which has all taxCodes of an item as its keys
                     * and an ArrayList of taxdetails as its values.
                     * I return this for display in a JSP.
                    itemTaxDetails.put(taxCode,taxDetails);
                System.out.println();
                System.out.println("*********CONSOLE OUTPUT*************");//display on console
                Set set = itemTaxDetails.keySet();
                Iterator iter = set.iterator();
                System.out.println("Key\t\tValue\r\n");
                while (iter.hasNext()) {
                    Object taxCode=iter.next();
                    Object details=itemTaxDetails.get(taxCode);
                    System.out.println(taxCode +"\t" + details);
                System.out.println("************************************");
            } catch (SQLException ex) {
                ex.printStackTrace();
            } finally{
                SQLHelper.cleanUp(rst, stat, conn);
            return itemTaxDetails;
        //details of an item with all its taxes
        public List getAllItemDetails(String key_year,
                String key_office,String key_client,String key_company){
            List lineItems = new ArrayList();
            List itemNumbers = new ArrayList();
            Map taxDetails = new HashMap();
            LineItem item = null;
            Connection conn = null;
            Statement stat = null;
            ResultSet rst = null;
            //A list of all item numbers in the declaration
            itemNumbers = getAllItemNumbers(key_year,
                    key_office,key_client,key_company);
            DbConnection dbConn = new DbConnection();
            try {
                conn = dbConn.getDbConnection(Constants.WEB_JNDI);
                stat = conn.createStatement();
                for(Iterator itemIter= itemNumbers.iterator(); itemIter.hasNext();){
                    LineItem itemNum = (LineItem)itemIter.next();
                    int itemNumber = itemNum.getKey_item();
                    String select = "SELECT item_description,item_mass," +
                            "item_cost" +
                            " FROM " + Constants.WEB_TABLE +
                            " WHERE key_year = '"+key_year+"'" +
                            " AND key_office = '"+key_office+ "'"+
                            " AND key_client = '"+key_client+ "'"+
                            " AND key_company = '"+key_company+ "'"+
                            " AND key_item = " + itemNumber;
                    rst = stat.executeQuery(select);
                    while(rst.next()){
                        item = new LineItem();
                        item.setItem_description(rst.getString("item_description"));
                        item.setItem_mass(Float.parseFloat(rst.getString("item_mass")));
                        item.setKey_item(Integer.parseInt(rst.getString("item_cost")));
                        //////other details records ommited//////////////////////////
                        /* A HashMap of all itemTaxeCodes as its keys and an
                         * ArrayList of itemTaxedetails as its values
                        taxDetails = getItemTaxDetails(item.getKey_year(),item.getKey_office(),
                                item.getKey_client(),item.getKey_company(),item.getKey_item());
                        //item tax details
                        item.setItmTaxes(taxDetails);
                        //list of items with tax details
                        lineItems.add(item);
            } catch (SQLException ex) {
                ex.printStackTrace();
            } finally{
                SQLHelper.cleanUp(rst, stat, conn);
            return lineItems;
        public Set getOrders(String key_year,String key_office,
                String key_client,String key_company){
            List lineItems = new ArrayList();
            Set lineOrders = new HashSet();
            Connection conn = null;
            Statement stat = null;
            ResultSet rst = null;
            LineOder lineOrder = null;
            String select = "SELECT * FROM " + Constants.WEB_TABLE +
                    " WHERE key_year = '" + key_year + "'" +
                    " AND key_office = '" + key_office + "'" +
                    " AND key_client = '" + key_client + "'" +
                    " AND key_company = '" + key_company + "'";
            DbConnection dbConn = new DbConnection();
            try {
                conn = dbConn.getDbConnection(Constants.WEB_JNDI);
                stat = conn.createStatement();
                rst = stat.executeQuery(select);
                while(rst.next()){
                    lineOrder = new LineOder();
                    lineOrder.setKey_year(rst.getString("key_year"));
                    lineOrder.setKey_office(rst.getString("key_office"));
                    lineOrder.setKey_client(rst.getString("key_client"));
                    lineOrder.setKey_company(rst.getString("key_company"));
                    ////list of items with all their details
                    lineItems = getAllItemDetails(lineOrder.getKey_year(),lineOrder.getKey_office(),
                            lineOrder.getKey_client(),lineOrder.getKey_company());
                    //setting item details
                    lineOrder.setItems(lineItems);
                    //a list of order with all details
                    lineOrders.add(lineOrder);
            } catch (SQLException ex) {
                ex.printStackTrace();
            } finally{
                SQLHelper.cleanUp(rst, stat, conn);
            return lineOrders;
    Controller.java
    package orderitems;
    import java.io.*;
    import java.util.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class Controller extends HttpServlet {
        private Map taxDetails = new HashMap();
        private OrderDetails orderDetails = null;
        protected void processRequest(HttpServletRequest request,
                HttpServletResponse response)throws
                ServletException, IOException {
            response.setContentType("text/html;charset=UTF-8");
            String key_year = "2007";
            String key_office = "VZX00";
            String key_company = "DG20";
            String key_client =  "ZI001";
            int key_item = 1;
            String nextView = "/taxdetails_list.jsp";
            orderDetails = new OrderDetails();
            taxDetails = orderDetails.getItemTaxDetails(key_year,key_office,
                    key_company,key_client,key_item);
            //Store the collection objects into HTTP Request
            request.setAttribute("taxDetails", taxDetails);
            RequestDispatcher reqstDisp =
                    getServletContext().getRequestDispatcher(nextView);
            reqstDisp.forward(request,response);
        protected void doGet(HttpServletRequest request,
                HttpServletResponse response)throws
                ServletException, IOException {
            processRequest(request, response);
        protected void doPost(HttpServletRequest request,
                HttpServletResponse response)throws
                ServletException, IOException {
            processRequest(request, response);
    taxdetails_list.jsp
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
        <head>
            <title>Simple Tax Detail Diaplay ::</title>
            <link rel="stylesheet" type="text/css" href="imgs/orders.css"/>
        </head>
        <body>
            <jsp:useBean id="taxDetails" class="java.util.HashMap" scope="request"/>
            <table>
                <c:forEach items="${taxDetails}" var="hMap">
                    <tr>
                        <td><c:out value="${hMap.key}" /></td>
                        <!--td><%--c:out value="${hMap.value}" /--%></td-->
                    </tr>
                </c:forEach>
            </table>
        </body>
    </html>am displaying taxCodes(in this case i have VAT and ICD) fine but cant figure out how to display a list of value for each taxCode.Here is the output am getting
    both in my JSP and on the console:
    *******************************CONSOLE OUTPUT****************************
    Key          Value
    ICD     [orderItems.ItemTax@13e6226, orderItems.ItemTax@9dca26]
    VAT [orderItems.ItemTax@13e6226, orderItems.ItemTax@9dca26]
    Edited by: aiEx on Oct 8, 2007 6:54 AM

    hi evnafets,
    yes i need a nested for loop.I have tried your advice but my bean properties are not found.Am getting this error:
    javax.servlet.ServletException: Unable to find a value for "key_item" in object of class "java.lang.String" using operator "."
    I have tried this as stated earlier in the post:I have tried to make the method getItemTaxDetails return a List and get the returned list value as taxDetails. I then tested to display this list on JSP and its displaying fine.
    public List getItemTaxDetails(String key_year,String key_office,
                String key_client,String key_company,int key_item){
            ItemTax taxDetail = null;
            List taxDetails = new ArrayList();
            List itemTaxCodes = new ArrayList();
            Map itemTaxDetails = new HashMap();
            Connection conn = null;
            Statement stat = null;
            ResultSet rst = null;
            //get a list of all tax codes of an item with a
            //given item number
            itemTaxCodes = getAllTaxCodes(key_item,key_year,
                    key_office,key_client,key_company);
            DbConnection dbConn = new DbConnection();
            try {
                conn = dbConn.getDbConnection(Constants.WEB_JNDI);
                stat = conn.createStatement();
                for(Iterator taxCodeIter= itemTaxCodes.iterator(); taxCodeIter.hasNext();){
                    ItemTax itemTaxCode = (ItemTax)taxCodeIter.next();
                    String taxCode = itemTaxCode.getKey_tax_code();
                    String select = "SELECT tax_type,tax_value," +
                            "tax_limit_val FROM "+ Constants.WEB_TABLE +
                            " WHERE key_item = "+ key_item +
                            " AND key_year = '" + key_year + "'" +
                            " AND key_office = '" + key_office + "'" +
                            " AND key_client = '" + key_client + "'" +
                            " AND key_company = '" + key_company +"'" +
                            " AND key_tax_code = '" + taxCode + "'";
                    rst = stat.executeQuery(select);
                    while(rst.next()){
                        taxDetail = new ItemTax();
                        //records to be displayed only
                        taxDetail.setKey_item(Integer.parseInt(rst.getString("key_item")));
                        taxDetail.setTax_value(rst.getString("tax_value"));
                        taxDetail.setTax_limit_val(Float.parseFloat(rst.getString("tax_limit_val")));
                        //////other details records ommited//////////////////////////
                        taxDetails.add(taxDetail);////An ArrayList of taxDetails for each taxCode
                     * A HashMap which has all taxCodes of an item as its keys
                     * and an ArrayList of taxdetails as its values.
                     * I return this for display in a JSP.
                    itemTaxDetails.put(taxCode,taxDetails);
            } catch (SQLException ex) {
                ex.printStackTrace();
            } finally{
                SQLHelper.cleanUp(rst, stat, conn);
            //return itemTaxDetails;
            return taxDetails;
        }And my JSP
    taxdetails_list.jsp
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <link rel="stylesheet" type="text/css" href="imgs/orders.css"/>
        </head>
        <body>
            <table>
                <c:forEach var="curRecord" items="${taxDetails}" varStatus="rowCounter">
                        <c:choose>
                            <c:when test="${rowCounter.count % 2 == 0}">
                                <c:set var="rowStyle" scope="page" value="odd" />
                            </c:when>
                            <c:otherwise>
                                <c:set var="rowStyle" scope="page" value="even" />
                            </c:otherwise>
                        </c:choose>
                        <tr class="${rowStyle}">
                            <td>${curRecord.key_item}</td>
                            <td>${curRecord.tax_value}</td>
                            <td>${curRecord.tax_limit_val}</td>
                        </tr>
                    </c:forEach>
            </table>
        </body>
    </html>I can't see where am going wrong even with your advice.Please help.
    Thnx.

  • How to display total in ALV Header

    How to display total in ALV Header?

    Hi Venkey,
    As far as your issue is concerned I would like to quote my perception.
    Create a header internal table with title and number of records.
    At the later part of your program you should have found the total number of records ,now assign it to the header internal table and print it.
    For further clarification you can go check this link:
    http://wiki.sdn.sap.com/wiki/display/ABAP/AddHeadertoALVreport
    Thanks
    P.Srikanth

  • How to display database items

    can anyone tell me how to display the selected contents of
    the database by using a variable from my form field(like text box
    )

    Hello Guys!
    Sorry forever to get back. Going to throw this up here quick
    so I dont time out, but if you need further help post back and I
    will help with specific questions.
    Using the City, State example. This operation is two fold.
    (a) the search page, and (b) the results page.
    (a) On your search page you would have two fields. City and
    State. Make sure your table that holds these fields are containted
    within a form tag. (Insert > Form > Form). Also make sure
    your textfields have names. You can click on the textfield to
    highlight in design view and change the name from 'textfield' and
    'textfield1' to 'city' and 'state'..
    Highlight the form tag and in the properties panel where it
    says "action" insert the URL/file of your results page. This is the
    page that is actually going to display the information, then save
    your work.
    (b) Open up your results page, and in the bindings panel
    click the "+" then select query. In the 'simple' window name your
    recordset (example: rsStores) select your connection, then select
    the table you desire to display results from. From this window you
    can also choose a field to use as an order by. Do not use the
    filter!
    With this done and 'without' saving yet, click on the
    "advanced" tab. You should now see and a simple statement in the
    window that looks something like:
    SELECT *
    FROM Stores (The name 'Stores' will actually be replaced with
    your table name)
    Below the statement you will see 'parameters' with a + and -.
    Hit the plus to add a parameter. For name use varState, for Type
    use text, for Value use Request("State") and for default value use
    zero. Replicate the process for varCity using Request("City") for
    the value. (The requests are the same names as the names you used
    to name your fields in the search form). Now go up to the original
    statement and edit it to look like this:
    SELECT *
    FROM Stores WHERE yourfieldname = varState AND WHERE
    yourfieldname = varCity
    Replace 'yourfieldname' with the actual field name holding
    the values. Keep EVERYTHING case sensitive. Testing in design view
    will not work because there are no values yet passed. So click ok,
    save the page and upload them to server. Test by going to the
    search page and submitting the search form.
    Hope that helps..!!

  • How to display Opening Balance/Closing Balance in Genral Ledger PLD

    Hi all,
    How to display Opening Balance
    in General Ledger
    PLD
    (OB is already displayed in
    header of print report)
    on first page only?
    How to display Closing  Balance
    in General Ledger
    PLD
    (CB is already displayed in
    footer of print report)
    on Last page only?
    Thanks,
    With regards,
    Jeyakanthan.

    Hi,
    If you open General Ledger Report and after selecting customer code you will see the Print Preview. On that time, one window opens and asks you to select any one from two options.
    Option 1 : Book of Accounts
    Option 2 : Subsidiary Account
    In both the Options, PLD has Opening Balance in Repetitive Area Header and Closing Balance in Repetitive Area Footer. So, it will when Report grows more than one page and if you want to see both the Opening Balance and Closing Balance in all the pages then you should Tick the Check Box "Display Repetitive Area Footer on all Pages" . So that you can view OB and CB in all the pages.
    Raja.S

Maybe you are looking for

  • Problem inserting ANY content into Lightbox Widget

    I'm trying out Muse. So far, generally impressed EXCEPT for Lightbox widget. I'm following the Adobe Muse Training - Building your first website in order to see how the program works. So far, I have spent over 3 hours trying to insert video into the

  • Cs4 upgrade on new Mac PowerBook

    How do I install cs4 upgrade version on brand new Mac PowerBook with no previous version on computer

  • Connecting EP 7 to CRM 2007

    Hi All    I tried creating a URL iview for connecting to CRM 2007. The URL is working ok and the details based on the roles given in the background is also getting displayed. But when i click on anyother workset or role and come back to the CRM iview

  • Error trying to SCP

    Error trying to SCP file. Error Code is: 256 is the message I recieve, I have opened the ports in the firewall, is there something I'm missing on this server or on the other server? The server giving me the error message is a Netra T1 running Solrais

  • How do we setup the queues so that they process data automatically

    Hi Guru how do we setup the queues so that they process data automatically in XI/PI ?? thanks and regard Madavi