We help IT Professionals succeed at work.

how to create crystal report programmatically using vs 2005 ide?

tryokane
tryokane asked
on
I have a requirement that i want to create crystal report at runtime.Can we create the column headers,columns and look,design what we want to display in the report programmatically without creating the screen before hand?
Comment
Watch Question

Author

Commented:
Can anyone tell about how to do?
Éric MoreauSenior .Net Consultant
CERTIFIED EXPERT
Top Expert 2016

Commented:
Every time I saw that question, it ended up saying that CR requires a report template with all the fields already created at design time.

Author

Commented:
Can u give me the code regarding setting of fields etc at runtime?
Éric MoreauSenior .Net Consultant
CERTIFIED EXPERT
Top Expert 2016

Commented:
the mapping between a field on the report and the schema of the data passed to CR has to be done at design time.

the only thing you can pass are values of textboxes (and textboxes are created at design time), criteria to filter the data, ...

Author

Commented:
Can u give me the code regarding this?
Éric MoreauSenior .Net Consultant
CERTIFIED EXPERT
Top Expert 2016

Commented:
see "Passing a value to a report object" and "Passing a value to a parameter of the report" from http://www.emoreau.com/Entries/Articles/2006/09/Feeding-Crystal-Reports-from-your-application.aspx

Author

Commented:
Can we create the display screen programmatically(about fields to appear in the report)?
Éric MoreauSenior .Net Consultant
CERTIFIED EXPERT
Top Expert 2016

Commented:
no CR needs to know them at DESIGN time.

You better think of technology other then CR if you want to do it completely at run time. Tools like Word, Excel, HTML would allow you to create whatever you want without having to create a template first.

Author

Commented:
Can u provide me the code regarding that?
Senior .Net Consultant
CERTIFIED EXPERT
Top Expert 2016
Commented:
Google for "VB.Net Excel Automation" and you will find many hits. Start with http://www.vbdotnetheaven.com/UploadFile/ggaganesh/ExcelSpreadsheet04182005093012AM/ExcelSpreadsheet.aspx

Explore More ContentExplore courses, solutions, and other research materials related to this topic.