J
Jonathan
Hi all,
It's my first post here, so be kind
I got a little application that keep track of a small inventory, everything was going great until came the time to make some types of reports. I want to use Crystal Reports in the background to generate the reports for me, i don't want any preview, any popup (only a print dialog then send it to the selected printer). That should be pretty easy
First of all, my app doesnt make any use of dataset nor dataadapter. When i retreive the data from my DB i received a collection of items (ArrayList), which, i convert back to a special dataset(only 1 table) i've created, which is bind to my CR report. Which seem to be ok, since i've managed to draw the report.
Here's the offending code
ArrayList arrCuts = Data.FacadeData.Instance.GetCut(infosWireCuts);
DataCuts dataCuts = new DataCuts(); <= Creation of the temporary DS
foreach (Data.InfosWireCuts wireCut in arrCuts)
{
DataCuts.WireCutsRow rowCut= dataCuts.WireCuts.NewCutRow();
rowCut.NoCut = wireCut.NoCut;
...
(converting my arraylist into a dataset)
...
dataCuts.WireCuts.AddCutRow(rowCut);
}
InventoryReport report = new InventoryReport ();
report.PrintToPrinter(1, false, 0, 0); <= The exception is throw in here
The exception thrown is of type: CrystalDecisions.CrystalReports.Engine.LogOnException, which is a little dumb since i'm using a dataset.
If anyone have ideas or suggestions, plz tell me, it would be really apprecited...
Thx in Advance
Jonathan
It's my first post here, so be kind
I got a little application that keep track of a small inventory, everything was going great until came the time to make some types of reports. I want to use Crystal Reports in the background to generate the reports for me, i don't want any preview, any popup (only a print dialog then send it to the selected printer). That should be pretty easy
First of all, my app doesnt make any use of dataset nor dataadapter. When i retreive the data from my DB i received a collection of items (ArrayList), which, i convert back to a special dataset(only 1 table) i've created, which is bind to my CR report. Which seem to be ok, since i've managed to draw the report.
Here's the offending code
ArrayList arrCuts = Data.FacadeData.Instance.GetCut(infosWireCuts);
DataCuts dataCuts = new DataCuts(); <= Creation of the temporary DS
foreach (Data.InfosWireCuts wireCut in arrCuts)
{
DataCuts.WireCutsRow rowCut= dataCuts.WireCuts.NewCutRow();
rowCut.NoCut = wireCut.NoCut;
...
(converting my arraylist into a dataset)
...
dataCuts.WireCuts.AddCutRow(rowCut);
}
InventoryReport report = new InventoryReport ();
report.PrintToPrinter(1, false, 0, 0); <= The exception is throw in here
The exception thrown is of type: CrystalDecisions.CrystalReports.Engine.LogOnException, which is a little dumb since i'm using a dataset.
If anyone have ideas or suggestions, plz tell me, it would be really apprecited...
Thx in Advance
Jonathan