Guest User

Untitled

a guest
Jan 18th, 2018
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. using (var ms = new MemoryStream())
  2. {
  3. if (ReportData.Tables.Count > 0)
  4. {
  5. DataSerializer.Serialize(ms, ReportData);
  6. }
  7. }
  8.  
  9. DataTable dtCloned = ReportData.Tables[0].Clone();
  10. foreach (DataColumn column in dtCloned.Columns)
  11. {
  12. if (column.DataType == typeof(System.Object))
  13. objectColumns.Add(column);
  14. }
  15. if (objectColumns.Count > 0)
  16. {
  17. foreach (DataColumn column in objectColumns)
  18. {
  19. column.DataType = typeof(System.String);
  20. }
  21. }
  22. try
  23. {
  24. foreach (DataRow row in ReportData.Tables[0].Rows)
  25. {
  26. dtCloned.ImportRow(row);
  27. }
  28. }
  29. catch (Exception ex)
  30. {
  31.  
  32. }
  33.  
  34. <serviceDebug includeExceptionDetailInFaults="true" />
Add Comment
Please, Sign In to add comment