How do you reference a textObject on a Crystal report using Java?

Hi,
Could someone please tell me the java statement to reference a textObject on a Crystal report. I am struggling to find the info in the docs and work out how the object model works.
My textObject on the report is called "VersionNumber" and I want to locate it on the report (I know it will be in the page footer) and then retrieve its value and change it.
I've managed to get a handle to the report using,
ReportClientDocument localDoc;
localDoc = getReport();
localDoc.open("rassdk://" + reportFile.getAbsolutePath(), OpenReportOptions._openAsReadOnly);
Any help would be much appreciated.
Regards
Rob.

I've found a way of referencing the textObject using the following line of java code (used in conjunction with the preceding code).
IReportObject iro = localDoc.getReportDefController().findObjectByName("VersionNumber");
I can put "iro" into a Watch (within Eclipse) and I can find the contents of the textObject there under the Paragraph tree, but I am now stuck with how to reference this within Java.
If anyone can help it would be much appreciated (and I will of course award points !)
Regards
Robert.

Similar Messages

  • How do you reference a Formular Object on a Crystal Report using Java

    Hi all,
    I am trying to reference an object on my report which contains a Formula field.
    I have read the following 2 threads, but they refer to textObjects:
    [How do you reference a textObject on a Crystal report using Java|Re: How do you reference a textObject on a Crystal report using Java?]
    [Changing the text of ITextObject programatically|Re: Changing the text of ITextObject programatically]
    But I cannot even get those to work. I can reference a object which refers to a database field but as soon as I try
    reference a textObject or reportObject I just get a NULL variable.
    Below is the code I am useing
    IReportObject dbField = reportClientDocument.getReportDefController().findObjectByName("BOB1");
    IReportObject textBob = reportClientDocument.getReportDefController().findObjectByName("BOB2");
    "BOB1" is the name of my DB field Object, and "BOB2" can be a Text box or a Formula item and I just get nothing.
    I have just tested it with a FieldHeadingObject and that returns a valid object, so clearly I am going about this the wrong way
    for objects I place on the reports which are not driven by the database items.
    Ultimately what I want to do is reference an object in the Report Footer which will contain the RecordCount of the number of
    records contained in the report, which I am them going to use to determine if the report holds data,
    if it does I will print it, else ignore it and move on the the next report. I am doing this so that I can at an extra filter to split
    a report up into groups and produce a sinlge PDF for each group instead of one massive PDF containing all the groups.
    So if someone has a solution to any of my problems I would be very greatful, and I dont mind being told Im an idiot and should
    rather do it another way, as long as you supply that other way
    Thanks for the help
    Darren
    Edited by: Darren Jackson on Dec 16, 2009 7:29 PM
    Forgot to add am using CR4Ev2 SP3

    Right I have made some headway.
    Firstly, Im an idiot. I was making changes and setting up test fields on my report, but then when running the app, I had it looking at
    the backup report, which would explain why all the new textbox fields were not being found.
    The stupiditity did force me to delve deep and work out a fair bit of how the reports work, so cant complain too much. BUT, I am still
    not able to return values of Formula fields and formulas extra. Could someone tell me if this is even possible. I get retrieve the formula field
    name, and properties but not its value once the report has been populated. Am I wasting my time?
    Well I will continue dismantling my reports till I find the answer, or someone points me in the right direction.
    If any one is interested this is the code I used to drill down to my text boxes:
    IReportObject recCount = reportClientDocument.getReportDefController().findObjectByName("TB1");
    ITextObject obj_RecCount = (ITextObject) recCount;
    System.out.println(obj_RecCount.getName());
    Paragraphs objP = obj_RecCount.getParagraphs();
    for (int i = 0; i < objP.size(); i++){
         ParagraphElements pE = objP.getParagraph(i).getParagraphElements();
         for (int j = 0;j < pE.size(); j++){
              IParagraphTextElement pEE = (ParagraphTextElement) pE.getParagraphElement(j);
              System.out.println(pEE.getText());
    Cheers

  • How to pass database login information to a crystal report using c#?

    Hi,
    I need to pass database logon information to a crystal report dynamically using c#.  I am developing a windows application using c# .Net.
    I looked some of the articles however I am not able to figure out the mistake I have did.  Please find below the code I have written so far; It would be great if you could help me out in solving the issue.
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Text;
    using System.Windows.Forms;
    using System.Data.OracleClient;
    using System.Configuration;
    using CrystalDecisions.Shared;
    using CrystalDecisions.CrystalReports.Engine;
    private void Frm_report_Load(object sender, EventArgs e)
                setReportParameters(); // method to pass parameters to the Crystal report
                crystalReportViewer1.ReportSource = new Upper_Lower();  // Upper_Lower is the Crystal report I have used in my project
               TableLogOnInfos crtableLogoninfos = new TableLogOnInfos();
               TableLogOnInfo crtableLogoninfo = new TableLogOnInfo();
               ConnectionInfo crConnectionInfo = new ConnectionInfo();
               Tables crTables;                            
                    crTables = new Upper_Lower().Database.Tables;
                    crConnectionInfo.ServerName = "oops";
                    crConnectionInfo.DatabaseName = "";
                    crConnectionInfo.UserID = "new";
                    crConnectionInfo.Password = "new123";
                    foreach (CrystalDecisions.CrystalReports.Engine.Table CrTable in crTables)
                        crtableLogoninfo = CrTable.LogOnInfo;
                        crtableLogoninfo.ConnectionInfo = crConnectionInfo;
                        CrTable.ApplyLogOnInfo(crtableLogoninfo);
    Thanks & Regards,
    Karthik.

    Hi,
    Try using this code ,
    using CrystalDecisions.CrystalReports.Engine;
    using CrystalDecisions.Shared;
    using CrystalDecisions.Web;
            ReportDocument rd = new ReportDocument();
            rd.Load(Server.MapPath("Report name"));
            rd.SetDatabaseLogon("User Name", "Password", "Server Name", "Database Name");
            CrystalReportViewer1.ReportSource = rd;
    [See Also.|http://devlibrary.businessobjects.com/BusinessObjectsXIR2/en/devsuite.htm]
    Hope this helps!!
    Sincerely,
    Nikhil Dharme

  • How to bring Picture from OHEM table into Crystal Report using query

    Hi expert
    i had a query and which is attached to a crystal report, and its working fine,
    the thing what i need is to bring the picture which is stored in OHEM table, (Employee Photo)
    to the report. in the query i had attache the picture field. but not able to see it over the Crystal reprot
    The below given is the query
    select OHEM.empID,isnull(OHEM.firstName,'')+' ' +isnull(OHEM.middleName,'')+ ' '+isnull(OHEM.lastName,'')AS [Employee Name],
    OHPS.name AS [Position],OUDP.Name AS [Department],OUBR.Name AS[Branch],OHEM.U_SponsName,OHEM.U_EMPOLD_ID,OCRY.Name AS [Nationality],
    OHEM.U_JoinDate As [Joining Date (G)],OHEM.U_JoinDateH As [Joining Date (H)],OHEM.birthDate, (CAST(DATEDIFF(day,OHEM.birthDate,GETDATE())/(365) AS int)) As [AGE],(CAST(DATEDIFF(day,OHEM.startDate,GETDATE())/(365) AS int)) As [Year],
    OHEM.startDate As [Emp Contract Start Date (G)],OHEM.U_CEDate As [Emp Contract End Date (G)],OHEM.U_ConType As [Emp Contract Type],
    OHEM.U_ContDur AS [Emp Contrat Duration],OHEM.U_CRDate As [Emp Cont Renewal Date (G)],OHEM.U_IQId AS [Iqama ID],OHEM.U_IQIsDate As [Iq Issue Date (G)],
    OHEM.U_IQExDate As [Iq Expiry Date (G)],OHEM.U_IQIsDateH As [Iq Issue Date (H)],OHEM.U_IQExDateH As [Iq Expiry Date (H)],OHEM.U_InsType As [Insurance Type],
    OHEM.U_InsExpDate AS [Insurance Exp Date],OHEM.U_InsName As [Insurance Company],OHEM.U_DestiCity As [Destination City],
    OHEM.U_TicketType As[Ticket Type],OHEM.U_TicketClass As [ Ticket Class], OHEM.U_TravelDate As [Travel Date],OHEM.passportNo,OHEM.U_PassportIsDate AS [Passport Issue Date],
    OHEM.passportEx AS [Passport Expiry Date],OHEM.U_BSal As [Basic Salary], OHEM.U_HoAllow As [House Allowance],OHEM.U_TrAllow As [Transport Allowance],
    OHEM.U_FoodAllow AS [Food Allowance],OHEM.U_CarAllow AS [Car Allowance],OHEM.U_OthAllow As [Other Allowance],OHEM.U_BonusAllow As [Bonus],
    OHEM.U_VacStartDate1 AS [First Vacation Start Date], OHEM.U_VacEndDate As[ First Vacation End Date],OHEM.U_VacResDate As [First Vacation Resume Date],
    OHEM.U_VacDur AS [First Vacation Duration],OHEM.U_VacStartDate2 As [Second Vacation Start Date],OHEM.U_VacEndtDate2 AS [Second Vacation End Date],
    OHEM.U_VacDur2 As [Second Vacation Duration],OHEM.U_VacResDate2 AS [Second Vacation Resume],OHEM.U_VacStartDate3 AS [Third Vacation Start Date], OHEM.U_VacEndtDate3 As[ Third Vacation End Date],
    OHEM.U_VacRestDate3 As [Third Vacation Resume Date],OHEM.U_VacDur3 AS [Third Vacation Duration],OHEM.U_VacStartDate4 AS [Fourth Vacation Start Date],
    OHEM.U_VacEndDate4 As[ Fourth Vacation End Date],OHEM.U_VacResumeDate As [Fourth Vacation Resume Date],
    OHEM.U_VacDur4 AS [Fourth Vacation Duration],OHEM.U_VisaDuration AS [Visa Duration],OHEM.U_VisaStartDate AS [Visa Start Date],
    OHEM.U_VisaEndDate AS [Visa End Date],OHEM.U_VisaType As [Visa Type],OHEM.picture,OHEM.remark,OHEM.attachment,OHEM.mobile AS [Mobile],OHEM.homeTel AS [Residence Tele],OHEM.email AS [E-Mail] from OHEM
    left outer join OHPS ON OHEM.position=OHPS.posID
    left outer Join OUDP on OHEM.dept=OUDP.Code
    left outer join OUBR on OHEM.branch=OUBR.Code
    left outer join OCRY on OHEM.citizenshp=OCRY.Code
    Pls suggest how to make it appear the photo in the crystal report
    regards

    Hi,
    Please refer this how to guide which may give some idea for creation formula:
    http://www.pioneerb1.com/wp-content/uploads/2012/04/How-to-work-with-Crystal-Reports-8.8.pdf
    Thanks & Regards,
    Nagarajan

  • How do you insert a "prior period" in Crystal Reports 2008

    I am constructing a income statement that compares this current period versus the same period from last year.  I used the parameter field and filter list for one time period.  Is it possible to have a comparison time period on the same report.
    For example Revenue and Expense amounts for the 2nd Qtr of 2010 and on the same report on the next column 2nd Qtr Revenue and Expenses for the 2nd Qtr of 2009?
    Thanks for any help
    jim

    Not sure how your parameters are working but assuming you have a date range and you enter
    01/01/2010, 31/03/2010
    Your select statement will look like
    (DateField = {?daterangeParam} or
    datefield in dateadd("yyyy", -1, minimum({?daterangeParam}) ) to dateadd("yyyy", -1, maximum({?daterangeParam}) ) )
    Wrap in brackets to include other filters, this should get parsed to SQL with out any impact on performance
    Ian

  • How do you take off reseiving messages on multiple devices using the same apple account

    How do you take off reseiving messages on multiple devices using the same apple account?

    Go to Settings>Messages>Send and Receive on all but one device and add a unique email address on each device and delete the commone Apple ID email device
    If there is also an iPhone with iOS 6 associated with the Apple ID, uncheck the phone number on all but the phone.

  • HT201365 I just updated to ios 7 on my iPhone 4 how do you turn the apps off when your not using them? The old way of double clicking and then pressing the app until a red minus button comes doesn't work it opens it back up!?

    I just updated to ios 7 on my iPhone 4 how do you turn the apps off when your not using them? The old way of double clicking and then pressing the app until a red minus button comes doesn't work it opens it back up!?

    Double click home button, then swipe up on app picture (not the icon itself)

  • How can you sync ipad 2 photos to pc not using the cable or icloud sync?

    How can you sync ipad 2 photos to pc not using the cable or icloud sync? Is there a way to do this via wi-fi network, How can you sync ipad 2 photos to pc not using the cable or icloud sync? Is there a way to do this via wi-fi network

    Thanks for that, that was my first suggestion but he wants to not email either. His problem is he used his old nokia to do it and it was fine, now anything other than that he thinks is too much hassle.

  • How can you build time series measures in OBIEE without using TODATE AGO fu

    How can you build time series measures in OBIEE without using TODATE and AGO function?
    Please provide steps to build time series
    measures in OBIEE without using TODATE and
    AGO function. Dashboard results not storing
    in cache when using TODATE and AGO functions.
    eventhough its cached users queries not
    hitting cache because queries doesn't match
    exact date time when using TODATE and AGO
    functions. so I want to build queries using
    sysdate and some simple calculations. Please
    send your inputs/ideas for my questions..
    Thanks in Advance

    This can be using Msum function in answers. Use the following formula, here dollars is my metric. Change the formula based on your metric.
    Msum("Sales Measures".Dollars ,2) - "Sales Measures".Dollars
    the report will be cached and better performed compared with time series. check ti
    - Madan Thota

  • Pse 11: How do you transfer a picture into a puzzle when using PSE 11?

    How do you transfer a picture into a puzzle when using PSE 11?

    Hello,
    because I work with PS CC I will give you some links, the first program is expressly made for PSE 11:
    PSE11: http://www.panosfx.com/commercial-free-photoshop-actions/puzzle-effects
    Here a Adobe Plugin:
    Adobe - Photoshop : For Windows : Photoshop CS5 Optional Plugins
    These links here may act as examples and maybe you cane use them too
    Create Jigsaw Puzzle Effect for Photos - Photoshop Tutorials - CSSCreme.com
    http://www.avbros.com/puzzlepro/index.html
    https://creative.adobe.com/addons/products/1069#.U_dkQ2NQQs0
    http://www.photoshopessentials.com/photo-effects/photoshop-puzzle/
    http://www.obsidiandawn.com/jigsaw-puzzle-pieces-photoshop-gimp-brushes
    Good luck!
    Hans-Günter

  • How do you swap two variables A and B without using a 3rd variable?  No fun

    How do you swap two variables A and B without using a 3rd variable? No function or method allowed.
    For example:
    Given:
    A = 35
    B = 10
    Result
    A = 10
    B = 35

    How do you swap two variables A and B without using a
    3rd variable? No function or method allowed.
    For example:
    Given:
    A = 35
    B = 10
    Result
    A = 10
    B = 35
    A = A + B  (A = 35 + 10 = 45)
    B = A - B (B = 45 - 10 = 35)
    A = A - B (A = 45 - 35 = 10)

  • How do you swap two variables A and B without using a 3rd variable?

    How do you swap two variables A and B without using a 3rd variable? No function or method allowed.
    For example:
    Given:
    A = 35
    B = 10
    Result
    A = 10
    B = 35

    How do you swap two variables A and B without using a
    3rd variable? No function or method allowed.
    For example:
    Given:
    A = 35
    B = 10
    Result
    A = 10
    B = 35
    A = A + B  (A = 10 + 35 = 45)
    B = A - B (B = 45 - 35 = 10)
    A = A - B (A = 45 - 10 = 35)

  • How do you stop needing to verify email password when using yahoo.att with Mac Mail

    How do you stop needing to verify email password when using yahoo.att with Mac Mail?

    Nevermind, I fixed it (I think).  I went into Settings | Accounts & Sync and found Yahoo at the bottom of the list (alphabetically).  I selected it and it had an optiion to delete the account, which I did.

  • How do you sync only selected songs to your ipod using the new version of itunes?

    how do you sync only selected songs to your ipod using the new version of itunes?

    Same way you did with the previous versions of iTunes.
    To view the iPod in iTunes, Ctrl S to show the sidebar.
    Create a playlist, add songs and sync that playlist.
    Or drag songs to the iPod in iTunes.

  • How do you create a still image from a video using IMovies 11?

    How do you create a still image from a video using IMovies 11 on a Pro Mac?

    The simplest way is to do a simple screen capture.  

Maybe you are looking for

  • Printing from webdynpro

    Hi All, In my webdynpro I have 2 buttons PREVIEW and PRINT. With PREVIEW button click Iu2019m able to open my custom built adobe form in a separate window. Working fine and no issues here. With PRINT button click, I have to send the same form directl

  • Email Button format

    I have created a form with an email button, however it attaches the file in XML and I would like it to be sent as PDF.  Can someone direct me to where I change this.  Using Acrobat Pro 8 Thank you Gary

  • Need to make periodic request to App Server from NSAPI SAF

    I have to send a keep alive ping to a existing Session on our app server from a NSAPI SAF on IWS6. First, is making a direct socket call the best way to handle it or is there another suggestion for sending the request. Second, if using the direct soc

  • Mapping - Filtering criteria

    Hi Friends, In my source structure i have one of the field called "Purchase ID". I need to map this field to target based on one criteria as follows : Only the following Purchase ID's should be considered from source xml. Purchase ID 100 101 Requrime

  • Synchronize Workflow LOCAL tables (Report Set)

    Hi What is the use of Synchronize Workflow LOCAL tables (Report Set) .I found it scheduled in my instance every day once and what is the impact of that one ? rgds Raj