Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamicall generating a Crystal Report

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi,

I need to dynamically generate a report using crystal reports in VC++. I found the solution for it in VB, but unable to get it in VC++.

If anyone has the solution regarding this, please respond.

Thanxs,
Rekha
 
How's about posting the solution in VB here as a tip...

D. "I want to play..."
(Guess the episode!)
 
Well here is one method i'm trying...

m_Rpt1 is a control variable of type CCrystalCtrl.

But i think we need fully licenced,latest(4.6 or higher, not sure) version of CrystalReport.
Coz,Create() is causing error(not able to find out what the error is..)
and i heard that all runtime creating features of crystal report requires licence.
I'm yet to confirm on this.
Mine is CrystalReport version 4.6 and may be that might be an issue(older version..)
But with a fully licensed, laterst version of crystal report these things should work.Just tryout and if found working pls mail me...coz even i'm in great need of it.

THese are the steps:

m_Rpt1.Create("DynamicCrystalReport",NULL,CRect(0,0,20,20),AfxGetMainWnd(),IDC_CRYSTALREPORT1);
m_Rpt1.SetConnect("DSN = ComFone;UID = comfone;PWD = comfone;DSQ = Administration");
CString Qry = "Select * from .....";
m_Rpt1.SetSQLQuery(Qry);
m_Rpt1.SetAction(1);
m_Rpt1.ShowWindow(SW_MAXIMIZE);

pls mail back your solution.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top