 |
|
 |
I downloaded the Peter Mensah's sample, but when I press Display button then program error: "Unable to load report", please tell me why? thanks.
modified on Tuesday, December 14, 2010 10:54 PM
|
|
|
|
 |
|
 |
Hi,
How to add database object to a report in VC++ ?
How to create dynamic Crystal Report in VC++?
/// this is my code
IApplicationPtr m_pApplication;
IReportPtr m_pReport;
IFieldObjectPtr m_pobjDetail[3]; // fields pointers array for three objects
ITextObjectPtr m_pobjHeader[3]; // text pointers array for three objects
ITextObjectPtr m_pobjFooter; // fields pointer for report footer
CCrystalReportViewer4* m_pCryst;
CAdodc m_ctlADODC; // Microsoft ADO Data Control
At application startup I'm initializing m_pApplication and creating CCrystalReportViewer4 object:
...
m_pApplication.CreateInstance("CrystalRuntime.Application");
m_pCryst=new CCrystalReportViewer4;
...
After that I'm creating ADO Data Control window. When user selects a new database, I'm setting new
ADO record source and creating new report during run-time at the following manner:
ISectionPtr pSection,pHeaderSection,pFooterSection;
ISectionPtr pGroupSection;
// get reference to my ADO recordset
CAdodc& refADO=m_ctlADODC;
C_Recordset& rc=refADO.GetRecordset();
How to used this is metods
// creating a new report (***)
m_pReport = m_pApplication->NewReport();
m_pReport->Database->Tables->Add(???);
...
How to create dynamic Crystal Report in VC++?
thanks.
|
|
|
|
 |
|
 |
how should i add records in database
through dialog boxes
|
|
|
|
 |
|
 |
how should i create crystal reports in VC++
plz help me
|
|
|
|
 |
|
 |
I am using VC++ MFC Application wizard.I am having Windows 2000 professional at my work place.Actually there are many word documents with almost the same information, with little changes.As saving all these word documents will take unneccesary space in the system,I would like to use crystal reports,so that I can set the common format of this word document and make them as report and print whenever necessary.
As I havnt worked on crystal reports before, I just wanted to know Can I do the above procedure and which version of crystal reports should I download for Windows 2000 professional OS?Can anyone tell me..pls?
|
|
|
|
 |
|
 |
Hi Every one there.
I want to send data to "crystal report" control without sending it first in database.
Is there any way to do so.
Thanks in anticipation.
Regards:
Aamir Khan Jadoon.
|
|
|
|
 |
|
 |
Hi peter,
I am working on visual c++ 6.0 and vc++ 2005 and i need to implement push technology in c++ which is supported by crystal reports.
pull technology
push technology
i need to implement push technology so can you tell me whether it is possible for me to implement push technology using crystal reports in vc++.
Jalsa
|
|
|
|
 |
|
 |
Hi
I Want to convert my crystel report into the excel/PDF. How can I convert it... I am using Cystal Report8 with VC++6
Waiting for the reply..
Thanks in advance.
Mak
Mak
|
|
|
|
 |
|
 |
There is API for exporting report with any file type.
I'll show the way how use Crystal Report 11.5 with VC++6.0
// ---------------------------------------------------
// CrystalReportTestDlg.h
// ---------------------------------------------------
#import "C:\\Program Files\\Business Objects\\Common\3.5\bin\\craxdrt.dll" no_namespace
class CCrystalReportTestDlg : public CDialog
{
// Construction
public:
CCrystalReportTestDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CCrystalReportTestDlg)
enum { IDD = IDD_CRYSTALREPORTTEST_DIALOG };
CCrystalReportViewer11 m_axReportViewer;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CCrystalReportTestDlg)
public:
virtual BOOL PreTranslateMessage(MSG* pMsg);
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CCrystalReportTestDlg)
virtual BOOL OnInitDialog();
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnSize(UINT nType, int cx, int cy);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
protected:
IApplicationPtr m_Application;
IReportPtr m_Report;
VARIANT dummy;
};
// ---------------------------------------------------
// CrystalReportTestDlg.cpp
// ---------------------------------------------------
BOOL CCrystalReportTestDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
// TODO: Add extra initialization here
HRESULT hr = S_OK;
// A dummy variant
VariantInit(&dummy);
dummy.vt = VT_EMPTY;
// Specify the path to the report you want to print
_bstr_t ReportPath( _T("World Sales Report.rpt") );
_variant_t vtEmpty(DISP_E_PARAMNOTFOUND, VT_ERROR);
// Instantiate the IApplication object
hr = m_Application.CreateInstance("CrystalRuntime.Application");
if( SUCCEEDED(hr) == FALSE)
{
AfxMessageBox("Fail to create Crystal Report Application Instance");
}
// Open the Report using the OpenReport method
m_Report = m_Application->OpenReport(ReportPath, dummy);
if(m_Report == NULL)
{
AfxMessageBox("Fail to open Crystal Report Document File");
}
// Display the Report to window
m_axReportViewer.SetReportSource(m_Report);
m_axReportViewer.ViewReport();
return TRUE; // return TRUE unless you set the focus to a control
}
void CCrystalReportTestDlg::OnLButtonDown(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
// Export the Report to File
m_Report->Export(dummy);
CDialog::OnLButtonDown(nFlags, point);
}
|
|
|
|
 |
|
 |
Hi, I'm new to crystal report with visual C++, I had download the sample program from Peter Hensah. Thanks. But when I compile it there were no error but when I click on Display button it give me error ' Can not find Database DLL. What should I do.Please help. Thank You in advance.
|
|
|
|
 |
|
 |
i want to develop an application which will embed crystal report 2008 in visual c++ 6. i am new to vc++ programming an crystsl report. please help me in this regard. thanx!
|
|
|
|
 |
|
 |
Hi,
Would you be interested in beta testing ReportMAX. This tool is specially designed for Visual C++ developers. For more info:
www.cppmax.com
|
|
|
|
 |
|
 |
Peter Mensah has explained Crystal Reports 8.0 in VC++ with an example application. I need the same with Crystal Reports 11. Because Crystal Reports 8.0 example is not working in Crystal Reports 11.
Please give me the executed code with the same example which is given by Peter Mensah.
I will be waiting for reply.
Bye,
Thank you
|
|
|
|
 |
|
 |
I am a vc++6.0 programmer i would like to use crystal reports 8.0 but i do not know how to get the software (Crystal reports 8.0). Please give me the software with winzip(.zip) format to "RAMESHBABUPEDDAPALLI@YAHOO.CO.IN" .So i can install in my system.
Please give me the procedure too in a step by step manner.
If possible explain by using one example.
Anticipating a favourable reply
Bye,
Thank you
Ramesh Babu Peddapalli
|
|
|
|
 |
|
 |
hi,
i am makin two-tier application .
i want to just dump some data on the crystal reports...
ie like...suppose user at runtime may enter "abcd"
i want to dump that on crystal report...how do i do dat?
|
|
|
|
 |
|
 |
Hi Every one there.
I have same problem like blacklife_85.
I want to send data to "crystal report" control without sending it in database.
Is there any one Volunteer who help us out.
Thanks in anticipation.
Regards:
Aamir Khan Jadoon.
|
|
|
|
 |
|
 |
Hi, I've read your message about "Displaying Crystal Report 8.0 reports in Visual C++ 6.0" and I've done it all, but the only thing i've got when i run is a Message telling me "Imposible to Open DataBase" (well in spanish), a few days before i tried to do it too and I change the adress to the one where the report is -in your app, and in mine too- but i received another message telling me "Unable to load the Report".
Pls, i was wondering if you can help, me. I'd really apreciate it. Thank you.
|
|
|
|
 |
|
 |
It's ok now, sorry for my question, i've already solve the problem, thanks.
But I'd like to ask another question.
How can I do if I've got to text boxes that controls a range for the values, for example for dates:
str = "{Ticket.StartDate} >= \"" +m_StartDate+"\"" and "{Ticket.FinalDate} <= \"" +m_FinalDate+"\"";
this is the way i'm doing it but it doesn't run.
Thx for all again. (and if u know of a place where i can see this kind of sentences that i need for Crystal Reports, pls tell me, I'm allready looking for them)
|
|
|
|
 |
|
 |
I can't see your componemt when I installed CR11, could you help me?
[IMG]http://sinhvienufa.vietnam-it.com/forums/html/avatars/dethuong/Avatar7A1F.gif[/IMG]
|
|
|
|
 |
|
 |
hello dear ...
i need your help another one ,i integrited vc++6 with crystal report xi ,and i could open the report and print it from mfc interface ,but the problem is that .... after i save the report ,it never sees the changes which i made them on the database's .
thanks alot .
|
|
|
|
 |
|
 |
set the Discarded save data to true from the crystal report property or you can set it in your code
eg
m_crystal.SetDiscardedSavedData(TRUE); where m_crystal is an object of type Crystal Control
a student form Ghana
|
|
|
|
 |
|
 |
How did you integrate Crystal report 11 with MFC application? I am not able to display my crystal report11 in MFC app.
Pl help me out...!!
|
|
|
|
 |
|
 |
hi ...please i need help
how could i create report with vc++ using crystal reportXI?
and how to use crystal report view class?? is there any tutorial or sample code avaliable somewhere .
thanks alot for interest in my query .
|
|
|
|
 |
|
 |
Hi,
I got one problem in displaying data from mysql in crystal report!
As I know crystal report can display the data from database after setting manually!
If I got a program doing in MFC which allow user to select to display
certain period of the data by date, hw the crystal report know the string(date)
choose by user and display it? What setting or sql query we need to do in crystal report?
Thanks!
|
|
|
|
 |
|
 |
hi all,
i m new in MFC and CR,
I manage to run the example source but whn i click display1 or display2,
its shows unable to open database!!
May i know hw you made connection DSN to database?
|
|
|
|
 |