Crystal stops displaying data when new field added to a report

Discussion in 'Software' started by nickmellor, Jan 14, 2009.

  1. nickmellor

    nickmellor

    Joined:
    Jan 14, 2009
    Messages:
    1
    Hi all,

    Adding a new field prevents some data in the Crystal report being output, but doesn't raise an exception. The report is being output as a PDF, then emailed.

    The new field that is causing the trouble is "oneLineOfficeAddress". It is a column added to the dataset using the following code:

    dss.Tables["SegmentList"].Columns.Add("oneLineOfficeAddress",typeof(string));
    foreach (DataRow dr in dss.Tables["SegmentList"].Rows)
    {
    dr["oneLineOfficeAddress"] = Library.Utility.OneLineAddress(dr["officeAddress"].ToString());
    }

    ...

    public static string OneLineAddress(string address)
    {
    // Strip LF-CRs from an address, and replace with commas
    return address.Replace("\r\n",", ");
    }


    The data used by the report is below: as you can see, oneLineOfficeAddress is present, and the LF-CR stripper method is working correctly.

    <?xml version="1.0" standalone="yes" ?>
    - <NewDataSet>
    - <TripList>
    <tripID>20223</tripID>
    <customerID>20051</customerID>
    <tripTitle>Robinson, Sari - Holiday</tripTitle>
    <tripActive>1</tripActive>
    <tripTemplate>0</tripTemplate>
    <tripConfirm>0</tripConfirm>
    <tripRequestConfirm>0</tripRequestConfirm>
    <tripDepartureDate>2009-01-28T00:00:00.0000000+11:00</tripDepartureDate>
    <tripReturnDate>2009-02-14T00:00:00.0000000+11:00</tripReturnDate>
    <tripInvoiceAmount>2325</tripInvoiceAmount>
    <tripBalance>2325</tripBalance>
    <tripCommissionAmt>302.25</tripCommissionAmt>
    <tripPaidCommission>0</tripPaidCommission>
    <tripNetCost>2325</tripNetCost>
    <tripSent>0</tripSent>
    <tripReprice>0</tripReprice>
    <agentID>4</agentID>
    <tripStatus>30</tripStatus>
    <custFirstName>Sari</custFirstName>
    <custSurname>Robinson</custSurname>
    <custAddress>4 Green Row</custAddress>
    <custState>VIC</custState>
    <custEmail>nick@thewebcompany.com.au</custEmail>
    <custCountry>UK</custCountry>
    <custHomePhone>(0123) 456789</custHomePhone>
    <custWorkPhone />
    <custMobPhone />
    <custPostcode>CA17</custPostcode>
    <custTown>Machen</custTown>
    </TripList>
    - <PersonList>
    <tripID>20223</tripID>
    <psgrFirstName>Sari</psgrFirstName>
    <psgrSurname>Robinson</psgrSurname>
    <psgrType>Adult</psgrType>
    <psgrOrder>1</psgrOrder>
    </PersonList>
    - <SegmentList>
    <segID>20672</segID>
    <segEndDate>2009-02-14T00:00:00.0000000+11:00</segEndDate>
    <segTypeID>10</segTypeID>
    <segStartDate>2009-01-28T00:00:00.0000000+11:00</segStartDate>
    <segItemID>176</segItemID>
    <segQuoteCost>2325</segQuoteCost>
    <segNetCost>2295</segNetCost>
    <TripID>20223</TripID>
    <operatorID>57</operatorID>
    <segStartTime>2009-01-14T14:00:00.0000000+11:00</segStartTime>
    <segEndTime>2009-01-14T10:00:00.0000000+11:00</segEndTime>
    <segStartOfficeID>625</segStartOfficeID>
    <segDays>0</segDays>
    <segAdults>0</segAdults>
    <segChildren>0</segChildren>
    <segBabies>0</segBabies>
    <segFamilies>0</segFamilies>
    <segPensioners>0</segPensioners>
    <segBookRef />
    <segDesc />
    <segDateConfirmed>2009-01-14T09:25:10.5830000+11:00</segDateConfirmed>
    <segAmended>1</segAmended>
    <passID>0</passID>
    <segConfirmed>1</segConfirmed>
    <segConfComments />
    <segCommPaid>0</segCommPaid>
    <segError>0</segError>
    <segStartLocID>2</segStartLocID>
    <segLength>0</segLength>
    <segPricedByAgent>0</segPricedByAgent>
    <operatorName>Bed & Breakfast (RTH) - Superior</operatorName>
    <itemTitle>Single-Twin/Double</itemTitle>
    <segTypeName>Bed & Breakfast</segTypeName>
    <startOfficeText>Active</startOfficeText>
    <tripCost>2325</tripCost>
    <startLocTitle>Auckland</startLocTitle>
    <IsFlight>1</IsFlight>
    <officePhone>(09) 638 9641</officePhone>
    <officeAddress>83 Valley Road Mt Eden, Auckland</officeAddress>
    <oneLineOfficeAddress>83 Valley Road, Mt Eden, Auckland</oneLineOfficeAddress>
    </SegmentList>
    </NewDataSet>

    When I write a formula containing oneLineOfficeAddress, it doesn't flag a missing field. I can replace oneLineOfficeAddress with officeAddress and the problem goes away, i.e. all the data that had vanished reappears. but I have the same issue if I add a new field bound to oneLineOfficeAddress.

    We've checked in, restarted the computer, restarted VS 2003, which has solved problems for us in the past: same problem.

    Any ideas?

    Thanks in advance,

    Nick Mellor
     
    nickmellor, Jan 14, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?RnJhbms=?=

    crystal report certification

    =?Utf-8?B?RnJhbms=?=, Jan 13, 2004, in forum: Microsoft Certification
    Replies:
    1
    Views:
    499
    LiverpoolScum
    Jan 14, 2004
  2. Satya Priya

    Visual Basic, Crystal Report

    Satya Priya, Apr 22, 2004, in forum: MCSD
    Replies:
    1
    Views:
    656
  3. =?Utf-8?B?QW5pbA==?=

    Crystal Report

    =?Utf-8?B?QW5pbA==?=, Apr 16, 2005, in forum: MCSD
    Replies:
    3
    Views:
    650
    Simon Au
    Apr 20, 2005
  4. arputharaj
    Replies:
    0
    Views:
    2,575
    arputharaj
    Nov 10, 2006
  5. yasinirshad
    Replies:
    0
    Views:
    1,579
    yasinirshad
    Oct 4, 2007
Loading...

Share This Page