Author Topic: error accessing Work Period Report  (Read 11283 times)

Tigmon

  • Newbie
  • *
  • Posts: 2
error accessing Work Period Report
« on: February 24, 2013, 06:57:54 pm »
I have three workstations (running win7 home) and a centralized server (win7 pro) - all running Samba POS 2.99 using the server's SQL (not CE).  Samba Messaging Server is setup and functioning properly.

Sometimes when I try to access the Work Period Report - I get the error "An item with the same key has already been added".   Here are the results of some testing:

I can access the Work Period Report if I do any of the following:
 1)  I enter orders from workstation A and workstation B, but no orders are entered on workstation C.
 2)  I enter orders from workstation A and workstation C, but no orders are entered on workstation B.
 3)  Orders are only entered at workstation A
 4)  Orders are only entered at workstation B
 5)  Orders are only entered at workstation C

I can NOT access the Work Period Report if:
 3)  I enter orders from workstation B and workstation C, regardless of what I do on workstation A

It's like wkB + wkC = "An item with the same key has already been added."

Any ideas?

Thanks,
Tigmon

-----------------------------

[Exception Info 1]

Top-level Exception
Type:        System.ArgumentException
Message:     An item with the same key has already been added.
Source:      mscorlib
Stack Trace: at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
   at Samba.Modules.BasicReports.SimpleReport.AddTable(String tableName, String[] headers) in C:\Projeler\SambaPOS2\Samba.Modules.BasicReports\SimpleReport.cs:line 58
   at Samba.Modules.BasicReports.Reports.EndOfDayReport.EndDayReportViewModel.GetReport() in C:\Projeler\SambaPOS2\Samba.Modules.BasicReports\Reports\EndOfDayReport\EndDayReportViewModel.cs:line 367
   at Samba.Modules.BasicReports.ReportViewModelBase.<>c__DisplayClass9.<RefreshReport>b__2(Object , DoWorkEventArgs ) in C:\Projeler\SambaPOS2\Samba.Modules.BasicReports\ReportViewModelBase.cs:line 179
   at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
   at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)

-----------------------------

[Assembly Info]

mscorlib, Version=4.0.0.0
PresentationFramework, Version=4.0.0.0
System.Xaml, Version=4.0.0.0
System, Version=4.0.0.0
Microsoft.Practices.Prism, Version=4.0.0.0
PresentationCore, Version=4.0.0.0
Samba.Infrastructure.Data, Version=1.0.0.0
Samba.Infrastructure, Version=1.0.0.0
System.Windows.Forms, Version=4.0.0.0
System.Windows.Interactivity, Version=4.0.0.0
WindowsBase, Version=4.0.0.0
PropertyTools.Wpf, Version=2011.3.4771.32620
Microsoft.Practices.EnterpriseLibrary.Validation, Version=5.0.414.0
Samba.Domain, Version=1.0.0.0
System.Drawing, Version=4.0.0.0
System.Management, Version=4.0.0.0
UIControls, Version=1.0.0.0
System.Core, Version=4.0.0.0
Microsoft.Practices.ServiceLocation, Version=1.0.0.0
System.ComponentModel.Composition, Version=4.0.0.0
Samba.Persistance.Data, Version=1.0.0.0
Samba.Services, Version=1.0.0.0
Samba.Localization, Version=1.0.0.0
Microsoft.Practices.EnterpriseLibrary.Common, Version=5.0.414.0
mscorlib, Version=2.0.0.0
FlexButton, Version=1.0.0.0
WindowsFormsIntegration, Version=4.0.0.0

emre

  • SambaPOS Developer
  • Samba Team
  • Hero Member
  • *****
  • Posts: 1564
Re: error accessing Work Period Report
« Reply #1 on: February 24, 2013, 09:28:06 pm »
Hmm interesting.. How orders entered from workstations should not be the reason of this issue. If it happens randomly the problem might be just double clicking to the report selection commands. I mean requesting a report while it prepares another report might be the cause of this.

Try to call reports with single click and wait until displays. If it still does that I'll request your Database backup taken at the time it generates that error.

Thanks.

Tigmon

  • Newbie
  • *
  • Posts: 2
Re: error accessing Work Period Report
« Reply #2 on: February 25, 2013, 04:06:17 pm »
Hi emre,

Thanks for the reply, but No, that wasn't the problem...

I did leave out a couple of details.

I also have an android handheld RDPing into server for taking orders.  For the sake of troubleshooting my current problem, I'm not using it at the moment.  I don't think it's an issue, but on a side note, this current setup I have (3 workstations with printers and drawers, the android, a server, and a kitchen printer) runs FAST with Samba POS.  So much faster than I had imagined!!

Back to the problems - The database had originally been set up using SQL CE on a laptop, and then it was migrated to the new server.  Since then, I've done a lot of tinkering around with settings, adding/removing users, roles, printers, changed numerators, permissions, etc.

I also thought the error looked like a database/primary key already assigned problem, so I'm currently searching through tables using SQL Server Management Studio 2008 R2. I'll let you know if I find anything interesting.

PS - the problem is consistent, not a random thing

Thanks again

emre

  • SambaPOS Developer
  • Samba Team
  • Hero Member
  • *****
  • Posts: 1564
Re: error accessing Work Period Report
« Reply #3 on: February 25, 2013, 09:28:18 pm »
OK. I thought it was random. While checking it from source I noticed you have two users with same name. Changin one of them will solve that.