In chart (graph), How to set scale value dynamically(user input scale val.)
Hi ,
I am using Crystal Reports XI R2.
I have specified scale value but user is asking he can decide scale value while running the chart like Y-axis major interval (inclement by) 10, 7, 4, .5, .25 etc.
How to achieve this please give me suggestions.
Thanks and regards,
Manjunath N. Jogin
I do not think this can be done dynamically, You could build several sections, each with it's own graph,
set the scales in each graph, in its section, and then supress sections based on parameter.
So, you could have one section that is 5,10,15,20 etc.
and another that is 8, 12, 16, 20
depending on what they want.
Similar Messages
-
How to check the value from user input in database or not?
Hello;
I want to check the value of user input from JtextFiled in my database or not.
If it is in database, then i will pop up a window to tell us, otherwise, it will tell us it is not in database.
My problem is my code do not work properly, sometimes, it tell me correct information, sometime it tell wrong information.
Could anyone help,please.Thanks
The following code is for check whether the value in database or not, and pop up a window to tell us.
while( rs.next()) {
System.out.println("i am testing");
bInt=new Integer(rs.getInt("id"));
if(aInt.equals(bInt)){ // If i find the value in data base, set flag to 1.
flag=1; //I set a flag to check whether the id in database or not
break;
System.out.println("falg" + flag);
if(flag==1){ //?????????????????????
String remove1 = "DELETE FROM Rental WHERE CustomerID=" + a;
String remove2 = "DELETE FROM Revenus WHERE CustomerID=" +a;
String remove3 = "DELETE FROM Customer WHERE id=" +a;
s.executeUpdate(remove1);
s.executeUpdate(remove2);
s.executeUpdate(remove3);
JOptionPane.showMessageDialog(null,"you have success delete the value");
s.close();
else//???????????????????????????????
JOptionPane.showMessageDialog(null,"I could not found the value"); -------------------------------------------------------------------
My whole program
import java.sql.*;
import java.awt.BorderLayout;
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JOptionPane;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.util.*;
public class DeleteC extends JFrame
public static int index=0;
public static ResultSet rs;
public static Statement s;
public static Connection c;
public static Object cols[][];
private static JTable table;
private static JScrollPane scroller;
private static int flag=0;
public DeleteC()
//information of our connection
//the url of the database: protocol:subprotocol:subname:computer_name:port:database_name
String strUrl = "jdbc:oracle:thin:@augur.scms.waikato.ac.nz:1521:teaching";
//user name and password
String strUser = "xbl1";
String strPass = "19681978";
//try to load the driver
try {
Class.forName("oracle.jdbc.driver.OracleDriver");
catch (ClassNotFoundException e) {
System.out.println( "Cannot load the Oracle driver. Include it in your classpath.");
System.exit( -1);
//a null reference to a Connection object
c = null;
try {
//open a connection to the database
c = DriverManager.getConnection( strUrl, strUser, strPass);
catch (SQLException e) {
System.out.println("Cannot connect to the database. Here is the error:");
e.printStackTrace();
System.exit( -1);
//create a statement object to execute sql statements
public void getData(String a){
try {
//create a statement object to execute sql statements
s = c.createStatement();
int index=0;
Integer aInt= Integer.valueOf(a);
Integer bInt;
//our example query
String strQuery = "select id from customer";
//execute the query
ResultSet rs = s.executeQuery( strQuery);
//while there are rows in the result set
while( rs.next()) {
System.out.println("i am testing");
bInt=new Integer(rs.getInt("id"));
if(aInt.equals(bInt)){
//JOptionPane.showMessageDialog(null,"I found the value");
flag=1;
break;
System.out.println("falg" + flag);
if(flag==1){
String remove1 = "DELETE FROM Rental WHERE CustomerID=" + a;
String remove2 = "DELETE FROM Revenus WHERE CustomerID=" +a;
String remove3 = "DELETE FROM Customer WHERE id=" +a;
s.executeUpdate(remove1);
s.executeUpdate(remove2);
s.executeUpdate(remove3);
JOptionPane.showMessageDialog(null,"you have success delete the value");
s.close();
else
JOptionPane.showMessageDialog(null,"I could not found the value");
catch (SQLException e) {
JOptionPane.showMessageDialog(null,"You may enter wrong id");
My main program for user input from JTextField.
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.JOptionPane;
import java.util.*;
public class EnterID extends JFrame{
public JTextField tF1;
public EnterID enID;
public String tF1Value;
private JLabel label1, label2, label3;
private static JButton button;
private static ButtonHandler handler;
private static String aString;
private static Integer aInteger;
private static Integer checkV=0;
public static void main(String args[]){
EnterID eId= new EnterID();
public EnterID(){
handler=new ButtonHandler();
Container c= getContentPane();
c.setLayout(new GridLayout(3,1));
button= new JButton("ok");
button.addActionListener(handler);
label1 = new JLabel(" CustomerID, Please");
label2 = new JLabel("Label2");
label3 = new JLabel();
label3.setLayout(new GridLayout(1,1));
label3.add(button);
label2.setLayout(new GridLayout(1,1));
aString = "Enter Id Here";
tF1 = new JTextField(aString);
label2.add(tF1);
c.add(label1);
c.add(label2);
c.add(label3);
setSize(150,100);
setVisible(true);
private class ButtonHandler implements ActionListener{
public void actionPerformed(ActionEvent event){
tF1Value=tF1.getText();
// CheckData cData = new CheckData();
// aInteger = Integer.valueOf(tF1Value);
if(tF1Value.equals(aString)){
JOptionPane.showMessageDialog(null,"You didn't type value into box");
setVisible(false);
else {
DeleteC dC= new DeleteC();
dC.getData(tF1Value);
setVisible(false);
}You may have working code now, but the code you posted is horrible and I'm going to tell you a much much much better approach for the JDBC part. (You should probably isolate your database code from your user interface code as well, but I'm skipping over that structural problem...)
Do this instead:
public void getData(String a){
PreparedStatement p;
String strQuery = "select count(*) the_count from customer where id = ?";
try {
//create a prepared statement object to execute sql statements, it's better, faster, safer
p = c.prepareStatement(strQuery);
// bind the parameter value to the "?"
p.setInt(1, Integer.parseInt(a) );
//execute the query
ResultSet rs = p.executeQuery( );
// if the query doesn't throw an exception, it will have exactly one row
rs.next();
System.out.println("i am testing");
if (rs.getInt("the_count") > 0 ) {
// it's there, do what you need to...
else
JOptionPane.showMessageDialog(null,"I could not find the value");
catch (SQLException e) {
// JOptionPane.showMessageDialog(null,"You may enter wrong id");
// if you get an exception, something is really wrong, and it's NOT user error
// always, always, ALWAYS close JDBC resources in a finally block
finally
p.close();
}First, this is simpler and easier to read.
Second, this retrieves just the needed information, whether or not the id is in the database. Your way will get much much slower as more data goes into the database. My way, if there is an index on the id column, more data doesn;t slow it down very much.
I've also left some important points in comments.
No guarantees that there isn't a dumb typo in there; I didn't actually compile it, much less test it. It's at least close though... -
How to set default value to user attribute in customized information tab
Hi Experts,
we created a custom attribute in Administration-managed custom attributes and now we are getting that attribute under customized information tab in user admin->identity management.
This attribute is coming for all users and it is working fine and I can give value to this attribute also.
Now the problem is we have more than 10000 users in the portal and we have to assign same value to this custom attribute to all the users.
Is there any possiblity of setting the value to all the user without coding.
If it is not possible then how can I proceed for coding.
any help will be appreciated.
RaghuHi Michael,
Yes my data source is LDAP. This attribute is added in the portal itself and I don't think it is possible to set the value of custom attribute at LDAP.
Shanta : We already created the custom attribute and it is also appearing in the Customized information
Problem is we need to set a value to that attribute. This should be same to all the users coming from LDAP.
My Basis people are asking the funtion module which calls when we click on the Customized information tab. Is that possible to know?
Or we can set this value by writing a piece of code in webdynrpo java?
Appreciate your inputs
Raghu -
Read the value of user input variable during calculation of virtual char
Hello
Virtual characteristics is populated in custom BAPI based on values specified by user in the variable screen.
How to read the value of user input variable outside the user exit for custom variables?
The one way is to create faked user exit variable, read the value of user input variable in corresponding FM and insert it into table. Then value of this variable will be derived from the table.
Thanksno answer
-
How to set default values for boolean columns
I'm trying to deploy some content types and columns into a site with a feature. All it's ok, except that I'm trying to set a default value for boolean columns with no success.
I've tried to set default value at column level:
<Field ID="{EFE23A1D-494E-45cf-832E-45E41B17F0CF}" Name="ScopeSpanish" DisplayName="Se publican noticias en español"
Type="Boolean" Hidden="FALSE" Group="Columnas ShaCon" >
<Default>TRUE</Default>
</Field>
and at content type level:
<FieldRef ID="{EFE23A1D-494E-45cf-832E-45E41B17F0CF}" Name="ScopeSpanish" DefaultValue="TRUE" Required="TRUE" />
But in any case, when i create a new item with this content type, default value is applied.
Can anyone tell how to set default values for boolean columns?
Thanks in advance,
Regards,
SergioIn the field definition you can set
<Default>1</Default>
or
<Default>0</Default>
How to set the default value Null? -
How to set cookie value in one page and retrieve in another page using setA
How to set cookie value in one page and retrieve in another page using setActionListener?
I have tried with following code srcpage.jspx->destpage.jspx
srcpage.jspx
<af:table value="#{bindings.DepartmentsView1.collectionModel}"
var="emp" rows="#{bindings.EMPView1.rangeSize}"
first="#{bindings.EMPView1.rangeStart}"
emptyText="#{bindings.DepartmentsView1.viewable ? 'No rows yet.' : 'Access Denied.'}">
<af:column sortProperty="EmployeeName" sortable="false"
headerText="Cookie Testing">
<af:commandLink text="#{emp.EmployeeName}" action="success">
<af:setActionListener from="#{emp.EmployeeName}"
to="#{cookie}"/>
</af:commandLink>
</af:column>
</af:table>
espage.jspx
<af:outputText value="Test Cookie Value: #{cookie}"/>
,Here Test Cookie Value prints the following instead of its original String value
{JSESSIONID=javax.servlet.http.Cookie@7da288, oracle.uix=javax.servlet.http.Cookie@399f62}
I have passed employee name "Robert" to cookie in srcpage.jspx,but it prints "JSESSIONID....." instead of "Robert" in destpage.jspx
Thanks in advance
KaleeHi,
"cookie" is a reserved name. If you want to write to a session scope attribute called "cookie" then you have to call #{sessionScope.cookie}. If you want to use EL to set and read from cookies then you will have to use
#{cookie.cookieName}
Note that #{cookie} writes to and returns a map
check this: http://www.informit.com/articles/article.aspx?p=30946&seqNum=7
Frank -
How to set variable value in an XML array
Hi,
Please let me know how to set the value for a xml array element using assign activity inside a for-each block in BPEL 11g
I tried to set the variable value for result element using the below condition but i encountered selection failure message
$outputVariable.payload/ns1:Student['i']/ns1:result or
$outputVariable.payload/ns1:Student[$i]/ns1:result
And the xsd used is as below
<xsd:complexType name="StudentCollection">
<xsd:sequence>
<xsd:element name="Student" type="Student" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Student">
<xsd:sequence>
<xsd:element name="Name" type="xsd:string"/>
<xsd:element name="location" type="xsd:string"/>
<xsd:element name="mark" type="xsd:string"/>
<xsd:element name="result" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
Thanks,
DhanaHi,
At the back of button specify the following parameter:-
CMD 1 Execute_planning_function
Planning_function_name 1 xyz
Var_name 1 variable_name
var_value 1 blank
Can also refer to link below:-
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b0a89464-f697-2910-2ba6-9877e3088954?quicklink=index&overridelayout=true(can refer to page 20)
http://www.sdn.sap.com/ddc5564a-337d-4cf9-a34e-2dab64df09be/finaldownload/downloadid-a61a6724ba8e7b7fbd9c5df9590ab50d/ddc5564a-337d-4cf9-a34e-2dab64df09be/irj/scn/go/portal/prtroot/docs/library/uuid/f0881371-78a1-2910-f0b8-af3e184929be?quicklink=index&overridelayout=true
Hope it may help -
In flex, How to set a value to one parameter, the parameter
defined in a cffunction in a cfc file, In the cffunction there are
much cfargument, I want set a value to one of them, such as the
cfc:
<cffunction access="remote" name="myShow" output="false"
returntype="struct">
<cfargument name="ID" type="numeric" default=0>
<cfargument name="GoodsID" type="string" default="">
<cfargument name="DestTime" type="string" default="">
<cfargument name="DestCount" type="numeric" default=1>
How I set a value to only parameter one of them , such as set
GoodsID when use mx:remoteObject.
Thanks for your helpGot maybe a solution for you, I have just tested it.
So, the idea is to use intermediate variables. Imagine Var1 and Var2 variables that you refresh with your more or less complicated queries. Then what you can do is to refresh your final variable Var3 with a query using your intermediate variables. Here is an example for Oracle:
select #Var1+#Var2 from dual
This way you can make a chain of dependent variables: Var3 is using Var2 and Var2 is using Var1.
Hope it helps.
Shamil -
How to set the value of something in a component from the main application?
Hi,
Maybe I've been working on this too long, but I can't figure
out how to set the value of the text property of a text input field
in a component from my main application in an mx:Script block. I
have a component called Login in the components folder, and I need
to set the text value of empNum. In my mxml declaration at that the
top, I've declared these components as xmlns:c="components.*" So
logically, the property I'm trying to set is c.Login.empNum.text. I
can't figure out the correct syntax to get this to work, and I've
tried everything I can think of. Does anyone have any suggestions?
I'm thinking this should be an easy one, and I'm just missing
something.
Thanks!
HolliDid you try giving it an id ?
<c:MyLogin id="loginScreen" /c>
So later you can do loginScreen .empNum.text = "my text"
Laurent, -
How to set the value of process variables/payload using a managed bean?
Hello,
Someone can give me an example about how to set the values of a process payload in a managed bean?
thank you!Try this:
jsf page:
<af:selectOneChoice label="Select Suburb"
requiredMessageDetail="Select a suburb"
valueChangeListener="#{selectOneChoiceBean.onValueChanged}"
validator="#{selectOneChoiceBean.validate}"
unselectedLabel="None" autoSubmit="true"
binding="#{selectOneChoiceBean.selectOneChoice}"
value="#{selectOneChoiceBean.value}">
<f:selectItems value="#{selectOneChoiceBean.selectionList}"/>
</af:selectOneChoice>
backing bean:
public class SelectChoiceBean {
private List<SelectItem> selectionList;
private String value = "B";
private RichSelectOneChoice selectOneChoice;
public SelectChoiceBean() {
initSelectionList();
public void setSelectionList(List<SelectItem> selectionList) {
this.selectionList = selectionList;
public List<SelectItem> getSelectionList() {
return selectionList;
public void onValueChanged(ValueChangeEvent valueChangeEvent) {
System.out.println(valueChangeEvent.getNewValue());
// Add event code here...
public void validate(FacesContext facesContext, UIComponent uIComponent,
Object object) {
// Add event code here...
private void initSelectionList() {
selectionList = new ArrayList<SelectItem>();
selectionList.add(new SelectItem("A", "A label"));
selectionList.add(new SelectItem("B", "B label"));
selectionList.add(new SelectItem("C", "C label"));
public void setValue(String value) {
this.value = value;
public String getValue() {
return value;
public void setSelectOneChoice(RichSelectOneChoice selectOneChoice) {
this.selectOneChoice = selectOneChoice;
public RichSelectOneChoice getSelectOneChoice() {
return selectOneChoice;
} -
How to set the Value in Dropdownbyindex
Hi Experts,
I am New to Webdynpro-ABAP.
I have one Dropdownbyindex field. I need to set the value from BAPI. how to set that values in Dropdown..
I need Basic step-by-step procedure.
Regards,
P.ManivannanHi,
1. First import the BAPI in to WD component using create->service call.
2.The BAPI import, export and Table parameters will be set in to the Component Controller context.Then drag this BAPI node to your view.
3.In the 'texts' property of DDbyindex bind the BAPI output node which will be the Table parameter of the BAPI.It could be under CHANGING node.
4.In WDDOINIT method just click the code wizard and enter the method name which you will give when importing the BAPI.Automatically the values from the BAPI will be loaded into your Dropdown when you run the application.
Regards,
Dinesh -
How to set the value in SelectOneChoice
Hi,
I need an help....
can anyone please tell me how to set the value in SelectOneChoice.
I want to set the value at index 3
i am trying selectOneChoice1.setvalue(new Integer(3)); but it is throwing an NullPointerException.
Thanks,
NehaHi,
is it ADF bound? If so then you set the default value to the list binding in the PageDef file. The value of the component must be bound to a method expression, which is why you see an exception. However, I think we need more information
Frank -
How to set variables values via VBA.
Anybody please help.
How to set variables values via VBA in workbook. SAP Netweaver 2004s.Pass variable values with VBA and BI 7.0 funtions to Query
At first a remark u2013 Iu2019ve read a lot of threads saying that passing values to a query can be done by using VBA code only. Iu2019ve tested it but Iu2019m not sufficient with the new BEX 7.0 API and therefore I use a mixture of BEX 7.0 funtionality and VBA. I create a BEX 7.0 design item button passing the values to a query u2013 I hide this button somewhere on the sheet or on a hidden sheet and I then raise the event to click the button from VBA code. Works fine and the maintenance is easier if something changes in the API in the future again.
How to start:
Switch to design mode in BEX Analyzer:
Implement a BEX 7.0 design item u201Cbuttonu201D
Click on the button to implement the properties
Make the input for the commands
data_provider = dataprovider_1
cmd = process_variables
subcmd = var_submit
No comes the part with the variables u2013 Letu2019s assume a query has 4 variables but you only want to change 1 with the button u2013 an organizational unit for instance.
Make a range somewhere in the excel with the following structure:
Name Index Value
VAR_NAME_1 1 Variablename
VAR_VALUE_EXT_1 1 variablevalue
Value should contain the name of your variable of course and u201Cvalueu201D the value of your variable
Set a name for this range with EXCEL functionality but without the header:
Back to the properties of the button: Insert the name of the range with the variables in the field Command Range:
If you have more variables to process you can of course enhance your Filterrange!
In the left upper Corner you have a name for your button:
Now you can raise the button-click in vba like this:
Application.Run "'" & ThisWorkbook.Name & "'!Sheet2.BUTTON_35_Click"
regards, Lars -
How to set default values in initialization event for select option
Abapers,
I have 3 GL account like 0024831231,0024831238,0024831245.
Please help me how to set default values in select-options ( s_hkont ) in INTIALIZATION event
ThanksSelect option is table <Structure> with fields, low, high, sign & option
you need to append the value into the select option, with appropriate value in low or
example:
S_HKONT-low = <value>
S_HKONT-SIGN = 'I'
S_hkont-OPTION = 'EQ'
append s_hkont.
Default value for select-option also can be added directly in select-option statement.
Regards,
Mahesh -
How to set default values in dialog programming
hi gurus
can anyone suggest me
how to set default values in dialog programming
thanks®ards
kals.it's a bit dirty but I usually just place it in the PBO with a flag for control. It's simple and not too costly i think.
MODULE preRender OUTPUT.
DATA first_time TYPE flag VALUE 'X'.
IF first_time EQ 'X'.
* put your initialization code here
CLEAR first_time.
ENDIF.
ENDMODULE.
-MiR
Maybe you are looking for
-
After playing around with my ZEN I have collected and organised some suggestions for improving the firmware. There is also a list of bugs that I have encountered at the bottom. Things that are not possible would be great to see in a future player. I
-
Expert in xsl - stylesheets for unicode (UTF8)
Hi, I am looking for an expert in xsl-stylesheets for unicode (UTF-8 format) in order to check the syntax of a stylesheet for the browser-based PI-Sheet in SAP ERP PP-PI. Can you advise someone ? Thanks & BR, Miriam
-
Can I download Elements 9 using box as I have misplaced the disc
Hi My husband has misplaced the disc for Elements 9 but still has the box - is there any way we can download this on our laptop (2nd computer as we have already installed on our shop computer) just by using the product info and serial number on the b
-
Hi, Is there a performance difference between ansi and old syntax. The following query SELECT ITD.display_description FROM structure_child SC RIGHT OUTER JOIN structure S ON SC.structure_id = S.structure_id INNER JOIN structure_level SL ON SL.structu
-
Bonjour, il y a une voix qui me parle tout le temps, je ne sias pas comment l'arêter ? si quelqu'un à une idée ? svp, merci !!!!!