![]() |
|
|
|
#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></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 |
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Crystal Report | Koteswarr | Software | 1 | 06-02-2009 12:20 PM |
| changing Crystal report table at run time | rakesh201180 | Software | 1 | 10-22-2008 10:58 AM |
| Crystal Report with Java | Gajesh Tripathi | Software | 2 | 08-02-2007 12:57 PM |
| slow crystal report | guptamkomal | Software | 0 | 05-23-2007 01:17 PM |
| how to integrate crystal report 9 with java | arputharaj | Software | 0 | 11-10-2006 06:25 AM |