Page 1 of 1

CSV Datasource does not support fields that have multiple lines

Posted: Tue Feb 28, 2012 9:10 am
by q123
Hi the CSV data source does not support fields that have multiple lines. Is this a know restriction? Is there any chance you can resolve this issue?

Using WPF version from SWPF_2012.02.23.zip

So for example the following CSV file...

=========== START ============
F1,F2,F3
AAA,"AAA
BBB
CCC",CCC
=========== END =============
Would show the header and one row if loaded in Excel but will not load in stimulsoft report

Here are the details from the exception dialog....

----------------------------
[General Info]

Application: Stimulsoft Reports.Wpf
Framework: v4.0.30319
Version: Version: 2012.1.1213 from 23 February 2012
MachineName: XXXXXXX
OSVersion: Microsoft Windows NT 6.2.8102.0
UserName: Martin

----------------------------
[Exception Info]
Message: Index was outside the bounds of the array.

Source: Stimulsoft.Report

StackTrace:
at Stimulsoft.Report.Dictionary.StiCsvHelper.GetTableFromCsvFile(String path, Boolean forceCodePage, Int32 forcedCodePage, Boolean loadData)
at Stimulsoft.Report.Dictionary.StiCsvAdapterService.ConnectDataSourceToData(StiDictionary dictionary, StiDataSource dataSource, Boolean loadData)
at Stimulsoft.Report.Dictionary.StiDataSource.Connect(StiDataCollection datas, Boolean loadData)
at Stimulsoft.Report.Dictionary.StiDataSourcesCollection.Connect(StiDataCollection datas, Boolean loadData)
at Stimulsoft.Report.Dictionary.StiDictionary.Connect(Boolean loadData)
at Stimulsoft.Report.Engine.StiRenderProviderV2.ConnectToData(StiReport report)
at Stimulsoft.Report.Engine.StiRenderProviderV2.Render(StiReport report, StiRenderState state)
at Stimulsoft.Report.Engine.StiReportV2Builder.RenderSingleReport(StiReport masterReport, StiRenderState renderState)
at Stimulsoft.Report.StiReport.RenderReport(StiRenderState renderState)
at Stimulsoft.Report.StiReport.Render(StiRenderState renderState, StiGuiMode guiMode)
at Stimulsoft.Report.WpfDesign.StiWpfDesignerPreviewControl.buttonRefresh_Click(Object sender, RoutedEventArgs e)

----------------------------
[Assemblies]
mscorlib, Version = 2.0.0.0
PresentationFramework, Version = 3.0.0.0
Stimulsoft.Base, Version = 2012.1.1213.0
Stimulsoft.Report, Version = 2012.1.1213.0
Stimulsoft.Report.Wpf, Version = 2012.1.1213.0
Stimulsoft.Report.WpfDesign, Version = 2012.1.1213.0
System, Version = 2.0.0.0







CSV Datasource does not support fields that have multiple lines

Posted: Wed Feb 29, 2012 2:50 am
by Alex K.
Hello,

Please send us a sample .csv file which reproduces the issue for analysis.

Thank you.

CSV Datasource does not support fields that have multiple lines

Posted: Wed Feb 29, 2012 3:55 am
by Ivan
Hello,

The problem is solved.
The patch will be available in the next prerelease build.

Thank you.

CSV Datasource does not support fields that have multiple lines

Posted: Mon Mar 05, 2012 11:19 am
by q123
thanks for the quick fix

CSV Datasource does not support fields that have multiple lines

Posted: Mon Mar 05, 2012 11:54 am
by q123
Hi Ivan,
I have downloaded SWPF_2012_2012.03.01 release which states in the changes rtf "Fix: Some bugs with csv datasource and multiline fields." and have tried this out. Unfortunately I get the same exception thrown. Could you have a look at this again as the issue does not seem to be resolved.
Thanks
Martin

----------------------------
[Customer Explanation]



----------------------------
[General Info]

Application: VBase
Framework: v4.0.30319
Version: Version: 2012.1.1214 from 1 March 2012
MachineName: MARTINSLAPTOP
OSVersion: Microsoft Windows NT 6.2.8102.0
UserName: Martin

----------------------------
[Exception Info]
Message: Index was outside the bounds of the array.

Source: Stimulsoft.Report

StackTrace:
at Stimulsoft.Report.Dictionary.StiCsvHelper.GetTableFromCsvFile(String path, Boolean forceCodePage, Int32 forcedCodePage, Boolean loadData)
at Stimulsoft.Report.Dictionary.StiCsvHelper.GetTableFromCsvFile(String path, Int32 codePage, Boolean loadData)
at Stimulsoft.Report.Dictionary.StiCsvAdapterService.ConnectDataSourceToData(StiDictionary dictionary, StiDataSource dataSource, Boolean loadData)
at Stimulsoft.Report.Dictionary.StiDataSource.Connect(StiDataCollection datas, Boolean loadData)
at Stimulsoft.Report.Dictionary.StiDataSourcesCollection.Connect(StiDataCollection datas, Boolean loadData)
at Stimulsoft.Report.Dictionary.StiDataSourcesCollection.Connect(Boolean loadData)
at Stimulsoft.Report.Dictionary.StiDictionary.Connect(Boolean loadData)
at Stimulsoft.Report.Dictionary.StiDictionary.Connect()
at Stimulsoft.Report.Engine.StiRenderProviderV2.ConnectToData(StiReport report)
at Stimulsoft.Report.Engine.StiRenderProviderV2.Render(StiReport report, StiRenderState state)
at Stimulsoft.Report.Engine.StiReportV2Builder.RenderSingleReport(StiReport masterReport, StiRenderState renderState)
at Stimulsoft.Report.StiReport.RenderReport(StiRenderState renderState)
at Stimulsoft.Report.StiReport.Render(StiRenderState renderState, StiGuiMode guiMode)
at Stimulsoft.Report.StiReport.RenderWithWpf(StiRenderState renderState)
at Stimulsoft.Report.StiReport.RenderWithWpf(Boolean showProgress, Int32 fromPage, Int32 toPage)
at Stimulsoft.Report.StiReport.RenderWithWpf(Boolean showProgress)
at Stimulsoft.Report.WpfDesign.StiWpfDesignerPreviewControl.buttonRefresh_Click(Object sender, RoutedEventArgs e)

----------------------------
[Assemblies]
log4net, Version = 1.2.10.0
Microsoft.Practices.Prism, Version = 4.0.0.0
Microsoft.Practices.Prism.UnityExtensions, Version = 4.0.0.0
Microsoft.Practices.ServiceLocation, Version = 1.0.0.0
Microsoft.Practices.Unity, Version = 2.0.414.0
mscorlib, Version = 2.0.0.0
mscorlib, Version = 4.0.0.0
PresentationCore, Version = 4.0.0.0
PresentationFramework, Version = 4.0.0.0
System, Version = 4.0.0.0
System.Deployment, Version = 4.0.0.0
WindowsBase, Version = 4.0.0.0

CSV Datasource does not support fields that have multiple lines

Posted: Tue Mar 06, 2012 4:02 am
by HighAley
Hello, Martin.
q123 wrote:I have downloaded SWPF_2012_2012.03.01 release which states in the changes rtf "Fix: Some bugs with csv datasource and multiline fields." and have tried this out. Unfortunately I get the same exception thrown. Could you have a look at this again as the issue does not seem to be resolved.
We couldn't reproduce this issue with our data.
Please, send us a sample report with data to reproduce it.

Thank you.

CSV Datasource does not support fields that have multiple lines

Posted: Tue Mar 06, 2012 9:19 am
by q123
Hi,
Here is the report and the test files I used. Didn't bother adding any fields to the design surface as right clicking on the datasource and selecting view data causes the following exception to be thrown.....

Cheers
Martin

PS. I have another question on this forum that is currently more important to me. Would it be possible for you to have a look at that.


----------------------------
[Customer Explanation]

----------------------------
[General Info]

Application: Stimulsoft Reports.Wpf
Framework: v4.0.30319
Version: Version: 2012.1.1214 from 1 March 2012
MachineName: MARTINSLAPTOP
OSVersion: Microsoft Windows NT 6.2.8102.0
UserName: Martin

----------------------------
[Exception Info]
Message: Index was outside the bounds of the array.

Source: Stimulsoft.Report

StackTrace:
at Stimulsoft.Report.Dictionary.StiCsvHelper.GetTableFromCsvFile(String path, Boolean forceCodePage, Int32 forcedCodePage, Boolean loadData)
at Stimulsoft.Report.Dictionary.StiCsvAdapterService.ConnectDataSourceToData(StiDictionary dictionary, StiDataSource dataSource, Boolean loadData)
at Stimulsoft.Report.Dictionary.StiDataSource.Connect(StiDataCollection datas, Boolean loadData)
at Stimulsoft.Report.WpfDesign.StiViewDataForm.Build()

----------------------------
[Assemblies]
mscorlib, Version = 2.0.0.0
PresentationFramework, Version = 3.0.0.0
Stimulsoft.Base, Version = 2012.1.1214.0
Stimulsoft.Report, Version = 2012.1.1214.0
Stimulsoft.Report.Wpf, Version = 2012.1.1214.0
Stimulsoft.Report.WpfDesign, Version = 2012.1.1214.0
System, Version = 2.0.0.0

============================================================================================================================


True





DataSource1
65001

F1,System.String
F2,System.String
F3,System.String


DataSource1
C:\Users\Martin\Desktop\New folder\test1.csv
C:\Users\Martin\Desktop\New folder\test1.csv


DataSource2
0

F1,System.String
F2,System.String
F3,System.String


DataSource2
C:\Users\Martin\Desktop\New folder\test1 - Copy.csv
C:\Users\Martin\Desktop\New folder\test1 - Copy.csv






EngineV2




None;Black;2;Solid;False;4;Black
Transparent


c80d92b06a204b84ac4d089a808cc9bf
1,1,1,1
Page1
29.7
21


Arial,100
[50:0:0:0]





System.Dll
System.Drawing.Dll
System.Windows.Forms.Dll
System.Data.Dll
System.Xml.Dll
Stimulsoft.Controls.Dll
Stimulsoft.Base.Dll
Stimulsoft.Report.Dll

Report
3/6/2012 1:06:19 PM
3/6/2012 1:02:46 PM
C:\Users\Martin\Desktop\New folder\Report.mrt
7cd2f8c3bb434d679da6485fd15ae51e
Report
Centimeters
2012.1.1214
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Data;
using Stimulsoft.Controls;
using Stimulsoft.Base.Drawing;
using Stimulsoft.Report;
using Stimulsoft.Report.Dialogs;
using Stimulsoft.Report.Components;

namespace Reports
{
public class Report : Stimulsoft.Report.StiReport
{
public Report() {
this.InitializeComponent();
}

#region StiReport Designer generated code - do not modify
#endregion StiReport Designer generated code - do not modify
}
}

CSharp





========================================= Content of test1.csv & test1 copy.csv ====================================================
F1,F2,F3
AAA,"AAA
BBB
CCC",CCC

CSV Datasource does not support fields that have multiple lines

Posted: Wed Mar 07, 2012 2:29 am
by HighAley
Hello.

Sorry, but due a technical problem this fix wasn't implemented in our last build. It will be available in our today prerelease build.

Thank you.

CSV Datasource does not support fields that have multiple lines

Posted: Fri Mar 09, 2012 10:20 pm
by q123
Hi,
I tried this with SWPF_2012.03.09.zip and it now seems to work.
Thanks
Martin

CSV Datasource does not support fields that have multiple lines

Posted: Mon Mar 12, 2012 2:48 am
by Andrew
Hello,

Great!

Let us know if you have additional questions.
Thank you.