C++Builder Programming Forum
C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
C++빌더 포럼
Q & A
FAQ
팁&트릭
강좌/문서
자료실
컴포넌트/라이브러리
메신저 프로젝트
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
볼랜드포럼 광고 모집

C++빌더 Q&A
C++Builder Programming Q&A
[17595] 퀵레포트에서 미리보기...
궁금이 [] 937 읽음    2002-04-15 18:11
void __fastcall TFrmMain::Button1Click(TObject *Sender)
{
         m_pCustPreview = new TFrmResultViewMain(this);      //검사 결과 화면
    MakeAndPreviewAttentionReport();
    MakeAndPreviewMemoryReport();
    MakeAndPreviewMotorReport();
    MakeAndPreviewPerformanceReport();
    MakeAndPreviewReactionTimeReport();
    //Report 제작

    m_pCustPreview->m_pFirstPage->QuickRep1->OnPreview = CustomPreview;
    m_pCustPreview->m_pFirstPage->QuickRep1->Preview();
}

void __fastcall TFrmMain::CustomPreview(TObject *Sender)
{
    m_pCustPreview->QRPreview1->QRPrinter = (TQRPrinter*) Sender;
    m_pCustPreview->Show();
}

void __fastcall TFrmMain::MakeAndPreviewPerformanceReport()
{
    if(m_pCustPreview->m_pReportGraph!=NULL) {
        m_pCustPreview->m_pReportGraph->Free(); // by BooOne
    }
    m_pCustPreview->m_pReportGraph = new TFrmReportGraph(m_pCustPreview);
}

void __fastcall TFrmMain::MakeAndPreviewReactionTimeReport()
{
    if(m_pCustPreview->m_pReportGraph2!=NULL) {
        m_pCustPreview->m_pReportGraph2->Free();   // by BooOne
    }
    m_pCustPreview->m_pReportGraph2 = new TFrmReportGraph(m_pCustPreview);
}

폼은 메인 폼, 리포트 메인(QRPreview1콤포넌트 사용된 페이지), 그리고 여러개의 퀵레포트로 구성된 폼들이 있습니다.

문제 없이 돌아가기는 잘 돌아가는데

어떻게 메모리에서 해제시켜줘야 될지를 모르겠습니다.

마지막에 메모리 억세스 에러가 나거든요..

좀 도와주셨으면 합니다.

좋은 하루 되시길...

+ -

관련 글 리스트
17595 퀵레포트에서 미리보기... 궁금이 937 2002/04/15
17596     Re:퀵레포트에서 미리보기... 오정훈 1084 2002/04/15
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.