need a sample

Posts   
 
    
ironcross
User
Posts: 31
Joined: 12-May-2006
# Posted on: 06-Jun-2006 06:16:02   

I need sample about 'how to use crystal report with llblgen datasource' where can i find this? i have trouble with it

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39903
Joined: 17-Aug-2003
# Posted on: 06-Jun-2006 17:27:38   

It would be great if you could describe 'trouble' a bit simple_smile

Frans Bouma | Lead developer LLBLGen Pro
louthy
User
Posts: 61
Joined: 02-Aug-2005
# Posted on: 06-Jun-2006 19:20:40   

Works fine for me. Well, I say 'fine', I have come to the conclusions that Crystal Reports is just a bit amateur really. Which I find quite astounding seeing as they're at version 11, and are considered one of the big players in the reporting world.

I am in the process of moving over to SQL Server 2005 Reporting which seems far more professional and more ".NET like" if you know what I mean?

ironcross
User
Posts: 31
Joined: 12-May-2006
# Posted on: 07-Jun-2006 08:27:32   

CrystalReport1 rp = new CrystalReport1(); rp.Load("CrystalReport1.rpt"); AktTypedList akttype=new AktTypedList(); akttype.Fill(); rp.SetDataSource(akttype); crystalReportViewer1.ReportSource=rp;

didn't work

CrystalReport1 rp = new CrystalReport1(); rp.Load("CrystalReport1.rpt"); OtherCollection othercol = new OtherCollection(); othercol.GetMulti(null); rp.SetDataSource(othercol); crystalReportViewer1.ReportSource = rp;

didn.t work

i don't know why?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39903
Joined: 17-Aug-2003
# Posted on: 07-Jun-2006 10:53:55   

what does 'didn't work' mean? Exception? crystal report error? no data shown?

Frans Bouma | Lead developer LLBLGen Pro
ironcross
User
Posts: 31
Joined: 12-May-2006
# Posted on: 07-Jun-2006 13:36:37   

first error; Error 1 The call is ambiguous between the following methods or properties: 'CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSource(System.Collections.IEnumerable)' and 'CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSource(System.Data.DataTable)' C:\Visual C# Samples\oracle\Form1.cs

second it' hangs up and after it du nothing

but this works:

        CrystalReport1 rp = new CrystalReport1();
         rp.Load("CrystalReport1.rpt");
        AktTypedList akttype = new AktTypedList();

        DataSet ds = new DataSet();
        ds.Tables.Add(akttype);
        rp.SetDataSource(ds);
        crystalReportViewer1.ReportSource = rp;

it displays me password login form of report and i couldn't remove this

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39903
Joined: 17-Aug-2003
# Posted on: 08-Jun-2006 11:02:10   

The GetMulti call should work, as that fetches an entity collection which won't match with the datatable method signature. You got the same compile error when you used a getmulti on a collection?

Frans Bouma | Lead developer LLBLGen Pro
ironcross
User
Posts: 31
Joined: 12-May-2006
# Posted on: 08-Jun-2006 12:11:38   

my last writing code is workin but i don't know it's best method or not my main problem stays untouched. i can't remove crystal report login form. i am trying to do it usin ConnectionStringKeyName in DataAccessAdapter but i can't use it because not such events there. i looked inside DataAccessAdapter.cs file but thereConnectionStringKeyName is public to my opinion i can use it,but rage

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39903
Joined: 17-Aug-2003
# Posted on: 09-Jun-2006 10:06:05   

I'm not sure if it's related to llblgen pro, as it sounds like a crystal reports problem, I mean: that's the one which pops up a login screen for a reason I'm not aware of. LLBLGen Pro's generated code never pops up anything, so that's not it.

Frans Bouma | Lead developer LLBLGen Pro
sobreiro
User
Posts: 1
Joined: 13-Apr-2008
# Posted on: 13-Apr-2008 03:09:47   

Hi everyone,

This is a very common error and is generated by Crystal reports. There's two methods which overloads the "SetDataSource" and receives the datatable, one has the type specific declared "datatable" and the other receives an interface.

When you use a typed datatable the compiler don't know which method to call, in my opinion is a ugly mistake from business objects team.

To solve this issue, just parse the typed datatable to the DataTable type.

regards,