how to create crystal report programmatically using vs 2005 ide?

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?
LVL 2
tryokaneAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

tryokaneAuthor Commented:
Can anyone tell about how to do?
0
Éric MoreauSenior .Net ConsultantCommented:
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.
0
tryokaneAuthor Commented:
Can u give me the code regarding setting of fields etc at runtime?
0
CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

Éric MoreauSenior .Net ConsultantCommented:
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, ...
0
tryokaneAuthor Commented:
Can u give me the code regarding this?
0
Éric MoreauSenior .Net ConsultantCommented:
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
0
tryokaneAuthor Commented:
Can we create the display screen programmatically(about fields to appear in the report)?
0
Éric MoreauSenior .Net ConsultantCommented:
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.
0
tryokaneAuthor Commented:
Can u provide me the code regarding that?
0
Éric MoreauSenior .Net ConsultantCommented:
Google for "VB.Net Excel Automation" and you will find many hits. Start with http://www.vbdotnetheaven.com/UploadFile/ggaganesh/ExcelSpreadsheet04182005093012AM/ExcelSpreadsheet.aspx
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.