mustafvi
asked on
Export to .csv file (Urgent)
Hi all,
I want to export my Crystal Report to .csv file.
I am using .Net with C#(ASP.Net).
How i can do this in .Net Framework using ASP.Net (C#)??
I want to export my Crystal Report to .csv file.
I am using .Net with C#(ASP.Net).
How i can do this in .Net Framework using ASP.Net (C#)??
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Please, mustafvi, for 50 points - don't be too demanding.
I don't have .Net or C# so I took a shot that it had what you wanted.
I believe the examples show how to export.
I thought the only thing you would have to do is
1. Set the export type - TOFILE rather than TOAPPLICATION
2. Set the diskfile name
3. Set the fileexporttype to creftCSV (i think that is the type for a CSV file)
C# may require other things.
Sorry.
mlmcc
I believe the examples show how to export.
I thought the only thing you would have to do is
1. Set the export type - TOFILE rather than TOAPPLICATION
2. Set the diskfile name
3. Set the fileexporttype to creftCSV (i think that is the type for a CSV file)
C# may require other things.
Sorry.
mlmcc
ASKER
Dear,
How i can do the above mentioned things.
How i can do the above mentioned things.
Did you look at the code supplied in the earlier link? Is any of it useful? If so post it. I can give you what works in VB but the .NET & C# are much different.
mlmcc
mlmcc
ASKER
Dear all,
How i can export .rpt to .csv file.
Following is the Source code to export it into PDF format on export button in C#(ASP.Net). Please reveiw it and reply me the code of export in .csv file
CrystalReport1 myrpt = new CrystalReport1();
CrystalDecisions.Shared.Di skFileDest inationOpt ions ds = new CrystalDecisions.Shared.Di skFileDest inationOpt ions();
myrpt.ExportOptions.Export Destinatio nType = CrystalDecisions.Shared.Ex portDestin ationType. DiskFile;
myrpt.ExportOptions.Export FormatType = CrystalDecisions.Shared.Ex portFormat Type.Porta bleDocForm at;
ds.DiskFileName="D:\\Test\ \MyReport. pdf";
myrpt.ExportOptions.Destin ationOptio ns = ds;
myrpt.Export();
How i can export .rpt to .csv file.
Following is the Source code to export it into PDF format on export button in C#(ASP.Net). Please reveiw it and reply me the code of export in .csv file
CrystalReport1 myrpt = new CrystalReport1();
CrystalDecisions.Shared.Di
myrpt.ExportOptions.Export
myrpt.ExportOptions.Export
ds.DiskFileName="D:\\Test\
myrpt.ExportOptions.Destin
myrpt.Export();
Can you not search for 'ExportFormatType' in your help files and find the option for CSV?
I also do not have .NET
I also do not have .NET
Try
myrpt.ExportOptions.Export FormatType = CrystalDecisions.Shared.Ex portFormat Type.CSV;
myrpt.ExportOptions.Export FormatType = CrystalDecisions.Shared.Ex portFormat Type.Comma SeparatedV alues;
ds.DiskFileName="D:\\Test\ \MyReport. csv";
mlmcc
myrpt.ExportOptions.Export
myrpt.ExportOptions.Export
ds.DiskFileName="D:\\Test\
mlmcc
ASKER
Dear all,
When i try to use the above thing it shows me an error message as
CrystalDecisions.Shared.Ex portFormat Type ,
does not contain a definition for 'CSV',
so, please check it and then mail me.
When i try to use the above thing it shows me an error message as
CrystalDecisions.Shared.Ex
does not contain a definition for 'CSV',
so, please check it and then mail me.
Just went looking for some documentation.
The .NET documentation is in the MSDN documentation
http://msdn.microsoft.com/library/?url=/library/en-us/crystlmn/html/crconcrystalreports.asp?frame=true
According to this it doesn't seem to hace a CSV export capability. Here are the formats it lists.
Member Name Description
Excel Export format of the report is a Microsoft Excel file.
HTML32 Export format of the report is an HTML 3.2 file.
HTML40 Export format of the report is an HTML 4.0 file.
NoFormat No export format specified.
PortableDocFormat Export format of the report is a PDF file.
RichText Export format of the report is a rich text file.
WordForWindows Export format of the report is a Microsoft Word file.
sorry
mlmcc
The .NET documentation is in the MSDN documentation
http://msdn.microsoft.com/library/?url=/library/en-us/crystlmn/html/crconcrystalreports.asp?frame=true
According to this it doesn't seem to hace a CSV export capability. Here are the formats it lists.
Member Name Description
Excel Export format of the report is a Microsoft Excel file.
HTML32 Export format of the report is an HTML 3.2 file.
HTML40 Export format of the report is an HTML 4.0 file.
NoFormat No export format specified.
PortableDocFormat Export format of the report is a PDF file.
RichText Export format of the report is a rich text file.
WordForWindows Export format of the report is a Microsoft Word file.
sorry
mlmcc
Just verified using the feature comparison pdf from CR.
The export formats are on page 3 of the document and CSV is not supported by .NET
http://support.crystaldecisions.com/communityCS/TechnicalPapers/cr9feat_ver.pdf
mlmcc
The export formats are on page 3 of the document and CSV is not supported by .NET
http://support.crystaldecisions.com/communityCS/TechnicalPapers/cr9feat_ver.pdf
mlmcc
Do you have a fancy layout that you are exporting from?
If your goal is just to export to CSV then we could probably do it another way.
If your goal is just to export to CSV then we could probably do it another way.
Could export to Excel then go to CSV.
Could write an asp application to export the recordset.
mlmcc
Could write an asp application to export the recordset.
mlmcc
This question has been classified as abandoned. I will make a recommendation to the moderators on its resolution in approximately one week. I would appreciate any comments by the experts that would help me in making a recommendation.
It is assumed that any participant not responding to this request is no longer interested in its final deposition.
If the asker does not know how to close the question, the options are here:
https://www.experts-exchange.com/help.jsp#hs5
mnye
EE Cleanup Volunteer
It is assumed that any participant not responding to this request is no longer interested in its final deposition.
If the asker does not know how to close the question, the options are here:
https://www.experts-exchange.com/help.jsp#hs5
mnye
EE Cleanup Volunteer
My last 2 comments showed what he wants to do can't be done with his version of Crystal.
mlmcc
mlmcc
Wrong!
Your last two comments have little to do with it! But maybe a couple before then.
Please give the points to mike - errm - mlmcc.
Your last two comments have little to do with it! But maybe a couple before then.
Please give the points to mike - errm - mlmcc.
You're right. must have been asleep when I looked at that one.
mlmcc
mlmcc
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:
Accept: mlmcc {http:#7571146}
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
mnye
EE Cleanup Volunteer
I will leave the following recommendation for this question in the Cleanup topic area:
Accept: mlmcc {http:#7571146}
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
mnye
EE Cleanup Volunteer
ASKER
in the above link, it is not mentioned to export in .csv file.
so, please first do the thing and then mail me the exact answer.