• AX 水晶报表


     1 void ViewCrystalReport() 
     2 { 
     3   Com comapp; 
     4   Com reporting; 
     5   str paramwhole; 
     6   str paramfilename; 
     7   str paramCond; 
     8   str ViewYesNo; 
     9   int ret; 
    10   COMVariant variant; 
    11 
    12   ; 
    13 
    14   variant = new COMvariant(COMVariantInOut::OUT,COMVariantType::VT_BOOL) ; 
    15   paramwhole = this.args().parm(); 
    16   comapp = new COM("CrystalRuntime.Application.11"); 
    17 
    18   ret = strfind(paramwhole,"|",2,strlen(paramwhole)); 
    19 
    20   paramfilename = substr(paramwhole,2,ret-2) ; 
    21   ViewYesNo = substr(paramwhole,1,1); 
    22   reporting = comapp.openreport(paramfilename); 
    23   reporting.discardsaveddata(); 
    24   reporting.readrecords(); 
    25 
    26   paramcond = substr(paramwhole,ret+1,strlen(paramwhole)); 
    27 
    28   reporting.RecordSelectionFormula(paramCond); 
    29 
    30   if (ViewYesNo == 'N') 
    31   { 
    32     variant.boolean(false); 
    33     reporting.PrintOut(variant); 
    34   } 
    35   else 
    36   { 
    37     ActiveX.ReportSource(reporting); 
    38     ActiveX.width(1200); 
    39     ActiveX.height(750); 
    40     ActiveX.DisplayToolbar(true); 
    41     ActiveX.DisplayGroupTree(false); 
    42     ActiveX.Refresh(); 
    43     ActiveX.ViewReport(); 
    44     ActiveX.Refresh(); 
    45   } 
    46 
    47 
    48 }
  • 相关阅读:
    中国剩余定理(CRT) & 扩展中国剩余定理(ExCRT)总结
    各种求逆元
    A*(A_star)搜索总结
    线段树总结
    C++的STL
    Unable to make the session state request to the session state server处理方法
    判断UserAgent是否来自微信
    VS2010 EntityFramework Database First
    VS2010类似Eclipse文件查找功能-定位到
    Newtonsoft.Json随手记
  • 原文地址:https://www.cnblogs.com/Jinnchu/p/2659960.html
Copyright © 2020-2023  润新知