Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

MFC and Crystal Report 10,Help me plz

AsAdiAsAdi Member Posts: 117
[b][red]This message was edited by AsAdi at 2006-3-3 23:53:29[/red][/b][hr]
Dear Freinds

I've developed a MFC Windows application using .NET 2003,working with a SQL Server database and almost finished it.But I want to add some reports to this app. using crystal report 10.0 which I have on my Windows.I think I have to use Crystal report viewer ActiveX,but I don't know how to use it,I put the control on my form and when I decided to set some properties corresponding to some document,I couldn't find them.

Please help me finish my application and get rid of my boss,He asks me about this application every day,:-)).Any help will be highly appreciated.

Regards


Comments

  • jakkanijakkani Member Posts: 1
    [b][red]This message was edited by jakkani at 2006-10-9 2:15:24[/red][/b][hr]
    CCrystalCtrl *m_cryscontrol = ( CCrystalCtrl*)( GetDlgItem(IDC_CRYSTALREPORT1));

    CString str =_T("");
    CString path = _T("");//This path is ur crystal viewer activeX path.
    CString Filter = _T("");

    Filter = "SELECT REGISTRATIONNUMBER,CALLSIGN,REMARKS,DROPCAPABLE FROM Table_B WHERE ";

    m_cryscontrol->SetReportFileName(path);
    TRACE("SQL QUERY:%s

    ",Filter);
    //m_cryscontrol->SetSelectionFormula(str);
    m_cryscontrol->SetSQLQuery(Filter);
    m_cryscontrol->SetDiscardSavedData(TRUE);
    m_cryscontrol ->SetAction(TRUE);

    The above code works for VC 6.0 on windows but aidon't know abt .Net2003.
    plz go thru it .if clicks reply me.

    thanks,
    jakkani

    : [b][red]This message was edited by AsAdi at 2006-3-3 23:53:29[/red][/b][hr]
    : Dear Freinds
    :
    : I've developed a MFC Windows application using .NET 2003,working with a SQL Server database and almost finished it.But I want to add some reports to this app. using crystal report 10.0 which I have on my Windows.I think I have to use Crystal report viewer ActiveX,but I don't know how to use it,I put the control on my form and when I decided to set some properties corresponding to some document,I couldn't find them.
    :
    : Please help me finish my application and get rid of my boss,He asks me about this application every day,:-)).Any help will be highly appreciated.
    :
    : Regards
    :
    :
    :



  • apurv146apurv146 Member Posts: 1
    From where you got "CCrystalCtrl" class? Is it a userdefined class or it's in crystal report itself?
Sign In or Register to comment.