|
우선은 퀵레포트 화면이 있는 폼은 동적으로 생성을 해서 불러오시기 바랍니다...
그렇게 하지 않으셔도 되지만여...
엑세스 에러가 나는 것은
쾩레포트가 있는 폼이 Close 가 될때...
Close 이벤트에 Action = caFree; 를 해 주시기 바랍니다.
궁금이 님이 쓰신 글 :
: 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콤포넌트 사용된 페이지), 그리고 여러개의 퀵레포트로 구성된 폼들이 있습니다.
:
: 문제 없이 돌아가기는 잘 돌아가는데
:
: 어떻게 메모리에서 해제시켜줘야 될지를 모르겠습니다.
:
: 마지막에 메모리 억세스 에러가 나거든요..
:
: 좀 도와주셨으면 합니다.
:
: 좋은 하루 되시길...
|