Click here to Skip to main content
Click here to Skip to main content

Integrate Crystal Reports Runtime Designer & Viewer With MFC

, 4 Oct 2005 CPOL
Rate this:
Please Sign up or sign in to vote.
Integrate Crystal Reports Runtime Designer & Viewer With MFC
<!-- Article Starts - DO NOT ADD HTML/BODY START TAGS-->

Sample Image - IntegrateCrystalReports.gif


I try to integrate crystal report runtime designer, after time of searching i have a small test app.
a dialog based application, that allow you yo view or create new report.


the res dialog have to control the back layer is (IDC_ACTIVEXREPORTVIEWER1) and the front one is (IDC_EMBEDDABLECRYSTALREPORTSDESIGNERCTRL1)

you can insert the crystal report component to your project from (Project->Add To Project-> Components and control) then select ( Crystal ActiveX Viewer 10.0 - Embeddable Crystal Reports Designer Control 10.0)

you must have 2 member variable:
*-  IApplicationPtr  m_Application; to create a crystal application
*-  IReportPtr  m_Report; to create a crystal report file

i use pBtPrivew and pBtDesigner to switch between viewer and runtime designer

don't  forget to do import the runtime dll
#import "<Drive>\\Program Files\\Common Files\\Crystal Decisions\\2.5\\bin\\craxdrt.dll" no_namespace



This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Tarek Ahmed Abdel Rahmane
Software Developer Tatweer For Information Technology
Egypt Egypt
* Under Construct *

Comments and Discussions

QuestionConverting to dll /using in Pinmemberafreen_201017-Jun-13 2:46 
QuestionCrystal report runtime Pinmembertanphat26-Jan-12 2:44 
QuestionHow to build with visual studio 2010 Pinmemberhat0412-Dec-10 8:10 
AnswerRe: How to build with visual studio 2010 PinmemberTarek Ahmed Abdel Rahmane12-Dec-10 9:37 
QuestionCrystal Report PinmemberMember 83208616-Feb-10 5:30 
QuestionHow to use designer in c# project. Pinmemberneer12-Dec-09 1:34 
QuestionApp crashes after opening crystal report dialog a second time PinmemberVachaun226-Oct-09 11:18 
My application is working fine, as long as you don't try to open the dialog with the report a second time.
I'm not sure what it is, but I'm getting an assertion when trying to load the dialog failing in afxwin2.inl on the following lines:
_AFXWIN_INLINE void CWnd::UpdateWindow()
	{ ASSERT(::IsWindow(m_hWnd)); ::UpdateWindow(m_hWnd); }
It must be a window inside the activeX control as I've checked the activeX control window itself and the dialog to ensure that both windows in fact do exist. Neither cause an assertion.
So I can only assume that this is caused by a control that lives inside the activeX control perhaps?
Has anyone experienced this issue, and possibly come up with a work around?
Generalvinod needs Your help [modified] PinmemberMember 391854131-Dec-08 0:26 
GeneralCrystal Report 10.0 Craxdrt.dll 3:06 
GeneralAgain PinmemberElaaber5-Jan-07 11:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150327.1 | Last Updated 5 Oct 2005
Article Copyright 2005 by Tarek Ahmed Abdel Rahmane
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid