Link to home
Start Free TrialLog in
Avatar of shieldguy
shieldguyFlag for United Kingdom of Great Britain and Northern Ireland

asked on

How to create crystal report dynamically with dataset

In VB.net application I am generating the dataset which contains several tables these tables have no relation between them, now I need to display all those tables on the crystal report

Also I am not sure about the exact number of tables and number columns in the table because they all are generating dynamically

I really appriciate any code examples

Thanks
Avatar of hatem72
hatem72

Hi,

you can use Temp Table and gather all needed data in that table ... and just
linke your temp Table to your report .
No need to use temp tables, you can pass datasets into crystal reports.  You can find the code samples needed here:  http://www.businessobjects.com/global/pdf/dev_zone/VS2005_Walkthroughs.pdf     Note that Visual Studio help and MSDN have code samples as well.

You will need to define the report structure in advance however - you can for example design a report with 10 columns and if your table only has 6 just pass the six columns and four null columns.

Because there's no relationship between the tables you're going to need to either do separate crystal reports or you can do each table as a subreport and put all subreports into a single 'main' report.  It'll have to be one or the other because Crystal won't support disconnected tables gracefully.

frodoman
Avatar of Mike McCracken
I agree with frodoman.  

You can also do the entire report from an application but that will require a separate license for each user and the stand-alone version of Crystal.  

What is the purpose of this reporting?

I find many times the user thinks he needs maximum flexibilty but after reviewing the requirements, I can build one o more reports that satisfy the requirements even if it means having a few extra fields in a report.  

mlmcc
>>Also I am not sure about the exact number of tables and number columns in the table because they all are generating dynamically

Normally, a report is bound to a datasource definition (tables, fields, ...). It would probably be better to find another format like outputting to an HTML format.
ASKER CERTIFIED SOLUTION
Avatar of hatem72
hatem72

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial