|
-
Dec 13th, 2005, 11:40 PM
#1
Thread Starter
Frenzied Member
[RESOLVED] Manually Create Crystal Report Data (no database connection)
Hi,
I have looked for code examples for crystal reports and all i find is using the wizard to add tables from your chosen database source, But I need to create the data at runtime with code, not just use a database connection.
I found one example of specifying what fields to display with the report viewer control, but i cant seem to find any examples on how to simply add my own data, for example Fields.Add("a field name and type") and then Records.Add("a row of data")
Does anybody know how to do this?
Any help is appreciated
-
Dec 14th, 2005, 09:57 AM
#2
Fanatic Member
Re: Manually Create Crystal Report Data (no database connection)
For the data, you can pass in XML or a DataSet that you have built. For creating the whole report at run-time, it can be done, but I have not done it before. What I have done, though, is create a report with all of the possible layouts and then used formulas to show or hide various header, footer or details sections in my reports. I don't know if this will work in you situation, though.
-
Dec 14th, 2005, 10:12 AM
#3
Thread Starter
Frenzied Member
Re: Manually Create Crystal Report Data (no database connection)
Thanks for your reply,
i did get as far as creating my dataset, but no way to have fields in my report to retrieve from it, as it seems they have to be put in at design time, i played with parameters which allowed me to add data to the report, but that wasnt very successful.
My basic problem is how to add an IField object to a report at runtime? I am not even able to add one at design time without a datasource attached to the report.
I have made the reports write as HTML pages for now, this is an acceptable solution, but crystal reports is preferred.
-
Dec 14th, 2005, 10:15 AM
#4
Fanatic Member
Re: Manually Create Crystal Report Data (no database connection)
I know that with the full version of Crystal Reports that there is an API that can be used to create report definitions on the fly, but I am just not sure how much of that power was placed into .NET. I always use the full version as it adds more functionality and my company purchased it, too.
-
Dec 14th, 2005, 10:20 AM
#5
Thread Starter
Frenzied Member
Re: Manually Create Crystal Report Data (no database connection)
Oh I see. If That is the case, this is an expense that i don't want to wear, and would be impossible to palm onto the client.
Thanks for the info, i'll do some research on it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|