Comparing to database field

how do i compare to a database field
example:
database: music
table: cd
fields: artist, title, genre
if cd.artist == "Madonna"
...etc
else
...etc
end if

Hi,
The sample page below works with me... try to change it for your needs.
<%@ page import="java.sql.*,javax.sql.*,java.text.*,allaire.taglib.*" %>
<%@ taglib uri="jruntags" prefix="jrun" %>
<%@ page errorPage="conanError.jsp"%>
<%@ page contentType="text/html; charset=ISO-8859-9" %>
<%! String href; %>
<html>
<head>
<title> TestPage </title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-9">
</head>
<body>
<BODY BGCOLOR="#FFFFFF" LEFTMARGIN=15 TOPMARGIN=20 >
<jrun:sql datasrc="nomad" id="q1">
<jrun:sql datasrc="nomad" id="q1">
select empno,
     ename
from emp
order by ename
</jrun:sql>
<center>
<table border = 0 cellpadding = 3 cellspacing = 1>
     <th>EmployeeNo</th><th>Name</th>
<jrun:param id="q1" type="QueryTable"/>
<jrun:foreach group="<%= q1 %>">
               <% if ( q1.get(2).equals("SMITH")) {
                    href="<a href=javascript:pencere('view_"+q1.get(1)+".jsp?p_empno="+q1.get(1)+"'); >"+q1.get(1)+"</a>";
               else {
               href="<a href=javascript:pencere('view_"+q1.get(1)+".jsp?p_empno="+q1.get(1)+"'); >"+q1.get(1)+"</a>";
               %>
               <tr>
               <td align = center width="2%"> <%= q1.get(1) %> </td>
               <td align = center width="5%"> <%= q1.get(2) %> </td>
               </tr>
</jrun:foreach>
</table>
</center>
</body>
</html>

Similar Messages

  • How to compare a database field and form field and highlight differences

    Hi there,
    I have been trying to find a coldfusion function that will help, I have tried comparing two strings but the results of -1 1 or 0 aren't very useful.
    I need to compare a database field with a form field and highlight all the differences in the form field in red.
    Thanks
    Katie

    This is a non-trivial process.  Rather than doing a compare, you really are wanting to do a diff.  CF doesn't do this out of the box, but you might want to have a sniff around on Google to see if anyone has implemented anything for CF.
    Some reading:
    http://en.wikipedia.org/wiki/Diff#Algorithm
    Adam

  • Using Like to compara one db field to another

    I'm having trouble with the syntax for comparing one database
    field to another using the like statement. I've found plenty of
    examples using db field to variable or string, but can't find any
    with db field to db field.
    For example
    Where dbField1 Like %dbField2%
    What would be the proper syntax for this?
    Thanks,

    I successfully tried the following:
    ORACLE: WHERE column1 LIKE '%'||column2||'%'
    SQL Server: WHERE column1 LIKE '%'+column2+'%'
    Don't forget, the % characters go on the column with the
    "short" string. For example, if column1 contains the string 'this
    is a test' and column2 contains 'is', this row would be returned
    when the %'s are on column 2 as in the examples.
    Phil

  • Compare editable alv output with database fields

    I generated 1 editable alv report with attaching flat file data,
    but i want to change the wrong fields in alv output and compare with database filds for validation.
    but when i do this . it takes previous entries of flat file.
    how can i solve it?

    Your title is much better than in the first post, however your problem description hasn't changed.
    Let me guess, you are importing a flat file, present the contents in an editable ALV grid, some values are being changed, and now the changed values do not reflect in the internal table, instead you are seeing the values as imported from the file?
    If yes -> FAQ, please search for the many previous discussions of this topic.
    Thomas

  • While generating a crystal report can we edit database fiels in field explorer (at middle can we edit database fields)

    while generating a crystal report can we edit database fiels in field explorer (at middle can we edit database fields)

    Wrong forum to post the question, try to post the question in crystal reports community.
    Its not possible to edit the database fields while creating the reports, its only used to call the rows of values in it. Can you explain me in detail what are you actually looking for .
    --SumanT

  • Store values of different data types into single database field

    Hi Friends,
      I  have to store values of different data types(character, numeric, date, time,  text, etc) into a single database field(Char 80). Then read the same values and display it into ABAP Webdynpro report. 
    Appreciate any ideas, examples, suggestions.
    Thanks
    JB

    Hi,
    Try like this:
    data: txt1 type string,
          var1(1) type c,
          var2(1) type n,
          var3 like sy-datum,
          var4 like sy-uzeit.
    parameters: a type c,
                b type n,
                c like sy-datum,
                d like sy-uzeit.
    concatenate a b c d into txt1.
    write txt1.
    var1 = txt1+0(1).
    var2 = txt1+1(1).
    var3 = txt1+2(8).
    var4 = txt1+8(8).
    write: / var1,
           / var2,
           / var3,
           / var4.
    Regards,
    Bhaskar

  • Database fields empty after creating a new (Crystal) Report in MSY

    Hello,
    I have some issues to use Crystal Reports in Mobile Sales Maintenance (MSY). The situation is as follows
    My example is based on this standard report, which is working
    Report Name: BPartnerActivities
    Reporting Tool: Crystal Reports
    Category: Standard reports
    Subcategory: Lists
    Report Type: Report
    Data Source: Business Content provider
    Business Content Provider: BPActivities
    My requirement is to build a new report, which is based on the standard "BPartnerActivities" Report. If I use the "copy" functionality, I get an working Copy of the standard report. However, I need to modify the Business Content Provider, but I do not want to make the modifications on the standard content provider "BPActivities".
    I am now forced to used the "copy" functionality to create a copy from "BPActivities" for my own Content Provider "My BPActivities copy", which I want to use in a new report.
    Issue:
    I cannot modify the defined Business Content Provider after using the "copy" functionality and hence forced to create a new report from scratch to be able to set a different Content Provider.
    I create my own report "MyBPartnerActivities" based on the standard report "BPartnerActivities" using the same settings and assign my new business content provider.
    If I use the "Design Report" or "Modify Report" button, the Crystal Report designer pops up. Now the problem, the Crystal Report designer does not offer me any data below "Database fields".
    In the standard report, the "Database fields" has a child element "BOACTIVITY-ttx" with several field options. My own created report from sratch does now have anything?!
    Why my report does not offer my any data or is there anything additional to do?
    Another Test
    I tried to create another report using the standard content provider "BPActivities", but I have still the same issue.
    In addition I recongized that the "browse data" fuctionality does not work on the fields in the standard report. The path to the database file does not exist. It starts with "C:\WINNT\...", but my system has "C:\WINDOWS\...". But the executed report is able to retriev the data?!
    Unfortunately was not able to find any proper documentation, but I would really appreciate any help.
    Regards,
    Andreas

    Update
    It looks like that the *.ttx file is not uploaded/create to/on the MSY system. The system shows the file in the Crystal Report Designer, but there is no file on the file system. The confusing thing is, that any standard report is still working and does not really complain about a missing ttx file. I think the content of the ttx file is somehow embeded to the report.
    Does someone know how the system should behave? Should a ttx file be automatically created & assigned to any new report or do I have to create the file by my own every time?
    Cheers,
    Andreas

  • How can find  database field and table name

    how can find the underline database field name,table name from java page. Example. in oracle apps when we go purchaseing super user then supplier base then supplier and find supplier detail .

    Hi,
    depends on your model. If you work with ADF BC then you can use ViewLinks to access parent or detail infromation programmatically. See the developer guides for more information. Note that you wont access the tables directly but the collections that represent the records
    Frank

  • To read all the database fields used in a Crystal report 10 file using Vb 6 Code

    Hi
    Iam in development of an Application in Visual basic which lists all the
    database fields used in a particular report (crystal 10)
    In simple i need to show all the checked fields in the database fields section in field explorer section of the crystal report file.
    regards
    venkateshG

    Please re-post if this is still an issue to the Legacy Application Development SDKs Forum or purchase a case and have a dedicated support engineer work with you directly

  • RE: What's database field are used in crystal report file?

    Hi all
    Please help me a C# code that using Crystall Report API (Crystal Report XI- Develop license) to get the list of database fieldname that using in crystal Report file. (What's database field using in header section ,group section , detail section of report.....)
    We looking forward to hearing from you
    Thanks
    Son

    Hello Son,
    please use this code below to get a list of used database fields in a report :
    //File Name:          CS_Get_report_data_out_inproc.sln
    //Created:            April 11, 2008
    //Author ID:          FLI
    //Purpose:            This C# .NET sample Windows application demonstrates
    //                  how to retrieve report data and put the into a XML file
    //                  using unmanaged RAS.
    // Note this is available without a dedicated RAS with SP2 for XI R2
    using System;
    using System.IO;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Text;
    using System.Windows.Forms;
    using CrystalDecisions.CrystalReports.Engine;
    using CrystalDecisions.ReportAppServer.ClientDoc;
    using CrystalDecisions.ReportAppServer.Controllers;
    using CrystalDecisions.ReportAppServer.DataDefModel;
    namespace CS_Get_report_data_out_inproc
        public partial class Form1 : Form
            // CR Declarations
            ReportDocument boReportDocument;
            ISCDReportClientDocument boReportClientDocument;
            public Form1()
                InitializeComponent();
                //Create a new ReportDocument
                boReportDocument = new ReportDocument();
                // load the RPT file
                boReportDocument.Load("..
    ReportData.rpt");
                // show in reportviewer
                crystalReportViewer1.ReportSource = boReportDocument;
            private void button1_Click(object sender, EventArgs e)
                //Access the ReportClientDocument in the ReportDocument (EROM bridge)
                boReportClientDocument = boReportDocument.ReportClientDocument;
                // Retrieve the Rowset Controller
                RowsetController boRowsetController = boReportClientDocument.RowsetController;
                // Retrieve the metadata (column headers) - this allows you to only retrieve the data that is on the report.
                RowsetMetaData boRowsetMetaData = new RowsetMetaData();
                Fields boFields = boReportClientDocument.DataDefinition.ResultFields;
                boRowsetMetaData.DataFields = boFields;
                // Now print out the data in XML file
                //(Note: This will print out the results of formulas too)
                StreamWriter sw = new StreamWriter("C:
    ReportData.xml", false);
                sw.WriteLine("<?xml version='1.0' encoding='utf-8'?>");
                sw.WriteLine("<ReportData>");
                sw.WriteLine("<Reportheader>");
                // Print out the titles
                for (int i = 0; i < boFields.Count; i++)
                    String boFieldName = boFields<i>.Name;
                    sw.WriteLine("<ReportheaderDetail>" + boFieldName + "</ReportheaderDetail>");
                sw.WriteLine("</Reportheader>");
                //Create the cursor which lets us loop through the data
                RowsetCursor boRowsetCursor = boRowsetController.CreateCursor(null, boRowsetMetaData, 1);
                Record boRecord;
                while (boRowsetCursor.IsEOF == false)
                    sw.WriteLine("<Customer>");
                    boRecord = boRowsetCursor.CurrentRecord;
                    for (int j = 0; j < boFields.Count; j++)
                        try
                            sw.WriteLine("<Detail>" + (String)boRecord[j].ToString() + "</Detail>");
                        catch (Exception err)
                            sw.WriteLine("<Error>" + err.Message + "</Error>");
                    sw.WriteLine("</Customer>");
                    boRowsetCursor.MoveNext();
                sw.WriteLine("</ReportData>");
                // CLose the file
                sw.Close();
                MessageBox.Show("XML File 'ReportData.xml' successfully created on C:");

  • Database fields at runtime and freetext search

    Hi,
    We have started to look into Kodo 3.0 and have used the reversemappingtool
    for generating java classes for our current database layout. We are
    considering if we should use Kodo/JDO to refactor some of old code.
    In our old system we have some features which we would like to move
    to the new implementation, but we are not sure if this is possible.
    1) At runtime we would like to a database field which we can maintain,
    use a default value when inserting and update with new value. Can
    it be done, do you have any example code ?
    2) In addition to 1, it would be nice if we at runtime could make a custom
    table and maintain it.
    3) Support for freetext search on Oracle and Sybase, how can it
    be done, do you have any example ?
    Best regards,
    Karsten Mathiasen

    Hi Kaushik,
    You can make use of APPCC class of your FPM application enhance your appcc class and write your logic to the post exit method. There you will have IO_OVP instance and this interface have all the method which can hide tabs from your application on runtime.
    But for the field hide you need to dynamically prepare your screen in your feeder class.
    For using APPCC you can refer http://help.sap.com/saphelp_nw74/helpdata/en/3e/741ac912a143368cded7cc418a4bc8/content.htm?frameset=/en/f5/823cdb32254707aec436de005e0ada/frameset.htm.
    Thanks
    Praveen Gupta

  • Field Explorer help, not all Database Fields available

    Greetings all, I'm new to Crystal Reports (version XI by the way) and Tigerpaw.  I've had some great luck editing existing reports to the specifications we've needed thus far.  But now I've run into a real problem, it seems small, but it's important to me. 
    The one change I'm unable to accomplish on our new invoice report:
    -Adding the Tigerpaw field, Account Name, to an invoice.  The "Account Name" field is a field pulled from the tblAccounts Database Fields category in the Field Explorer.  But when I'm in my invoice template, I do not have that category available, I only have tblSysListViewPrint and tvwr_Invoices categories, the latter does have the field for "Account ID" which is close for our purposes, but not the same.  So how might I go in and pull from the tblAccounts category...specifically to get the  tblAccounts.AccountName field.  Copying that field from another existing report does not work either, "one or more formulas fail to compile".
    I'm not sure how it decides what Database Fields to pull from, because on other reports, the tblAccounts category is available, but not the tvwr_Invoices category, so I am quite confusedl.
    Hopefully this makes sense to someone out there. 
    Thanks.

    Thanks, V361,
    When I go to create a blank report, I get no databases available.  My first prompt is the "Database Expert".  The "available data sources" list is Current Connections (no items), Favorites (no items), History (no items), and Create New Connection.  The "selected tables" list on the right is blank.  I honestly don't have a clue how connect to whatever server contains those items.  I realized since I first posted that I need to figure that out to make any progress.  All the created reports already have the database field categories set up already, but it looks like all the available fields were not initially chosen for the reports.
    So what I believe it comes down to is the fact that I need to figure out how to "Create New Connection" to find my available database fields.

  • Can't add database field or text object to a report (new and existing)

    We have Crystal Report 8.5 and when trying to modify an existing report or create a new report, I can't seem to add any database fields or text objects in my report.  I get a prohibition symbol (circle with a backslash inside it) when I hover over the report.  Has anyone encoutered something like this? Any suggestions?  Thank you.

    Do you have two monitors?
    I had this problem if I tried to open crystal in the second monitor, move it back to primary monitor and it should be OK.
    Ian

  • Problem in database fields creation using default class of B1DE Wizard

    Hi Experts
    In an AddOn I am creating database fields in default class "Project_DB'. It does not give any message weather it creates fields or not. My code for database creation is given below
    Namespace FormARE
        Public Class FormARE_Db
            Inherits B1Db
            Public Sub New()
                MyBase.New
                B1Connections.theAppl.StatusBar.SetText("Please wait. AddOn is updating database", BoMessageTime.bmt_Long, BoStatusBarMessageType.smt_None)
                Columns = New B1DbColumn() {New B1DbColumn("OCRD", "BondNo", "Bond No.", BoFieldTypes.db_Alpha, BoFldSubTypes.st_None, 20, New B1WizardBase.B1DbValidValue(-1) {}, -1), New B1DbColumn("OCRD", "BFrDate", "Bond From Date", BoFieldTypes.db_Date, BoFldSubTypes.st_None, 10, New B1WizardBase.B1DbValidValue(-1) {}, -1), New B1DbColumn("OCRD", "BTDate", "Bond To Date", BoFieldTypes.db_Date, BoFldSubTypes.st_None, 10, New B1WizardBase.B1DbValidValue(-1) {}, -1), New B1DbColumn("OINV", "Cntner_no", "Container No.", BoFieldTypes.db_Alpha, BoFldSubTypes.st_None, 20, New B1WizardBase.B1DbValidValue(-1) {}, -1), New B1DbColumn("OINV", "Cntnr_Seal", "Container Seal No.", BoFieldTypes.db_Alpha, BoFldSubTypes.st_None, 20, New B1WizardBase.B1DbValidValue(-1) {}, -1), New B1DbColumn("OINV", "Cust_Seal", "Custom Seal No.", BoFieldTypes.db_Alpha, BoFldSubTypes.st_None, 20, New B1WizardBase.B1DbValidValue(-1) {}, -1), New B1DbColumn("OINV", "ctryOrgn", "Country of Origin", BoFieldTypes.db_Alpha, BoFldSubTypes.st_None, 20, New B1WizardBase.B1DbValidValue(-1) {}, -1)}
                GC.Collect()
                B1Connections.theAppl.StatusBar.SetText("Successfully updated database", BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Success)
            End Sub
        End Class
    End Namespace
    It does not give first message. and second message come properly and immediately when I start the AddOn. I checked it makes all fields accuratly. But when I open the related form it gives error message "Data Source not found". I checked fields name are same as used in form and database .What can the reason? Should I use a simple function for creation of database fields which will run when a button is pressed? Is it fine to using default class for database fields creation?
    Thanks
    Best Regards
    Jitender

    I solved the problem.
    Procedure I followed :
    UNINSTALL ORACLE WRAEHOUSE BUILDER SOFTAWARE.
    'GLOBAL_NAMES = FALSE' in init.ora file.
    RESTARTED MY MACHINE.
    INSTALL THE ORACLE WRAEHOUSE BUILDER SOFTAWARE.

  • Database field won't display

    I'm new to Crystal Reports in .NET but I do have my 1st report working except for one field that I'm trying to use in a sub report.  It's in my database fields just like the other field for the sub report.  I can see data for both fields in the Browse Data.  One field and it's heading display just fine but I can't see the other one anywhere.  The field heading that's created when I drag it into the Detail area won't display in the report either.  I've tried deleting the field and readding it but nothing helps.  As far as I know I've done nothing to suppress this field from printing.  I REALLY need to get this working.  Thanks for your help.

    Hello Paul,
    I recommend to post this query to the [.NET Development - Crystal Reports|SAP Crystal Reports, version for Visual Studio; forum.
    That forum is monitored by qualified technicians and you will get a faster response there.
    Also, all Crystal Reports .NET Development queries remain in one place and thus can
    be easily searched in one place.
    Thanks a lot,
    Falk

Maybe you are looking for

  • Incoming calls to my iphone go straight to voice mail after 1 ring

    Can anyone help?

  • Unable to access DFS shares when server 1 goes down

    Hello all, I have a test domain I am building in order to prepare for a new domain we are going to create. We currently have an SBS 2003 that is reaching the end of its' life. We are going to start fresh. I have setup domain-based DFS along with DFS

  • Video files not visible in Finder

    I have just finished transferring all my files to a new iMac with Mavericks 10.9.1. I have been editing video for years with various editing suites, on an Intel Mac. OS 10.6 On my new iMac the only files shown in Finder are just the packages "AVCHD"

  • Why is Adobe dropping support for pre 3GS phones?!

    I think it's a bad decision to drop support for pre 3GS devices. There are still many out there and if support is dropped we're forced to still use the old PFI to reach the complete audience. It's clear that OpenGL ES 2 offers a lot more fancy stuff

  • Having problem with insertchildAfter

    Hi  guys              i am working  with xml and want to appending a node after a particular node.i m using insertchildAfter function.but can not able to append that node using that. here is the structure of my xml:- <root>         <data>