Print Page | Close Window

how to export ReportControl data

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=4344
Printed Date: 17 July 2025 at 10:19pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: how to export ReportControl data
Posted By: lwg191
Subject: how to export ReportControl data
Date Posted: 05 June 2006 at 2:15am

how export ReportControl data to a txt file or a excel file?

thanks




Replies:
Posted By: sserge
Date Posted: 05 June 2006 at 9:32am
Hi,

First of all you can simply copy/paste your records from/to Excel and txt files.

If you'd like to do it programmatically, please specify your environment.

--
WBR,
Serge


Posted By: lwg191
Date Posted: 06 June 2006 at 9:14am

sserge:
thank you for your reply!

I'd like to do this programmatically,my develop environment is VC++7.0+Win2000.
Could you give me some samples for this (export data to excel or txt file)?



Posted By: sserge
Date Posted: 06 June 2006 at 5:37pm
An example of storing Report Control data in XML file exist in the ReportSample. See method CReportSampleView::SaveReportState, or below:

CXTPPropExchangeXMLNode px(FALSE, 0, _T("ReportControl"));
CXTPPropExchangeSection secRecords(px.GetSection(_T("Records")));
GetReportCtrl().GetRecords()->DoPropExchange(&secReco rds);
px.SaveToFile(_T("c:\\ReportControl.xml"));


With other CXTPPropExchange derived classes you can save data to other formats. There are no native support for Excel files, but it can easily open generated XML file.

--
WBR,
Serge


Posted By: lwg191
Date Posted: 06 June 2006 at 8:33pm
thank you



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net