How to set serial no in jasper report

Hi friends,
I am using jasper report in my application. In the table has 4 fields like code,name,address,phone number. If i generate the report i need to display the serial number like1,2,3.... for each record. I don't know how to set. So please help me.

You may use query as
declare @itemcodes nvarchar(2000)
select @itemcodes = ''
select top 200 @itemcodes = @itemcodes +
case when
charindex( 'ItemCode: ' + coalesce(T1.ItemCode,'Service'), @itemcodes) = 0 then
'ItemCode: ' + coalesce(T1.ItemCode,'Service') + ' '
else
end
+ case when T5.IntrSerial is not null then
', ' +
coalesce(T5.IntrSerial, '')
else '' end
FROM dbo.OINV T0
INNER JOIN dbo.INV1 T1 ON T0.DocEntry = T1.DocEntry
LEFT JOIN SRI1 T4 ON T4.BaseType=13 and T4.BaseEntry=T0.Docentry and T4.ItemCode=T1.ItemCode
LEFT JOIN OSRI T5 ON T5.SysSerial=T4.SysSerial and T4.ItemCode=T5.ItemCode
order by T1.itemcode
print @itemcodes
or use stored procedure and inside stored procedure throug cursor fill tmp table and as return make select as you need.

Similar Messages

  • How to set formula field in crystal report

    Hello all,
    I develope the code in C#.NET and use SAP B1 2004C. I have a problem with crystal report. I have in crystal report one unbound field. This field is string type. I need in my code change value of this field to another text ex. ("test").
    I use this code:
    FormulaFieldDefinitions crFormula;
                FormulaFieldDefinition crFormulafieldD1;
                crFormula = crReportDocument.DataDefinition.FormulaFields;
                //FormulaFieldDefinition test;
                //bool test = crFormula.IsReadOnly;
                string error = "";
                bool isCorrect = true;
                crFormulafieldD1 = crFormula[1];           
                string ahoj = crFormulafieldD1.FormulaName;
                crFormulafieldD1.Text = " ""+OP.ToString()+"" ";
                isCorrect = crFormulafieldD1.Check(ref error);     
                // Display the error message if the syntax is incorrect.
                //if (!isCorrect) MessageBox.Show(error);
    The value of the field is set, but on the report isnt it. Why not. Can you help me. Send some sample.
    Thanks

    Hi
    I've never tried to change a field of the report directly. Maybe it would solve the problem if you make a parameter field, which you can use in the formula.
    You can set then the parameter field:               report.SetParameterValue("NameOfParam", valueOfParam);
    Regards,
    Martin

  • How to set printersettings for the crystal report viewer in SAP BI dynamically

    Hello
    I have set the URL method for my crystal report and with parameter passing as shown below, it was displaying the crystal report viewer by connecting to the SAP BI 4.0 server with this method.
    http://cr:port/businessobjects/enterprise115/desktoplaunch/opendoc/openDocument.jsp?sDocName=CRLabelParam&sType=rpt&lsSnPrinted=0&lsSsTestProjectNr=1
    This URL will be called from Web application by different users, i would like to set the printer settings differently for different users for this crystal report viewer how shall i need to set the printer options?
    shall i need to set the printer settings programatically for each user. Please advise me how do i need to proceed.
    Thanks & Regards,
    Rajeswari.

    There are no BI / CR APIs that would do this for you. The way I see it, you'll have to have your own print button and populate it with the correct printer information for each user as they request the report. Of course, alternatively, use the viewer printer button and get the users to choose the correct printer.
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

  • How to set an application item when report column link is clicked?

    I am trying to set the short name of a bread crumb entry when I drill into a detail from an interactive report page.
    The master report has a column link with target = detail - "page in this application"
    I can pass page items through the URL and they are set on the target page.
    How can I set an application item before the target page is called?
    Is there a way to set a process before the link is followed?

    Kenneth,
    I'm not totally sure that I understood the question but, it soounds like you want to set the value of some page items on the page that is opened when you click a link on a column in the master window. Is this right?
    If so, you can achieve what you want by creating hidden page item(s) on the target page. In the master page, on which every column provides the link, go into Report Attributes, click on the link column and scroll down to the section labeled "Column Link" Within this section, set the link text to the current column value, e.g. #MASTER_REPORT_COLUMN_NAME_HERE#. Set the target to "Page in this Application" and pick the page number for the target window.
    Underneath this you will see a section to set set the value for page items. If you click the flashlight, you can search for the hidden page item that you created above. Use the same value to set it as you did the link text, i.e. #MASTER_REPORT_COLUMN_NAME_HERE#. Do this and let APEX take care of passing the values on the URL.
    On the child page, just set whatever control you want to dynamically pick up the value from the hidden field. For example, if you hidden field where named P4_CLEARER_NAME. You could set the title attribute to "Contact Information for &P4_CLEARER_NAME."
    You need the preceeding "&" and terminating "." around the name of you hidden page item to do this.
    -Joe

  • How to set the working directory for reports in linux

    Hi All,
    Can you anyone help me to set the working directory for oracle application server 10g reports? I am using RHEL4 and AS10g. Actually i want to run my reports from my define
    working directory. How can I do this?
    Thanks in advance
    Arif

    Hi,
    your rep_srv.conf should look like something like
    +<?xml version = '1.0' encoding = 'ISO-8859-1'?>+
    +<!DOCTYPE server PUBLIC "-//Oracle Corp.//DTD Reports Server Configuration //EN" "file:D:\oracle\FRHome_1/reports/dtd/rwserverconf.dtd">+
    +<server version="10.1.2.0.2">+
    +<!--Please do not change the id for reports engine.-->+
    +<!--The class specifies below is subclass of _EngineClassImplBase and implements EngineInterface.-->+
    +<cache class="oracle.reports.cache.RWCache">+
    +<property name="cacheSize" value="50"/>+
    +<!--property name="cacheDir" value="your cache directory"-->+
    +<!--property name="maxCacheFileNumber" value="max number of cache files"-->+
    +<!--property name="ignoreParameters" value="parameter names to be ignored in constructing cache key, separated by comma ','"-->+
    +</cache>+
    +<engine id="rwEng" class="oracle.reports.engine.EngineImpl" initEngine="1" maxEngine="3" minEngine="0" engLife="50" maxIdle="30" callbackTimeOut="90000" jvmOptions="-Xmx512M -Xss512K">+
    +<!--property name="sourceDir" value="your reports source directory"/-->+
    +<!--property name="tempDir" value="your reports temp directory"/-->+
    +<!--property name="keepConnection" value="yes"/-->+
    +</engine>+
    +...+
    some more definitions
    +..+
    +<!--pluginParam name="proxy" type="file">proxyinfo.xml</pluginParam-->+
    +<pluginParam name="xmlpds" type="file">xmlpds.conf</pluginParam>+
    +<pluginParam name="jdbcpds" type="file">jdbcpds.conf</pluginParam>+
    +<pluginParam name="textpds" type="file">textpds.conf</pluginParam>+
    *<environment id="APP1">*
    *+<envVariable name="REPORTS_PATH" value="/application1/reports"/>+*
    *+</environment>+*
    *+<environment id="APP2">+*
    *+<envVariable name="REPORTS_PATH" value="/application2/reports"/>+*
    +</environment>+
    +</server>+
    The environment ids you can choose yourself and you have to put them in there yourself too (here I put two environments for two different applications "1" and "2").
    If you call a report from Forms, then you have to code something like
    ADD_PARAMETER(p_list,'ENVID',TEXT_PARAMETER,'APP1');
    Details depend on how you call your reports, my example is for using a parameter list and calling a report out of application1
    Hope that helps.
    Volker

  • How to add Serial Number to the report name?

    HI,
    I'd like to add the option of including the SN to the report name.  A good option will be to automatically set the default base name to the SN.
    I'm open to suggestions. Either a simple solution where I'll always get the SN as the base name, or
    a more complicated solution where I can really make some modifications to the report option dialog page to include that upon user selection.
    Thanks
    Rafi
    TS3.5+CVI8.0
    p.s. an example, if exist, will be highly useful (and appreciated of course)

    That's okay... I can answer here as well...
    Under Configure >> Report Option
    UNSELECT "Store UUT Report in Batch Report File" first, then select "New UUT Report File for Each UUT"
    New UUT Report File for Each UUT—Appends a string containing the current UUT serial number to the base name of the report file. For example, uut_report.html becomes uut_report[SN000001].html. This setting is not available if you select Store UUT Report in Batch Report File.

  • How to set up the path for report in 10gAS?

    I have a report which can be run in one folder A but not in the other folder B, both folder are included in the forms_path in default.env of AS. How can I set up the path for the report in AS so that the report server knows to look for the report in the folder B?

    Hello,
    If you don't specify the "full path name" for your reports, the file will be searched in the directories listed in REPORTS_PATH or in the directory specified in the property sourceDir
    For more details :
    http://www.oracle.com/webapps/online-help/reports/10.1.2/topics/htmlhelp_rwbuild_hs/rwrefex/envvars/envvar_reports_path.htm
    and
    http://download-uk.oracle.com/docs/cd/B14099_17/bi.1012/b14048/pbr_conf.htm
    Regards

  • How to set up the path for Report Server's output

    I've had 9iAS on NT 4 platform with Service Pack 6.
    By default, the Report Server's output goes to the
    C:\Oracle\806\Bin
    How can we change this setting ?
    (in 6iserver.conf we don't have a variable for it.)
    I'll appreciate any help.
    Thanks.
    Izabella.

    Thanks for reply.
    In my \Report60\Server\myrepsvr.ora I have :
    cachedir="E:\Oracle\806\REPORT60\server\cache"
    but when I call :
    http://<host>:<port>/dev60cgi/Rwcgi60.exe?
    report=myrep.rdf&destype=file&desformat=pdf
    &paramform=no
    the created pdf report doesn't go to the specified cashedir, but goes to the
    C:\Oracle\806\Bin
    How can I handle it ?
    I'd like to see the pdf file in the cachedir,
    not in Bin.
    Izabella.

  • How to set Serial No column in a table

    Hi All,
          I want to create a SNo. column . With RFC i dint get this column and I have to create this additional column. Please someone help me with code.
    Thanks
    Uday
    Edited by: Uday Kumar Kanike on Jan 13, 2012 12:02 PM

    Dear Uday,
    Create the custom context  node and attributes (for populating rfc column data). also you can create extra attribute for Serial No. when you populating data from rfc, add the number in serial no.
    like:-
    wdContext.node<NODE>().invalidate();
    I<NODE>Element ele = null;
    for(int i=0; i<wdContext.node<RFC OUTPUT NODE>().size(); i++)
          ele = wdContext.create <NODE>Element();
          ele.setSerialNo(i OR i+1);
          //for other attribute
          ele.set<XYZ>(wdContext.node<RFC OUTPUT NODE>().get<RFC OUTPUT NODE>ElementAt(i).get<XYZ>());
          wdContext.node<NODE>().addElement(ele);
    Hope it will helps
    Best Regards
    Arun Jaiswal

  • How to use serial numbers in Crystal Reports?

    I want to use serial numbers in Invoices and Packing Lists in the report I built in Crystal. Is there a easy way to do that? I searched the forum but no helpful answers could be found.......

    I need more help! I did the following for my Invoice: OSRD-INV1 join by ItemCode and DocEntry
    DLN1-OSRD join by DocEntry and INV1-OINV join by DocEntry
    I'm sure this is not good. What are the right joins and which field from which table has to be placed in the Report? Thanks for your help, we just got life from April 1st, so I'm new with this....
    Edited by: Frits Pen on Apr 13, 2009 2:38 PM
    Edited by: Paulo Calado on Jun 12, 2009 4:56 PM

  • How to set Command Timeout in Crystal report while calling from C# code

    I am using Crystal report XI R2.  I am calling SQL server 2005 stored procedure as source in the report. I want the report should timeout from the website if the stored procedure doesn't return resultset after 5 minute. Could you please assist how should I chnage the below code to achieve that.
    Code :
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using CrystalDecisions.CrystalReports.Design;
    using CrystalDecisions.Shared;
    using CrystalDecisions.Web;
    using CrystalDecisions.CrystalReports.Engine;
    namespace CrystalTest
        public partial class _Default : System.Web.UI.Page
            protected ReportDocument rd;
            protected CrystalReportViewer Crv;
            protected void Page_Load(object sender, EventArgs e)
                rd = new ReportDocument();
                rd.Load(Request.MapPath("FXRate.rpt"));
                SetDBLogonForReport(GetCrvConnectionInfo(), rd);
                ParameterFields crtParamFields;
                ParameterDiscreteValue crtParamDiscreteValue1;
                ParameterField crtParamField1;
                ParameterDiscreteValue crtParamDiscreteValue2;
                ParameterField crtParamField2;
                ParameterDiscreteValue crtParamDiscreteValue3;
                ParameterField crtParamField3;
                ParameterDiscreteValue crtParamDiscreteValue4;
                ParameterField crtParamField4;
                ParameterDiscreteValue crtParamDiscreteValue5;
                ParameterField crtParamField5;
                ParameterDiscreteValue crtParamDiscreteValue6;
                ParameterField crtParamField6;
                crtParamFields = new ParameterFields();
                crtParamDiscreteValue1 = new ParameterDiscreteValue();
                crtParamField1 = new ParameterField();
                crtParamDiscreteValue1.Value = "USD";
                crtParamField1.ParameterFieldName = "@BaseCurrCode";
                crtParamField1.CurrentValues.Add(crtParamDiscreteValue1);
                crtParamFields.Add(crtParamField1);
                crtParamDiscreteValue2 = new ParameterDiscreteValue();
                crtParamField2 = new ParameterField();
                crtParamDiscreteValue2.Value = "EUR";
                crtParamField2.ParameterFieldName = "@CounterCurrCode";
                crtParamField2.CurrentValues.Add(crtParamDiscreteValue2);
                crtParamFields.Add(crtParamField2);
                crtParamDiscreteValue3 = new ParameterDiscreteValue();
                crtParamField3 = new ParameterField();
                crtParamDiscreteValue3.Value = "2008-05-28 00:00:00";
                crtParamField3.ParameterFieldName = "@FromDate";
                crtParamField3.CurrentValues.Add(crtParamDiscreteValue3);
                crtParamFields.Add(crtParamField3);
                crtParamDiscreteValue4 = new ParameterDiscreteValue();
                crtParamField4 = new ParameterField();
                crtParamDiscreteValue4.Value = "2008-05-28 00:00:00";
                crtParamField4.ParameterFieldName = "@ToDate";
                crtParamField4.CurrentValues.Add(crtParamDiscreteValue4);
                crtParamFields.Add(crtParamField4);
                crtParamDiscreteValue5 = new ParameterDiscreteValue();
                crtParamField5 = new ParameterField();
                crtParamDiscreteValue5.Value = "ashok12";
                crtParamField5.ParameterFieldName = "@CurrentUser";
                crtParamField5.CurrentValues.Add(crtParamDiscreteValue5);
                crtParamFields.Add(crtParamField5);
                crtParamDiscreteValue6 = new ParameterDiscreteValue();
                crtParamField6 = new ParameterField();
                crtParamDiscreteValue6.Value = DateTime.Now.ToString("dd MMM yyyy hh:mm");
                crtParamField6.ParameterFieldName = "@ClientTime";
                crtParamField6.CurrentValues.Add(crtParamDiscreteValue6);
                crtParamFields.Add(crtParamField6);
                Crv.ParameterFieldInfo = crtParamFields;
                Crv.DisplayGroupTree = false;
                Crv.BestFitPage = true;
                Crv.ReportSource = rd;
            private void SetDBLogonForReport(ConnectionInfo connectionInfo, ReportDocument reportDocument)
                Tables tables = reportDocument.Database.Tables;
                foreach (CrystalDecisions.CrystalReports.Engine.Table table in tables)
                    TableLogOnInfo tableLogonInfo = table.LogOnInfo;
                    tableLogonInfo.ConnectionInfo = connectionInfo;
                    table.ApplyLogOnInfo(tableLogonInfo);
            public static CrystalDecisions.Shared.ConnectionInfo GetCrvConnectionInfo()
                CrystalDecisions.Shared.ConnectionInfo con = new CrystalDecisions.Shared.ConnectionInfo();
                con.ServerName = System.Configuration.ConfigurationSettings.AppSettings["conServer"].ToString();
                con.DatabaseName = System.Configuration.ConfigurationSettings.AppSettings["conDatabase"].ToString();
                con.UserID = System.Configuration.ConfigurationSettings.AppSettings["sesUser"].ToString();
                con.Password = System.Configuration.ConfigurationSettings.AppSettings["sesPwd"].ToString();
                return con;
            private void Page_Unload(object sender, System.EventArgs e)
                if (rd != null)
                    rd.Close();
                    rd.Dispose();
                if (Crv != null)
                    Crv.HasCrystalLogo = false;
                    Crv.Dispose();

    Yes it is possible to use datasets. resources listed below. One hting to be aware of; Using datasets larger than about 5,000 records (depending on the report) is not advisable. Performance will potentially be an issue with datasets that are too large.
    Crystal Reports Guide To ADO.NET
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/401c4455-a31d-2b10-ae96-fa57af5aec20
    Reporting Off ADO.NET Datasets
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/2091d0c3-da1d-2b10-22be-a3426b183f75
    VS2005_Walkthroughs
    http://www.businessobjects.com/global/pdf/dev_zone/VS2005_Walkthroughs.pdf
    VB samples:
    https://smpdl.sap-ag.de/~sapidp/012002523100006252822008E/net_win_smpl.exe
    In the above samples see VBNET_WIN_ADODOTNET
    C# samples
    https://smpdl.sap-ag.de/~sapidp/012002523100006252722008E/csharp_win_smpl.exe
    BTW., notes databse is here:
    https://www.sdn.sap.com/irj/scn/advancedsearch?cat=sdn_ossnotes&query=&adv=true
    Articles can be searched here;
    https://www.sdn.sap.com/irj/sdn/businessobjects-articles
    Ludek
    Edited by: Ludek Uher on Feb 17, 2009 1:22 PM

  • How to set page setup in ssrs report level

    Hi All,
    Can any one suggest pls.
    I have a SSRS report which has 50 column data.
    When i am exporting it to PDF its giving me 20 pages.How can i make it in 2-3 page max.
    Please suggest and also when i am exporting to excel it looks fine but when printing it its giving me two page.How can it fit to 1 page in excel
    pls help.

    Hi i_pr,
    In SQL Server Reporting Services (SSRS), it is designed to use 2 different rules in pagination: Physical pagination and Logical pagination. Physical pagination is used to the print control and the TIFF and PDF rendering extensions. It is controlled by the
    PageSize properties.
    If we want to use 2-3 pages to display these data, we can modify the PageSize to work around the issue. However, if we print the report, it maybe truncated. Because the limit of print paper. Did you get the extra blank page when you export report to PDF?
    If so, please refer to the following thread to reduce the pages.
    http://blogs.msdn.com/b/chrisbal/archive/2006/08/10/694892.aspx
    In SSRS, if we have no page break in the report, we will get these data in one page when we export the report to Excel. The print layout is relate to paper size. Alternatively, we can adjust the report in Excel to work around the issue.
    Regards,
    Alisa Tang
    Alisa Tang
    TechNet Community Support

  • How to set  fnd_client_info.set_org_context in Discoverer report.

    Hello,
    I created a view for a Discoverer report, it is using a seeded view and we have 2 different org entity. I need to have same view used to pull the data from 2 different entity for this I need to set fnd_client_info.set_org_context to retriev the data.
    I dont where to set fnd_client_info.set_org_context in discoverer repror, so as to enable users of both the entity to use this report.
    Can anyone help in finding the resolution.
    Thanks and Regards
    Milind

    Here is the link to that forum: Discoverer

  • How to set the filter on a report to show the data for the Current Month

    Hi all,
    I am working on a report, which currently has this filter: Date First Worked is greater than or equal to 10/01/2010. This reports show the data for the current month, so at the beginning of each month we have to remember to change the date on the filter.
    Does anyone know what the criteria should say, so that it automatically changes and shows the information for the current month, without us having to go in and change anything?
    Any help would be greatly appreciated!
    Thanks,
    AA

    You need to add a session variable to date fir worked assuming that this is a date field.
    To do this open up the filter on the field then at then press add Variable then "session" and enter the following CURRENT_MONTH into the Server Variable section.

  • How to set Excel Options using  crystal reports 2008

    Hi,
    I am trying to figure out CR 8.5 (Crystal report control) Equivalents in Crystal reports 2008 using crystal report viewer in .Net but not able to find the exact replacments.
    Properties used in CR 8.5
    CRAXDRT.ExportOptions.ExcelUseWorksheetFunctions=True
    CRAXDRT.ExportOptions.ExcelUseTabularFormat =True
    CRAXDRT.ExportOptions.SetLogOnInfo(1,3,4,5)
    Please let me know the replacements for the above mentioned properties in .Net using crystal report viewer (CR 2008)
    Thanks in Advance
    Regards,
    Ramnath

    Hello,
    The code that has been provided is of Report Designer Component.
    RDC has been deprecated in Crystal Reports 2008.
    Use the 'ExcelFormatOptions' class. It provides many options regarding exporting in an excel format.
    ExcelFormatOptions myExportFormatOptions = new ExcelFormatOptions();
    Try exploring the Developer guide for Crystal Reports .NET SDK [here|http://www.sdn.sap.com/irj/boc/sdklibrary#section7]..

Maybe you are looking for