Question

I am using Silverlight4 and Telerik Reporting Q3 2011. I am trying to Generate Reports of all Outlets. I used Table to display its fields. And I want to Display Full Address in same cell. How could I?

I Used following Experession to display Full Address in same cell.

 = Fields.AddressLine1
 + ", " + Fields.AddressLine2
 + ", " + Fields.Suburb
 + ", " + Fields.City
 + ", " + Fields.State
 + ", " + Fields.Country

I want do display this in same cell but want output like below..

 =====================
   Address
 =====================
  15A,
  xxxx xxxRoad,
  xxxxxx,
  xxxxxxxx
 ====================

But I m getting this

 =====================
   Address
 =====================
  15A, xxxx xxxRoad, xxxxxx, xxxxxxxx
 =====================

How do I get Output Which I want?

Was it helpful?

Solution

made the Function NewLineFeeds() in this function I used Replace() Method to replace the specific string to newLine(\n) .

public static string NewLineFeeds(string text)
{
    string result = text.Replace(", ", "\n");
    result = result.Replace(", ", "\n");
    result = result.Replace(", ", "\n");
    return result;
}

and my Expression is

 =NewLineFeeds(Fields.AddressLine1 
  + ", " + Fields.AddressLine2 
  + ", " + Fields.Suburb 
  + ", " + Fields.City 
  + ", " + Fields.State 
  + ", " + Fields.Country)

This call the Function NewLineFeeds() and replace ", " to \n (new Line). Add this will work Fine..

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top