Date post: | 06-Jul-2018 |
Category: |
Documents |
Upload: | euelvis1045 |
View: | 228 times |
Download: | 0 times |
of 160
8/16/2019 Report designer Manual - 19.Appendix IV
1/160
Appendix . Report Designer OCX Methods, Propert ies, Events
81
Appendix IV. Methods, Properties & Events of
Report Designer OCX
4.1. Methods of Report Designer OCX
The following table shows methods of Report Designer OCX by each category.
Category The Names of MethodsFindDialog
OpenFileDialogPrintDialogSaveAsDialog
SetPartSaveDialog
SetSaveDialog
Dialog Box
SetSaveDialogEx
Data Set SetRDataExecuteFile
UploadDataFileTool
UploadDataFileEx
Document List RprFileOpen
CancelReport
EnableThreadEngineFileOpen
RefreshReport
SetAgentUserInfoSetAppendReport
SetFocusToChart
SetHttpAccessType
SetKindOfParamSetNodataObjFile
SetArgumentEncrypt
Report Execution
ShowMemoLineGetLastErrorMsg
GetPageSizeGetReportInfoGetTotalPageNo
Report Information
IsError
CMPrint
ServerPrint
SetNoPrintNoDataSetPrint
SetPrint2
SetPrint3SetPrint4
SetPrintInfo
SetRemakeReport
8/16/2019 Report designer Manual - 19.Appendix IV
2/160
Append ix . Repor t Designer OCX Methods, Properties, Events
82
SetSpoolPage
SaveAsEmfFile
SaveAsFaxFormat
SaveAsIEmfFileSaveAsImagefileSaveAsMrrFile
SaveAsMrrmlFile
SaveAsPdfFileSaveAsPptFile
SaveAsTxtFile
SaveAsWordFile
SaveAsXlsFile
SaveAsXmlFile
SavePageSendMail
SendMailEx
SetPrinttoFileSetSaveExcelOption
SetSaveTiffOption
SetSessionInfoSetTifCompressType
SetTifImageScale
ViewExcel
ViewExportFile
ViewPDFViewPpt
Save
ViewWord AddDiagonalSeries
ChangeSeriesChart
SetChartPenAttr
Argument Value Setting SetParamValue
GetComboboxValueGetTextboxValue
SetComboboxValueField Data
SetTextboxValueCloseBrowser
FirstPage
LastPage
NextDocNextPagePrevDoc
PrevPage
RefreshWindowZoomDefault
ZoomIn
ZoomOut
Screen
ZoomPage
ApplyLicense
DisableToolbar
HideChartMenu
Environment
HidePopupMenu
8/16/2019 Report designer Manual - 19.Appendix IV
3/160
Appendix . Report Designer OCX Methods, Propert ies, Events
83
HideScrollBar
HideStatusBar
HideToolBar
HideTreeMenuSetBackgroundColor
SetCacheOptionSetDefaultPenAttr
SetDefaultPlaneAttr
SetMessageboxShow
SetMsgTitle
SetNoDataDialogInfoSetPageColor
SetPageLineColor
SetPageScrollSetReportDialogInfo
SetTraceShowChartMenuShowIndexTree
ShowPopupMenu
ShowScrollBar
ShowStatusBarShowToolBar
ShowTreeMenu
ViewShowMode
Report Designer OCX provides the method to save a document as various format files.
A document can be saved as MRR, XLS, TXT, MRRML, PDF, TIF, BMP, GIF, JPG, XML,
HWP, EMF, PPT, or DOC files. But Standard Version of Report Designer OCX supports
MRR, XLS, TXT, and MRRML file formats only.
A new file name is supposed to have a specific extension for the security reason, when it
calls a method to save the file. For example, in the case of calling the method of
SaveAsXlsFile to save a file as XLS format, the file name is returned as an Argument, there
by creating its extension as XLS.
The usage of methods are JavaScript samples which are used in linking with Report
Designer OCX on the Web.
8/16/2019 Report designer Manual - 19.Appendix IV
4/160
Append ix . Repor t Designer OCX Methods, Properties, Events
84
4.1.1. AddDiagonalSeries
Definition
void AddDiagonalSeries(BSTR ChartVarName, BSTR bSquare);
Argument
ChartVarName : Variable names for chart objects
bSquare : “0” or “1”
Description
It is a function to create a bubble chart, which shows the whole bubble shape because
various series of invisible crosshatching types are added. The default value of bSquare
Argument is 0. If 1 is given and the larger value between x and y axes is set on the other
axis, a square-type chart is created. Thus the use of bSquare Argument allows a bubble
chart to add a magnifying effect.
Example
A standard bubble chart type
AddDiagonalSeries ("MyChart","0") type
AddDiagonalSeries ("MyChart","1") type
8/16/2019 Report designer Manual - 19.Appendix IV
5/160
Appendix . Report Designer OCX Methods, Propert ies, Events
85
4.1.2. ApplyLicense
Definition
void ApplyLicense(BSTR szRDServerUrl);
Argument
szRDServerUrl : RDAGENT server path for applying license
Description
This method is for Japanese version and used to apply product licenses by calling
RDAGENT server.
If product licenses are not applied, file save function can not be used. According to the
product licenses, the file types to be saved are determined.
Example
function ApplyLicense_clicked()
{
Rdviewer.ApplyLicense ("http://192.168.1.39:8282/RDServer/rdagent.jsp"); // RDAGENT
path
Rdviewer.FileOpen("http://m2soft.co.kr/report/mrd/sample.mrd", "/rp [SEOUL] [salesman]");
}
8/16/2019 Report designer Manual - 19.Appendix IV
6/160
Append ix . Repor t Designer OCX Methods, Properties, Events
86
4.1.3. CancelReport
Definition
void CancelReport();
Description
Cancel reporting.
Example
function CancelReport_clicked()
{
Rdviewer.CancelReport ();
}
8/16/2019 Report designer Manual - 19.Appendix IV
7/160
Appendix . Report Designer OCX Methods, Propert ies, Events
87
4.1.4. ChangeSeries
Definition
void ChangeSeries (BSTR ChartVarName, long SeriesIndex, long SeriesType, long
Dimension);
Argument
ChartVarName : Chart object variable name. In case of NULL or 0, applied to all the chart
object in the report.
SeriesIndex : Series index starting from 0. If the value is -1, applied to all the series.
SeriesType : Chart type (0 ~ 47)
0-Line, 1-Bar, 2-HorizBar, 3-Area, 4-Point, 5-Pie, 6-FastLine, 7-Shape, 8-Gantt, 9-Bubble,
10-Arrow, 11-Candle, 12-Polar, 13-Surface, 14-Volume, 15-ErrorBar, 16-Bezier, 17-Contour,
18-Error, 19-Point3D, 20-Radar, 21-Clock, 22-WindRose, 23-Bar3D, 24-ImageBar, 25-Donut,
26-TriSurface, 27-Box, 28-HorizBox, 29-Histogram, 30-ColorGrid, 31-BarJoin, 32-HighLow,
33-Waterfall, 34-Smith, 35-Pyramid, 36-Map, 37-HorizLine, 38-Funnel, 39-Calendar, 40-
HorizArea, 41-PointFigure, 42-Gauge, 43-Vector3D, 44-Tower, 45-PolarBar, 46-Bubble3D,
47-HorizHistogram
Dimension : 0 or 1. 0 – 3D chart, 1– 2D chart
Description
This method is to change chart type of selected chart object series. This method is used after
running the reports.
Example
function SetChartPenAttr_clicked()
{
Rdviewer.FileOpen ("C:\\Program Files\\M2Soft\\Report Designer 5.0\\Examples\\Basic
report\\Table\\inventory.mrd", "");
Rdviewer.ChangeSeries ("MyChart", 0, 2, 0); //MyChart Chart type of first chart series is
changed to 3D HorizBar.
}
8/16/2019 Report designer Manual - 19.Appendix IV
8/160
Append ix . Repor t Designer OCX Methods, Properties, Events
88
4.1.5. CloseBrowser
Definition
void CloseBrowser();
Description
Close a Web browser including RD OCX.
Example
function CloseBrowser_clicked()
{
Rdviewer.CloseBrowser ();
}
8/16/2019 Report designer Manual - 19.Appendix IV
9/160
Appendix . Report Designer OCX Methods, Propert ies, Events
89
4.1.6. CMPrint
Definition
void CMPrint();
Description
Print the current report.
A report is printed out through the ‘default printer’, which can be changed by using the
method of SetPrintInfo. Printing options also can be modified by using the methods of
SetPrint, SetPrint2, SetPrint3,SetPrint4, and SetPrintInfo.
The event of PrintFinishedoccurs, when printing, is done.
cf. Use a method of PrintDialog to print a report with the pop-up of ‘Print’ dialog box.
Example
function CMPrint_clicked()
{
Rdviewer.SetPrintInfo ("HP LaserJet 8150 PCL 6", 2, 1, 4); // the name of printing drive: HPLaserJet 8150 PCL 6, the number of copies:2, print by copy:1, hide all of the dialog boxes
when printing: 4
Rdviewer.CMPrint (); // Start printing
}
8/16/2019 Report designer Manual - 19.Appendix IV
10/160
Append ix . Repor t Designer OCX Methods, Properties, Events
90
4.1.7. DisableToolbar
Definition
void DisableToolbar(short index);
Argument
index : Index of toolbar items to be disabled. 0-Save a file, 1-Print, 2-Find, 3-Creating a table
of contents, 4-Zoom-in the screen, 5-Zoom-out the screen, 12-Stop printing, 13-View in
Microsoft Excel, 14-View in Hangul, 15-View in pdf, 16-View in Microsoft PowerPoint, 17-
View in Microsoft Word.
Description
Disable specific items on RD OCX Toolbars.
Example
function rdOpen() {
Rdviewer.DisableToolbar (0); // Toolbar items for saving files Disable
Rdviewer.DisableToolbar (1); //Toolbar buttons for printing Disable
Rdviewer.FileOpen("http://m2soft.co.kr/report/mrd/sample.mrd", "/rp [Seoul] [Sales Reps.]");
}
8/16/2019 Report designer Manual - 19.Appendix IV
11/160
Appendix . Report Designer OCX Methods, Propert ies, Events
91
4.1.8. EnableThreadEngine
Definition
void EnableThreadEngine(short flag);
Argument
flag : 0 or 1. If the value is 1, a separate thread is created to generate a report.
Description
Specify whether a separate thread is used or not when generating a report. If it takes time to
generate a report, it is used in preventing the browser’s hang-up situation.
Example
function rdOpen() {
Rdviewer.EnableThreadEngine (1); // Report by means of creating a Thread to generate a
report
Rdviewer.FileOpen("http://m2soft.co.kr/report/mrd/sample.mrd", "/rp [Seoul] [Sales Reps.]");
}
8/16/2019 Report designer Manual - 19.Appendix IV
12/160
Append ix . Repor t Designer OCX Methods, Properties, Events
92
4.1.9. ExecuteFile
Definition
void ExecuteFile(BSTR FileName);
Argument
FileName : file names to be executed
Description
Check a file extension delivered as an Argument, execute the application associated with it,
and open the file.
Support the execution of mrr, xls, csv, txt, mrrml, pdf, tif, bmp, gif, jpg, jpeg, xml, hwp, html,
htm, emf, ppt, ps, prn, and doc files.
Example
function ExecuteFile_clicked()
{
Rdviewer.ExecuteFile ("c:\\test.xls"); // Execute Microsoft Excel and open test.xls.
}
8/16/2019 Report designer Manual - 19.Appendix IV
13/160
Appendix . Report Designer OCX Methods, Propert ies, Events
93
4.1.10. FileOpen
Definition
boolean FileOpen(BSTR MRDFileName, BSTR Argument);
Argument
MRDFileName : A file path for MRD report, which can be a local file path, a URL on the Web,
or a server path for document management. A relative path can be specified.
Rdviewer.FileOpen ("C:\\Program Files\\M2Soft\\Report Designer 5.0\\Examples\\Basic
report\\Table\\Client2.mrd", "/rp [Seoul] [Employees] /rdelnodatamsg"); // Execute a report by
using MRD in a local file path.
rdviewer.FileOpen(“http://m2soft.co.kr/report/mrd/test.mrd”, “/rf
[http://123.123.1.6:8282/RDServer/rdagent.jsp] /rsn [myoracle] /rp [2006-01-12] [Seoul]
[Jong-ro Goo] /rv id[101] name[Gil-dong Hong]”); // Execute a report by using MRD in the
Web URL.
rdviewer.FileOpen("$test$test.mrd", "/rf [http://myserver:8080/RDAgent.jsp] /rloginID
[tester]"); // Execute a report by using MRD in a server path for document management.
Argument : Refer to Appendix III. Report Designer Arguments.
Description
A method to execute a report
The first Argument is the file name of a form file and the second Argument is an Argument
used in generating a report.
Once the method of FileOpen is called, a report starts generating and the event of
ReportFinished occurs, when the reporting is done. After the report creates its first page, the
method of FileOpen returns the value. Lest the method of FileOpen returns the value until
the whole pages are created, use ‘/rwait’ Arguments at the same time. To print out the report
instantly in line with its execution, use ‘/rop’ Argument at the same time.
In the case of failing to find the form file, the method of FileOpen returns FALSE. To see iferrors occur in the process of reporting, make sure that the method of IsError returns TRUE.
And to get error messages, call the method of GetLastErrorMsg.
In calling the method of FileOpen for the Web reporting, it is recommended to protect data by
encrypting transferred Arguments. The character strings can be encrypted by encoding
encryption objects which is supplied with the server module. At this time, specify the
methods of encryption such as SetArgumentEncrypt and SetKindOfParam.
Example
8/16/2019 Report designer Manual - 19.Appendix IV
14/160
Append ix . Repor t Designer OCX Methods, Properties, Events
94
function rdOpen() {
using the zoom ratio -->
Rdviewer.AutoAdjust = false;
Rdviewer.ZoomRatio = 100;
Rdviewer.HideToolbar();
Rdviewer.SetBackgroundColor(255,255,255);
Rdviewer.SetPageLineColor(255,255,255);
Rdviewer.FileOpen("/report/mrd/test.mrd", "/rfn
[/report/data/data.jsp] /rp[" + year + "] [" + dept + "]");
}
Reference) The followings are concerned with ‘embedded.js’ to define the control of RDOCX.
document.write('
');
8/16/2019 Report designer Manual - 19.Appendix IV
15/160
Appendix . Report Designer OCX Methods, Propert ies, Events
95
4.1.11. FindDialog
Definition
void FindDialog();
Description
Open the dialog box for finding the character strings.
Example
function FindDialog_clicked()
{
Rdviewer.FindDialog ();
}
8/16/2019 Report designer Manual - 19.Appendix IV
16/160
Append ix . Repor t Designer OCX Methods, Properties, Events
96
4.1.12. FirstPage
Definition
void FirstPage();
Description
Move to the first page of a report.
Example
function FirstPage_clicked()
{
Rdviewer.FirstPage ();
}
8/16/2019 Report designer Manual - 19.Appendix IV
17/160
Appendix . Report Designer OCX Methods, Propert ies, Events
97
4.1.13. GetComboboxValue
Definition
BSTR GetComboboxValue(BSTR objname, BSTR delimiter);
Argument
objname : Specify variable names for combo box objects. In order to specify several variable
names for combo box objects, use ‘&’ as separator. (Ex. gender&birthday) In this case, the
values of each variables are returned as & separator.
delimiter : Use delimiters to have the internal value and the displaying value be returned at
the same time. When "@" is given as delimiter, the return value is the ‘internal-
value@displaying-value.
Description
A method to get the value selected from combo box objects.
The internal value selected from combo box is returned. Use delimiters to have the
displaying value to be returned as well.
cf. To assign variable names to combo box objects, specify field names by using the dialog
box for data set connection.
Example
function GetComboboxValue_clicked()
{
var objname;
// Fetch the selection value of a combo box.
objname = "gender";
var retvalue = Rdviewer.GetComboboxValue (objname, "");
alert(retvalue);
// Fetch the selection values of several combo boxes.
//objname = "gender&birthday";
//var retvalue = Rdviewer.GetComboboxValue (objname, "^"); By using delimiters, theinternal value and displaying value are fetched at the same time.
//var retvalue = Rdviewer.GetComboboxValue (objname, "");
//alert(retvalue);
}
8/16/2019 Report designer Manual - 19.Appendix IV
18/160
Append ix . Repor t Designer OCX Methods, Properties, Events
98
4.1.14. GetLastErrorMsg
Definition
BSTR GetLastErrorMsg();
Description
A method to get error messages, when errors occur in the process of executing a report.
To see if errors occur in the process of reporting, make sure that the method of IsError
returns TRUE.
Example
8/16/2019 Report designer Manual - 19.Appendix IV
19/160
Appendix . Report Designer OCX Methods, Propert ies, Events
99
4.1.15. GetPageSize
Definition
BSTR GetPageSize();
Description
Return the page size in the string format.
Example
function GetPageSize_clicked()
{
var ret = Rdviewer.GetPageSize (); // As for the A4-sized paper,, 210 mm X 297 mm is
returned.
}
8/16/2019 Report designer Manual - 19.Appendix IV
20/160
Append ix . Repor t Designer OCX Methods, Properties, Events
100
4.1.16. GetReportInfo
Definition
BSTR GetReportInfo(BSTR infokind);
Argument
infokind : Specify information to be returned.
- "reportname" : A report name
- "reportlongname" : A report name including a path
- "reportparams" : A report Argument
Description
Return the report information executed.
Example
function GetReportInfo_clicked()
{
var retvalue = Rdviewer.GetReportInfo ("reportname");
alert(retvalue);
var retvalue = Rdviewer.GetReportInfo ("reportlongname");
alert(retvalue);
var retvalue = Rdviewer.GetReportInfo ("reportparams");
alert(retvalue);
}
8/16/2019 Report designer Manual - 19.Appendix IV
21/160
Appendix . Report Designer OCX Methods, Propert ies, Events
101
4.1.17. GetTextboxValue
Definition
BSTR GetTextboxValue(BSTR objname);
Argument
objname : Variable names for text box objects. To specify several variable names for text
box objects, use ‘&’ as separator. (Ex.
name&jumin_no&id&password&company&title&address&telno) When several variable
names for text box objects are specified, the values of each variables are returned as ‘&’
separator.
Description
A method to return the character strings inserted in text box objects
cf. To assign variable names to text box objects, specify field names by using the dialog box
for data set connection.
Example
function GetTextboxValue_clicked()
{
var objname;
objname = "name";
//Fetch several text box values
//objname =
"gender&name&jumin_no&id&password&company&title&address&email&telno";
var retvalue = Rdviewer.GetTextboxValue (objname);
alert(retvalue);
}
8/16/2019 Report designer Manual - 19.Appendix IV
22/160
Append ix . Repor t Designer OCX Methods, Properties, Events
102
4.1.18. GetTotalPageNo
Definition
long GetTotalPageNo();
Description
Return the total page number of a report.
Example
function GetTotalPageNo_clicked()
{
var ret = Rdviewer.GetTotalPageNo (); // Return the total page number of a report.
}
8/16/2019 Report designer Manual - 19.Appendix IV
23/160
Appendix . Report Designer OCX Methods, Propert ies, Events
103
4.1.19. HideChartMenu
Definition
void HideChartMenu();
Description
Hide the ‘Change chart’ menu on the pop-up menu.
Once a report including a chart object is executed, the following pop-up menu appears upon
clicking the right button on the chart object.
If the method of HideChartMenu is used, the pop up menu like the right figure appears.
Example
function HideChartMenu_clicked()
{
Rdviewer.HideChartMenu ();
Rdviewer.FileOpen("C:\\Program Files\\M2Soft\\Report Designer 5.0\\Examples\\Basic
report\\Table\\stock amount.mrd", "");
}
8/16/2019 Report designer Manual - 19.Appendix IV
24/160
Append ix . Repor t Designer OCX Methods, Properties, Events
104
4.1.20. HidePopupMenu
Definition
void HidePopupMenu(short index);
Argument
index : Have the values from 0 to 9.
0 : The whole pop-up menu, 1 : Next/Previous) page, 2 : Zoom-in/Zoom-out, 3 : Print, 4 :
Save a file, 5 : Change a chart, 6 : Show the tree management window, 7 : Next/Previous
document, 8 : E-mail as an attachment, 9 : Save parts of pages
Description
Hide the whole RD OCX pop-up menu or selected items.
Example
function HidePopupMenu_clicked()
{
Rdviewer.HidePopupMenu (4); // Hide the ‘Save a file’ menu
Rdviewer.HidePopupMenu (9); // Hide the ‘Save a part of pages’ menu
Rdviewer.FileOpen("C:\\Program Files\\M2Soft\\Report Designer 5.0\\Examples\\Basic
report\\Table\\stock amount.mrd", "");
}
8/16/2019 Report designer Manual - 19.Appendix IV
25/160
Appendix . Report Designer OCX Methods, Propert ies, Events
105
4.1.21. HideScrollBar
Definition
void HideScrollBar(short flag);
Argument
flag : Have the value of 0, 1, or 3.
0 : Hide the horizontal scroll bar, 1 : Hide the vertical scroll bar, 3 : Hide both of them
Description
Hide the horizontal/vertical scroll bar.
Use the method of ShowScrollBar to make the scroll bar visible.
Example
function HideScrollBar_clicked()
{
//Rdviewer.HideScrollBar (0); // Hide the horizontal scroll bar
//Rdviewer.HideScrollBar (1); // Hide the vertical scroll bar
Rdviewer.HideScrollBar (3); // Hide the horizontal/vertical scroll bar
Rdviewer.FileOpen("C:\\Program Files\\M2Soft\\Report Designer 5.0\\Examples\\Basic
report\\Table\\stock amount.mrd", "");
}
8/16/2019 Report designer Manual - 19.Appendix IV
26/160
Append ix . Repor t Designer OCX Methods, Properties, Events
106
4.1.22. HideStatusBar
Definition
void HideStatusBar();
Description
Hide a status bar.
Example
function HideStatusBar_clicked()
{
Rdviewer.HideStatusBar (); // Hide the status bar.
Rdviewer.FileOpen("C:\\Program Files\\M2Soft\\Report Designer 5.0\\Examples\\Basic
report\\Table\\stock amount.mrd", "");
}
8/16/2019 Report designer Manual - 19.Appendix IV
27/160
Appendix . Report Designer OCX Methods, Propert ies, Events
107
4.1.23. HideToolBar
Definition
void HideToolBar();
Description
Hide a toolbar.
Example
function HideTreeMenu_clicked()
{
Rdviewer. HideToolBar ();
Rdviewer.FileOpen("C:\\Program Files\\M2Soft\\Report Designer 5.0\\Examples\\Basic
report\\Table\\stock amount.mrd", "");
}
8/16/2019 Report designer Manual - 19.Appendix IV
28/160
Append ix . Repor t Designer OCX Methods, Properties, Events
108
4.1.24. HideTreeMenu
Definition
void HideTreeMenu();
Description
Hide ‘Show the tree management window’ in the pop-up menu.
It is equal to set 6 for an Argument value of a method of HidePopupMenu.
Example
function HideTreeMenu_clicked()
{
Rdviewer.HideTreeMenu ();
Rdviewer.FileOpen("C:\\Program Files\\M2Soft\\Report Designer 5.0\\Examples\\Basic
report\\Table\\stock amount.mrd", "");
}
8/16/2019 Report designer Manual - 19.Appendix IV
29/160
Appendix . Report Designer OCX Methods, Propert ies, Events
109
4.1.25. IsError
Definition
boolean IsError();
Description
Return TRUE if errors occur in the process of reporting. Use a method of GetLastErrorMsg
to get the error messages.
Example
8/16/2019 Report designer Manual - 19.Appendix IV
30/160
Append ix . Repor t Designer OCX Methods, Properties, Events
110
4.1.26. LastPage
Definition
void LastPage();
Description
Move to the last page of a report.
Example
function LastPage_clicked()
{
Rdviewer.LastPage (); // Move to the last page
}
8/16/2019 Report designer Manual - 19.Appendix IV
31/160
Appendix . Report Designer OCX Methods, Propert ies, Events
111
4.1.27. NextDoc
Definition
long NextDoc();
Description
Allow to move between documents on the report containing the hyperlink function, thereby
moving to the next document. To move to the last document, 1 is returned.
Example
function NextDoc_clicked()
{
var ret = Rdviewer.NextDoc (); // Move to the next document
if (ret == 1) alert ("Move to the last document.");
}
8/16/2019 Report designer Manual - 19.Appendix IV
32/160
Append ix . Repor t Designer OCX Methods, Properties, Events
112
4.1.28. NextPage
Definition
long NextPage();
Description
Move to the next page. The return value is the page number after moving, and it starts from 0.
Example
function NextPage_clicked()
{ var ret = Rdviewer.NextPage (); //Move to the next page
ret = ret + 1;
alert ("page numbers after moving : " + ret);
}
8/16/2019 Report designer Manual - 19.Appendix IV
33/160
Appendix . Report Designer OCX Methods, Propert ies, Events
113
4.1.29. OpenFileDialog
Definition
BSTR OpenFileDialog(BSTR DlgTitle, BOOL bSaveOpen);
Argument
DlgTitle : Titles for dialog boxes
bSaveOpen : 0 – Save a file, 1 – Open a file
Description
A method to pop up ‘Save As’ or ‘Open’ dialog box, and to return the file name with the path
selected from the corresponding dialog box.
To pop up the ‘Save As’ dialog box is quite similar to using the method of SaveAsDialog.
Both of them, however, perform different functions. In other words, the method of
SaveAsDialog has the function to save the current report as a selected file name, whereas
the method of OpenFileDialog returns a selected file name only.
Example
function OpenFileDialog_clicked()
{
Rdviewer.SetSaveDialog ("c:\\MyFolder\\", "a.xls", 2); // initial value settings for the ‘Save
As’ dialog box, location, file name, file format
var fname = Rdviewer.OpenFileDialog ("save", 0); // Display the ‘Save As’ dialog box
alert ("a file name to be saved : " + fname);
if (fname != "")
Rdviewer.SaveAsXlsFile (fname); // Save as a XLS file
var ret = Rdviewer.OpenFileDialog ("open", 1); // Display the ‘Open’ dialog box
alert ("File name to open : " + ret);
}
8/16/2019 Report designer Manual - 19.Appendix IV
34/160
Append ix . Repor t Designer OCX Methods, Properties, Events
114
8/16/2019 Report designer Manual - 19.Appendix IV
35/160
Appendix . Report Designer OCX Methods, Propert ies, Events
115
4.1.30. PrevDoc
Definition
long PrevDoc();
Description
Allow to move between documents on the report containing a hyperlink function, thereby
moving to the previous document. To move to the first document, 1 is returned.
Example
function PrevDoc_clicked()
{
var ret = Rdviewer.PrevDoc (); // Move to the previous document.
if (ret == 1) alert ("Move to the first document.");
}
8/16/2019 Report designer Manual - 19.Appendix IV
36/160
Append ix . Repor t Designer OCX Methods, Properties, Events
116
4.1.31. PrevPage
Definition
long PrevPage();
Description
Move to the previous page. The return value is the page number after moving, and it starts
from 0.
Example
function PrevPage_clicked()
{
var ret = Rdviewer.PrevPage (); // Move to the previous page.
ret = ret + 1;
alert ("Page numbers after moving. : " + ret);
}
8/16/2019 Report designer Manual - 19.Appendix IV
37/160
Appendix . Report Designer OCX Methods, Propert ies, Events
117
4.1.32. PrintDialog
Definition
void PrintDialog();
Description
Display ‘Print’ dialog box.
The default value of the ‘Print’ dialog box can be modified by using the methods of SetPrint,
SetPrint2, SetPrint3, SetPrint4, and SetPrintInfo.
Printing starts by clicking a confirmation button on the ‘Print’ dialog box, and the event of
PrintFinished occurs when printing is done.
cf. Use the method of CMPrint to print without opening the ‘Print’ dialog box.
Example
function PrintDialog_clicked()
{
Rdviewer.PrintDialog (); // Display the ‘Print’ dialog box.
}
8/16/2019 Report designer Manual - 19.Appendix IV
38/160
Append ix . Repor t Designer OCX Methods, Properties, Events
118
4.1.33. RefreshReport
Definition
void RefreshReport();
Description
Execute the current report again with maintaining the Argument value of a report.
Example
function RefreshReport_clicked()
{
Rdviewer.RefreshReport (); //Re-execute the report
}
8/16/2019 Report designer Manual - 19.Appendix IV
39/160
Appendix . Report Designer OCX Methods, Propert ies, Events
119
4.1.34. RefreshWindow
Definition
void RefreshWindow();
Description
Refresh the current report.
RefreshReport is to re-execute a report, but RefreshWindow is to re-draw a report only on
the screen.
Example
function RefreshWindow_clicked()
{
Rdviewer.RefreshWindow (); // Refresh a report.
}
8/16/2019 Report designer Manual - 19.Appendix IV
40/160
Append ix . Repor t Designer OCX Methods, Properties, Events
120
4.1.35. RprFileOpen
Definition
boolean RprFileOpen(BSTR FileName, BSTR Argument);
Argument
FileName : A path for a project file, which can be a local path or a URL on the Web
Argument : Specify Arguments for a report, which are used for executing the first report with
/rfirstmrd Arguments.
Description
Open project files (.rpr).
The list of documents appears on the left screen, when the method is executed. Use the
/rfirstmrd Arguments to execute the first report directly from the list of documents. Double-
click the corresponding file from the list of documents to execute a specific report.
Example
function RprFileOpen_clicked()
{
//Rdviewer.RprFileOpen ("C:\\Program Files\\M2Soft\\Report Designer
5.0\\Examples\\RDExample50.rpr", "/rfirstmrd"); // Open project files on the local
Rdviewer.RprFileOpen ("http://localhost/Examples/RDExample50.rpr", "/rfirstmrd"); // Open
project files on the Web URL
}
8/16/2019 Report designer Manual - 19.Appendix IV
41/160
Appendix . Report Designer OCX Methods, Propert ies, Events
121
4.1.36. SaveAsDialog
Definition
boolean SaveAsDialog();
Description
Display ‘Save As’ dialog box and save the current report as the file name selected on the
dialog box.
If a report is saved, TRUE is returned. If not, FALSE is returned. The event of
SaveFileFinished occurs when saving is done.
Use the method of SetSaveDialog to specify the initial value of the dialog box. Use the
method of SetSaveExcelOption to skip saving options in saving Microsoft Excel files.
cf. The method of SaveAsDialog Method executes the function to save the current report as
a selected file name, where as the method of OpenFileDialog returns a selected file name
only.
Example
function SaveAsDialog_clicked()
{ Rdviewer.SetSaveExcelOption (1); // 1-Maintain formats when saving a file as Microsoft
Excel, 2-Allow to change formats
Rdviewer.SetSaveDialog ("c:\\MyFolder\\", "a.xls", 2); // Set the initial value of the ‘Save As’
dialog box – location, file names, file formats
var ret = Rdviewer.SaveAsDialog (); // Save the current document with displaying the ‘Save
As’ dialog box.
alert (ret);
}
8/16/2019 Report designer Manual - 19.Appendix IV
42/160
Append ix . Repor t Designer OCX Methods, Properties, Events
122
4.1.37. SaveAsEmfFile
Definition
boolean SaveAsEmfFile(BSTR EmfFileName);
Argument
EmfFileName : EMF file names to be created
Description
Save the current report as an EMF image file.
Return TRUE/FALSE whether the file is saved successfully or not. The event of
SaveFileFinished occurs when saving is done. If the volume of the executed report is more
than 2 pages, each page is created as one image file, respectively.
The first page is saved as image file under the specified file name, and the remaining pages
from the second page are saved as image files having “file name” + “_page order” +
“.extension” formats. For example, if a report has 3 pages in total and is saved as “a.emf
“by using the method of SaveAsEmfFile, the file name of the first page is “a.emf ”, the second
one is a_1.emf, and the third one is a_2.emf, respectively.
Example
function SaveAsEmfFile_clicked()
{
var ret = Rdviewer.SaveAsEmfFile ("C:\\mymy\\a.emf"); // Save as an EMF image file
alert (ret);
}
8/16/2019 Report designer Manual - 19.Appendix IV
43/160
Appendix . Report Designer OCX Methods, Propert ies, Events
123
4.1.38. SaveAsIEmfFile
Definition
boolean SaveAsIEmfFile(BSTR EmfFileName);
Argument
EmfFileName : EMF file names to be created
Description
Save the current report as an EMF image file.
Return TRUE/FALSE whether the file is saved successfully or not. The event of
SaveFileFinishedoccurs when saving is done.
If the volume of an executed report is more than 2 pages, each page is created as one
image file, respectively.
Save as a Emf file, which is editable in Adobe Illustrator.
Example
function SaveAsIEmfFile_clicked()
{
var ret = Rdviewer.SaveAsIEmfFile ("C:\\mymy\\a2.emf"); // Save as an EMP image file
alert (ret);
}
8/16/2019 Report designer Manual - 19.Appendix IV
44/160
Append ix . Repor t Designer OCX Methods, Properties, Events
124
4.1.39. SaveAsFaxFormat
Definition
BOOL SaveAsFaxFormat(BSTRE FileName, short nFormat, short nFlag, short nBpp, short
nReserved1, long nReserved2);
Argument
FileName : file name
nFormat : 0-FILE_CCITT, 1-FILE_CCITT_GROUP3_1DIM, 2-FILE_CCITT_GROUP3_2DIM,
30FILE_CCITT_GROUP4
nFlag : 0-SAVEFILE_FIXEDPALETTE, 1-SAVEFILE_OPTIMIZEDPALETTE, 2-
SAVEFILE_MULTIPAGE
nBpp : Result file's pixel depth. 0-save as basic BPP of the format, 1/4/8/24/32 etc.
nReserved1/nReserved2 : reserved flags
Description
This method is to save a report into Fax Format document. Documents are saved through
Raster Image Library and only TIFF CCITT Format is supported.
Example
function SaveAsFaxFormat_clicked()
{
Rdviewer.SaveAsFaxFormat ("C:\test.tif", 0, 0, 0, 0, 0);
}
8/16/2019 Report designer Manual - 19.Appendix IV
45/160
Appendix . Report Designer OCX Methods, Propert ies, Events
125
4.1.40. SaveAsImagefile
Definition
boolean SaveAsImagefile(BSTR FileName, short imageType);
Argument
FileName : Image file names to be created
imageType : Image file formats have the value of 0 , 1, 2, or 3 as follows.
0 : TIF , 1 : BMP, 2 : GIF, 3 : JPG
Description
Save the current report as an image file to have the file format transferred by an Argument.
Return TRUE/FALSE whether the file is saved successfully or not. The event of
SaveFileFinished occurs when saving is done.
If a report is saved as TIF file format, its whole pages become one file.
If it is saved as any other file formats, each page is created as one image file. For example,
a report has 4 pages in total and is saved as a.gif by using the method of SaveAsImagefile,
the file name of the first page is a.gif, the second one is a_1.gif, and the third one is a_2.gif,
respectively.
Example
function SaveAsImagefile_clicked()
{
var ret;
ret = Rdviewer.SaveAsImagefile ("C:\\mymy\\a.tif", 0); // Save as a TIF image file
ret = Rdviewer.SaveAsImagefile ("C:\\mymy\\a.bmp", 1); // Save as a BMP image file
ret = Rdviewer.SaveAsImagefile ("C:\\mymy\\a.gif", 2); // Save as a GIF image file
ret = Rdviewer.SaveAsImagefile ("C:\\mymy\\b.jpg", 4); // Save as a JPG image file}
8/16/2019 Report designer Manual - 19.Appendix IV
46/160
Append ix . Repor t Designer OCX Methods, Properties, Events
126
4.1.41. SaveAsMrrFile
Definition
boolean SaveAsMrrFile(BSTR MrrFileName);
Argument
MrrFileName : MRR file names to be created
Description
Save the current report as an MRR file.
Return TRUE/FALSE whether the file is saved successfully or not. The event of
SaveFileFinished occurs when saving is done.
Example
function SaveAsMrrFile_clicked()
{
var ret = Rdviewer.SaveAsMrrFile ("C:\\mymy\\a.mrr"); // Save as a MRR file
alert (ret);
}
8/16/2019 Report designer Manual - 19.Appendix IV
47/160
Appendix . Report Designer OCX Methods, Propert ies, Events
127
4.1.42. SaveAsMrrmlFile
Definition
boolean SaveAsMrrmlFile(BSTR MrrmlFileName);
Argument
MrrmlFileName : MRRML file names to be created
Description
Save the current report as a MRRML(Miraero Markup language) file.
Return TRUE/FALSE whether the file is saved successfully or not. The event of
SaveFileFinished occurs when saving is done.
Example
function SaveAsMrrmlFile_clicked()
{
var ret = Rdviewer.SaveAsMrrmlFile ("C:\\mymy\\a.mrrml"); // Save as a MRRML file
alert (ret);
}
8/16/2019 Report designer Manual - 19.Appendix IV
48/160
Append ix . Repor t Designer OCX Methods, Properties, Events
128
4.1.43. SaveAsPdfFile
Definition
boolean SaveAsPdfFile(BSTR PdfFileName);
Argument
PdfFileName : PDF file names to be created
Description
Save the current report as a PDF file.
Return TRUE/FALSE whether the file is saved successfully or not. The event of
SaveFileFinished occurs when saving is done.
Example
function SaveAsPdfFile_clicked()
{
var ret = Rdviewer.SaveAsPdfFile ("C:\\mymy\\a.pdf"); // Save as a PDF file
alert (ret);
}
8/16/2019 Report designer Manual - 19.Appendix IV
49/160
Appendix . Report Designer OCX Methods, Propert ies, Events
129
4.1.44. SaveAsPptFile
Definition
boolean SaveAsPptFile(BSTR PPTFileName);
Argument
PPTFileName : PPT file names to be created
Description
Save the current report as a PPT file.
Return TRUE/FALSE whether the file is saved successfully or not. The event of
SaveFileFinished occurs when saving is done.
Example
function SaveAsPptFile_clicked()
{
var ret = Rdviewer.SaveAsPptFile ("C:\\mymy\\a.ppt"); // Save as a PowerPoint file
alert (ret);
}
8/16/2019 Report designer Manual - 19.Appendix IV
50/160
Append ix . Repor t Designer OCX Methods, Properties, Events
130
4.1.45. SaveAsTxtFile
Definition
boolean SaveAsTxtFile(BSTR TxtFileName);
Argument
TxtFileName : TXT file names to be created
Description
Save the current report as a TXT file.
Return TRUE/FALSE whether the file is saved successfully or not. The event of
SaveFileFinished occurs when saving is done.
Example
function SaveAsTxtFile_clicked()
{
var ret = Rdviewer.SaveAsTxtFile ("C:\\mymy\\a.txt"); // Save as a TXT file
alert (ret);
}
8/16/2019 Report designer Manual - 19.Appendix IV
51/160
Appendix . Report Designer OCX Methods, Propert ies, Events
131
4.1.46. SaveAsXlsFile
Definition
boolean SaveAsXlsFile(BSTR XlsFileName);
Description
Save the current report as an Excel file.
Return TRUE/FALSE whether the file is saved successfully or not. The event of
SaveFileFinished occurs when saving is done.
Save a report as an excel file that maintains a report format or only extract data in an Excel
file.
Use the method of SetSaveExcelOption to skip the dialog box for saving options in saving
Microsoft Excel files.
Example
function SaveAsXlsFile_clicked()
{
Rdviewer.SetSaveExcelOption (2); //1-Maintain a report format, 2- Allow to change a format
var ret = Rdviewer.SaveAsXlsFile ("C:\\mymy\\a.xls"); // Save as an XLS file
alert (ret);
}
8/16/2019 Report designer Manual - 19.Appendix IV
52/160
Append ix . Repor t Designer OCX Methods, Properties, Events
132
4.1.47. SaveAsXmlFile
Definition
boolean SaveAsXmlFile(BSTR XmlFileName, BSTR tagFileName);
Argument
XmlFileName : XML file names to be created
tagFileName : A text file having an element name information to create XML. Each row of
the file defines file information such as “field name, element name”. Once this method is
executed, a XML node is created by extracting the character string from a text box of “filed
name” or table cells.
The followings are examples of tagFileName.
Name, EmployeeNameEmployees.EmployeeID, EmployeeNo.Employees.HomePhone, TelephoneEmployees.City, Name of cityEmployees.Address, Address
Description
Save the current document as an XML file by extracting data. To extract data, specify an
element name in the form file or use the /rtagname option.
Example
function SaveAsXmlFile_clicked()
{
var ret = Rdviewer.SaveAsXmlFile ("C:\\mymy\\a.xml", "D:\\test50\\taginfo.txt");
alert (ret);
}
8/16/2019 Report designer Manual - 19.Appendix IV
53/160
Appendix . Report Designer OCX Methods, Propert ies, Events
133
4.1.48. SaveAsWordFile
Definition
boolean SaveAsWordFile(BSTR WordFileName);
Argument
WordFileName : MS Word file name
Description
Current reports are saved into MS Word file.
It returns TRUE/FALSE whether the file is saved successfully or not. When finished saving,
SaveFileFinished evet generated.
Example
function SaveAsWordFile_clicked()
{
var ret = Rdviewer.SaveAsWordFile ("C:\\mymy\\a.doc"); //Save as MS Word file
alert (ret);
}
8/16/2019 Report designer Manual - 19.Appendix IV
54/160
Append ix . Repor t Designer OCX Methods, Properties, Events
134
4.1.49. SavePage
Definition
boolean SavePage(BSTR pFileName, short nFileType, short nOpt, BSTR pPageRange);
Argument
pFileName : File names to be saved
nFileType : File formats to be saved. 1 - MRR, 2 – XLS, 3 - TXT, 4 - MRRML, 5 - PDF, 6 - TIF,
7 - BMP, 8 - GIF, 9 - JPG, 11 - HWP, 15 - PPT, 16 - DOC (Available in the Professional
Version only)
nOpt : 0 – current page, 1 – partial page
pPageRange : Specify the range of partial pages if the value of nOpt is 1.
Description
Save partial pages of the current report as a specific file format.
Return TRUE/FALSE whether the file is saved successfully or not. The event of
SaveFileFinished occurs when saving is done.
Example
function SavePage_clicked()
{
//var ret = Rdviewer.SavePage ("C:\\mymy\\a.xls", 2, 1, "2-3"); // Save pages from 2 to 3 as
a Microsoft Excel file
var ret = Rdviewer.SavePage ("C:\\mymy\\a.pdf", 5, 0, ""); // Save the current page as a
PDF file
alert (ret);
}
8/16/2019 Report designer Manual - 19.Appendix IV
55/160
Appendix . Report Designer OCX Methods, Propert ies, Events
135
4.1.50. SendMail
Definition
void SendMail(short nFileType);
Argument
nFileType : File formats to be saved. 1 - MRR, 2 - XLS, 4 - JPG, 8 - PDF, 9 - HWP
Description
Save a report, in the temporary directory, as a specific file format and send it as an e-mail
attachment.
The event of SaveFileFinished occurs after saving the report as a specific file format, and
then the “New Message” window allows to send an e-mail.
Example
function SendMail_clicked()
{
Rdviewer.SendMail (2); // Save a file as a Excel format and send it as an attachment
}
8/16/2019 Report designer Manual - 19.Appendix IV
56/160
Append ix . Repor t Designer OCX Methods, Properties, Events
136
4.1.51. SendMailEx
Definition
void SendMailEx(BSTR strAddress, BSTR strSubject, BSTR strNoteText, BSTR
strFilename);
Argument
strAddress : Recipient’s E-mail address
strSubject : E-mail subjects
strNoteText : E-mail contents
strFilename : An attached file name with its extension (except its path)
Description
Save a report, in the temporary directory, as a specific file format and send it as an e-mail
attachment.
A file is created in the name of strFilename, and its format is specified by the extension of the
file name. For example, if a file name is saved as a.pdf, it is saved as a temporary file with
pdf format.
The event of SaveFileFinished occurs after saving the report as a specific file format, andsends an e-mail. This is used for sending an e-mail promptly without popping up the “New
Message” window.
Example
function SendMailEx_clicked()
{
Rdviewer.SendMailEx ("[email protected]", "actual record", "actual record for the first
quarter of a year.", "a.pdf"); // Save a file as a PDF format and send it as an attachment
}
8/16/2019 Report designer Manual - 19.Appendix IV
57/160
Appendix . Report Designer OCX Methods, Propert ies, Events
137
4.1.52. ServerPrint
Definition
boolean ServerPrint(BSTR MrdPath, BSTR Argument);
Argument
MrdPath : A path of the form file for a report
Argument : Report Arguments
Description
It is the Method for Report Designer Server to execute a report and print it out through the
printer.
Refer to the server manuals for further details such as server settings etc.
Example
function ServerPrint_clicked()
{ //1. Call MRD server for connection
Rdviewer.FileOpen ("http://m2soft.co.kr/report/test.mrd", "/rf
[http://123.123.1.6:8282/RDServer/rdagent.jsp] /rdonotreport");
//2. Print server
bRet = Rdviewer.ServerPrint ("http://www.m2soft.co.kr/ReportDesigner/test/mrd/test.mrd",
"/rv Name[Gil-dong Hong] Department[Telecommunication]Major[Telecommunication
Engineering]Minor[ ] Resident registration No.[781107-1234567] Student No.[970501] A
course of study for the teaching[0.0] Essential cultural studies[9.0] Optional cultural
studies[23.0]Essential major [3.0] Optional major[0.0] Essential second major[0.0] Optional
Second major[0.0] Thesis[0.0] Foundation[6.0] P.S.D.[41] Passed[41] Total Passed.[106.5]
G.P.A[2.60] /rf [http://www.m2soft.co.kr/ReportDesigner/test/mrd/test.txt]");
if (bRet)
alert ("success");
else {
msg = Rdviewer.GetLastErrorMsg();
alert (msg);
}
}
8/16/2019 Report designer Manual - 19.Appendix IV
58/160
Append ix . Repor t Designer OCX Methods, Properties, Events
138
4.1.53. SetAgentUserInfo
Definition
void SetAgentUserInfo(BSTR lpUserid, BSTR lpPassword, short nEnctype);
Argument
lpUserid : User ID
lpPassword : User Password
nEnctype : Encryption options can be assigned by any combination of numerals from 0 to 10.
Description
The RDAgent server connection allows only authorized users to create a report by obtaining
a permission through the user authorization window. Once a user’s information is verified,
the authorization process is not required to execute a report.
Authorization information should be verified through encryption process for the protection.
Refer to Argument Encryption in the server manual for the encryption of character strings.
Example
function rdOpen() {
Rdviewer.SetAgentUserInfo ("user1", "mypass", 0); //
var ret = Rdviewer.FileOpen("http://m2soft.co.kr/report/mrd/test.mrd", "/rv StartDate[2006-
01-01] EndDate[2006-01-31]");
}
8/16/2019 Report designer Manual - 19.Appendix IV
59/160
Appendix . Report Designer OCX Methods, Propert ies, Events
139
4.1.54. SetAppendReport
Definition
void SetAppendReport(short flag);
Argument
flag : 0 – Release the Append Mode, 1 – Set to Append Mode
Description
This method makes to report the multiple report into continuous page.
If flag set to 1 and call FileOpen method, the report created by adding pages continuously
without deleting the previous report file.
Example
function rdOpen() {
Rdviewer.SetAppendReport(1)
Rdviewer.FileOpen("C:\test1.mrd", "")
Rdviewer.FileOpen("C:\test2.mrd", "")
Rdviewer.FileOpen("C:\test3.mrd", "")
}
8/16/2019 Report designer Manual - 19.Appendix IV
60/160
Append ix . Repor t Designer OCX Methods, Properties, Events
140
4.1.55. SetBackgroundColor
Definition
void SetBackgroundColor(short r, short g, short b);
Argument
Specify the RGB value.
Description
Set the background color by the RGB value.
The default color is RGB(128,128,128) .
Example
function rdOpen() {
Rdviewer.SetBackgroundColor(255,255,255); // Select white for the background color
Rdviewer.SetPageLineColor(255,255,255); // Select white for the page outline
Rdviewer.ViewShowMode (2); // Move the page to the left top + Ignore the left and top
margins
Rdviewer.FileOpen("http://m2soft.co.kr/report/mrd/sample.mrd", "/rp [Seoul] [Sales Reps.]");
}
8/16/2019 Report designer Manual - 19.Appendix IV
61/160
Appendix . Report Designer OCX Methods, Propert ies, Events
141
4.1.56. SetCacheOption
Definition
void SetCacheOption(short flag);
Argument
flag : 0 – Do not MRD caching, 1 – Do MRD caching(default)
Description
This method is used to set whether perform report form file (MRD) caching or not.
If do MRD caching, downloaded from the server only when MRD file has changed, so the
performance can be enhanced. Report Designer do MRD caching in default.
If users want to down load whenever running reports without MRD caching, flag has to be
set to 0. Or, set CacheOption=0 in [Environment] section of rdviewer.ini.
Example
function SetCacheOption_clicked()
{
Rdviewer.SetCacheOption (0); //Do not MRD caching
}
8/16/2019 Report designer Manual - 19.Appendix IV
62/160
Append ix . Repor t Designer OCX Methods, Properties, Events
142
4.1.57. SetComboboxValue
Definition
short SetComboboxValue(BSTR objname, BSTR showvalue);
Argument
objname : Variable names for combo box objects. Use ‘&’ as separator to specify several
variable names for combo box objects. (Ex. gender&birthday)
showvalue : Selected values to be specified. Use ‘&’ as separator to specify several variable
names for combo box objects. (Ex. male&1971/08/09)
Description
Specify selected values for combo box objects, which should be more than 1. This returns
the specified number of selected values.
The /rv Argument can be used to specify initial selected values of combo boxes.
Example
function SetComboboxValue_clicked()
{
var objname;
//objname = "gender";
//var retvalue = Rdviewer.SetComboboxValue (objname, "male");
objname = "birthday";
var retvalue = Rdviewer.SetComboboxValue (objname, "2004-1-1");
alert(retvalue); // return 1
}
8/16/2019 Report designer Manual - 19.Appendix IV
63/160
Appendix . Report Designer OCX Methods, Propert ies, Events
143
4.1.58. SetChartPenAttr
Definition
void SetChartPenAttr(BSTR ChartVarName, long SeriesIndex, short r, short g, short b, long
penwidth);
Argument
ChartVarName : Variable names for chart objects. If NULL or 0 is given, it is applied to all of
chart objects in a report.
SeriesIndex : Series index starting from 0. If -1 is given, it is applied to all series.
r, g, b : The RGB line color of BORDER
penwidth : The width of BORDER(WIDTH)
Description
This method is to specify the line color and width of a specified chart object’s series
BORDER.
Example
function SetChartPenAttr_clicked()
{
Rdviewer.SetChartPenAttr ("MyChart", 0, 0, 255, 0, 3); //MyChart Specify the line color and
width of the first chart series’ BORDER
Rdviewer.FileOpen ("C:\\Program Files\\M2Soft\\Report Designer 5.0\\Examples\\Basic
report\\Table\\stock amount.mrd", "");
}
8/16/2019 Report designer Manual - 19.Appendix IV
64/160
Append ix . Repor t Designer OCX Methods, Properties, Events
144
4.1.59. SetDefaultPenAttr
Definition
Void SetDefaultPenAttr(short penstyle, short penwidth, short r, short g, short b);
Argument
penstyle : Line style. 2( ), 3( ), 4( ), 5(HTML line)
penwidth : Line width 0(0.0), 1(0.5), 2(1.0), 3(1.5), 4(2.0), 5(2.5), 6(3.0), 7(3.5), 8(4.0), 9(5.0)
r, g, b : RGB line color
Description
Modify the initial value of line properties, which is used in drawing objects in the viewer edit
mode.
The default value of line properties: line style-none, line width-1.0, line color-black, RGB -
0,0,0).
Example
function SetDefaultPenAttr_clicked()
{
Rdviewer.SetDefaultPenAttr (2, 4, 255, 0, 0); //2.0 of thickness with red dotted line is
standard.
Rdviewer.FileOpen ("C:\\Program Files\\M2Soft\\Report Designer 5.0\\Examples\\Basic
report\\Table\\client2.mrd", "/reditmode");
}
8/16/2019 Report designer Manual - 19.Appendix IV
65/160
Appendix . Report Designer OCX Methods, Propert ies, Events
145
4.1.60. SetDefaultPlaneAttr
Definition
Void SetDefaultPlaneAttr(short planehatch, short planestyle, short r, short g, short b);
Argument
planehatch : Hatching style. 0( ), 1( ), 2( ), 3( ),
4( ), 5( ), 6( )
planestyle : Tranparency : 0 - Transparent, 1 - Opaque
r, g, b : RGB hatching color
Description
Modify the initial value of area properties, which is used in drawing objects in the viewer edit
mode. The default value of area properties consists of area style ( ),
transparency (opaque), and area color (white RGB - 255,255,255).
If an area style is not specified with the default value, the color of an area is not applied.
Example
function SetDefaultPlaneAttr_clicked()
{
Rdviewer.SetDefaultPlaneAttr (0, 0, 0, 0, 255); // standard
Rdviewer.FileOpen ("C:\\Program Files\\M2Soft\\Report Designer 5.0\\Examples\\Basic
report\\Table\\client2.mrd", "/reditmode");
}
8/16/2019 Report designer Manual - 19.Appendix IV
66/160
Append ix . Repor t Designer OCX Methods, Properties, Events
146
4.1.61. SetFocusToChart
Definition
void SetFocusToChart(BOOL bFocus);
Argument
bFocus : 0 or 1
Description
To activate chart objects in a report, double-click the mouse, thereby having all of chart
objects keep activated.
Example
function rdOpen() {
Rdviewer.SetFocusToChart(1);
Rdviewer.FileOpen ("C:\\Program Files\\M2Soft\\Report Designer 5.0\\Examples\\Basic
report\\Table\\stock amount.mrd", "");
}
8/16/2019 Report designer Manual - 19.Appendix IV
67/160
Appendix . Report Designer OCX Methods, Propert ies, Events
147
4.1.62. SetHttpAccessType
Definition
void SetHttpAccessType(short bAccess);
Argument
bAccess : 0 or 1
Description
In order to access a server through a user PC, it is to specify HTTP protocol options to be
used. If bAccess is 0, an Internet connection of the user PC is applied. If bAccess is 1, it is
to connect directly.
In some cases of configuring a proxy server on user PC, it is required to connect directly.
Example
function rdOpen() {
Rdviewer.SetHttpAccessType(1);
Rdviewer.FileOpen (“http://myserver/reports/test.mrd”, “/rf
[http://200.100.1.1:8282/RDServer/rdagent.jsp] /rp [Seoul] [] /rop /rwait”);
}
8/16/2019 Report designer Manual - 19.Appendix IV
68/160
Append ix . Repor t Designer OCX Methods, Properties, Events
148
4.1.63. SetKindOfParam
Definition
void SetKindOfParam (short opt);
Argument
opt : Encryption options can be assigned by any combination of numerals from 0 to 10.
Description
This method is to specify the encryption type of Arguments.
To transfer the encrypted Arguments when the method of FileOpen is called, use the
methods of SetArgumentEncrypt and SetKindOfParam are used at the same time. The
method of SetArgumentEncrypt notifies that the Arguments are encrypted and the method of
SetKindOfParam shows the encryption type used.
Example
The followings are samples of calling the method of FileOpen to encrypt Arguments by
means of using enc.jar.
receiving orders per employee
8/16/2019 Report designer Manual - 19.Appendix IV
69/160
Appendix . Report Designer OCX Methods, Propert ies, Events
149
onLoad="javascript:rdOpen()" style="overflow-x:hidden;overflow-y:hidden">
function rdOpen() {
Rdviewer.SetBackgroundColor(255,255,255);
Rdviewer.AutoAdjust=0;
Rdviewer.SetArgumentEncrypt(1);
Rdviewer.SetKindOfParam();
Rdviewer.SetReportDialogInfo(1,"","",1,"","");
Rdviewer.FileOpen("","");
}
8/16/2019 Report designer Manual - 19.Appendix IV
70/160
Append ix . Repor t Designer OCX Methods, Properties, Events
150
4.1.64. SetMessageboxShow
Definition
void SetMessageboxShow(short nOpt);
Argument
nOpt : 0-Show None,1-Show Error,2-Show Error & Warning,3-Show All(Error & Warning &
Info)
Description
Control the message boxes that appear in the process of executing a report.
The default value of nOpt is 3.
Example
function rdOpen() {
Rdviewer.SetMessageboxShow(1); // Print out error messages only
var ret = Rdviewer.FileOpen("http://m2soft.co.kr/report/mrd/test.mrd", "/rv StartDate[2006-
01-01] EndDate[2006-01-31]");
}
8/16/2019 Report designer Manual - 19.Appendix IV
71/160
Appendix . Report Designer OCX Methods, Propert ies, Events
151
4.1.65. SetMsgTitle
Definition
void SetMsgTitle(BSTR titlestring);
Argument
titlestring : Titles for message boxes
Description
Specify the title strings of message boxes that appear in the process of executing a report.
Example
function rdOpen() {
Rdviewer.SetMsgTitle("My Message Window");
var ret = Rdviewer.FileOpen("http://m2soft.co.kr/report/mrd/test.mrd", "/rv StartDate[2006-
01-01] EndDate[2006-01-31]");
}
8/16/2019 Report designer Manual - 19.Appendix IV
72/160
Append ix . Repor t Designer OCX Methods, Properties, Events
152
4.1.66. SetNodataObjFile
Definition
boolean SetNodataObjFile(BSTR MrdFName);
Argument
MrdFName : A path for the form file of a report, if there is no inquired data.
Description
Show the form file of a report transferred by an Argument, if there is no inquired data after
executing the report.
Example
function rdOpen() {
Rdviewer.SetNodataObjFile("http://m2soft.co.kr/report/mrd/nodata.mrd");
Rdviewer.FileOpen("http://m2soft.co.kr/report/mrd/sample.mrd", "/rp [Seoul] [Sales Reps]");
}
8/16/2019 Report designer Manual - 19.Appendix IV
73/160
Appendix . Report Designer OCX Methods, Propert ies, Events
153
4.1.67. SetNoDataDialogInfo
Definition
void SetNoDataDialogInfo(short bDlgShow, BSTR szDlgMessage, BSTR szDlgTitle);
Argument
bDlgShow : 0-Hide the information window, 1-Display the information window
szDlgMessage : Character strings of the information window
szDlgTitle : Titles of the information window
Description
If the inquired data is not found, the information window of “Can’t find the data.” appears. It is
the method either to hide such information window or to customize character strings of dialog
boxes.
Example
function SetNoDataDialogInfo_clicked()
{
//Rdviewer.SetNoDataDialogInfo (0, "", ""); // No data. Hide the message window of ‘Datanot found’.
Rdviewer.SetNoDataDialogInfo (1, "There is no inquired data.", "Alert"); // No data.
Customize the message window of ‘Data not found’ Rdviewer.FileOpen
("http://m2soft.co.kr/report/mrd/sample.mrd", "/rp [Seoul] [Sales Reps.]");
}
}
8/16/2019 Report designer Manual - 19.Appendix IV
74/160
Append ix . Repor t Designer OCX Methods, Properties, Events
154
4.1.68. SetNoPrintNoData
Definition
void SetNoPrintNoData(short flag);
Argument
flag : 0 or 1
Description
If a report has no inquired data, there is no printing job even when the method of CMPrint is
called. 1 is transferred as an Argument value.
Example
function rdOpen() {
Rdviewer.SetNoPrintNoData(1); // Do not print if there is no inquired data
Rdviewer.FileOpen("http://m2soft.co.kr/report/mrd/sample.mrd", "/rp [Seoul] [Sales Reps.]");
Rdviewer.CMPrint();
}
8/16/2019 Report designer Manual - 19.Appendix IV
75/160
Appendix . Report Designer OCX Methods, Propert ies, Events
155
4.1.69. SetPageColor
Definition
void SetPageColor(short r, short g, short b);
Description
Define the color of a page by RGB value.
The default color of a page is white RGB(255,255,255).
Example
function rdOpen() {
Rdviewer.SetPageColor(240, 240, 240); //Specify page color
Rdviewer.FileOpen("http://m2soft.co.kr/report/mrd/sample.mrd", "/rp [Seoul] [Sales Reps.]");
}
8/16/2019 Report designer Manual - 19.Appendix IV
76/160
Append ix . Repor t Designer OCX Methods, Properties, Events
156
4.1.70. SetPageLineColor
Definition
void SetPageLineColor(short r, short g, short b);
Description
Define the color of a page frame by RGB value.
The default color of a page frame is white RGB(255,255,255).
Example
function rdOpen() {
Rdviewer.SetBackgroundColor(255,255,255); // Define the background color of pages as
white
Rdviewer.SetPageLineColor(255,255,255); //Defines the page frame as white
Rdviewer.ViewShowMode (2); // Move pages to the upper left + Ignore the left and upper
margins
Rdviewer.FileOpen("http://m2soft.co.kr/report/mrd/sample.mrd", "/rp [Seoul] [Sales Reps.]");
}
8/16/2019 Report designer Manual - 19.Appendix IV
77/160
Appendix . Report Designer OCX Methods, Propert ies, Events
157
4.1.71. SetPageScroll
Definition
void SetPageScroll(short flag);
Description
If the value of flag Argument is 0, it is unable to scroll or move around pages by using a
mouse wheel.
It is the method to suppress the functions of a mouse wheel which allows users to scroll or
move around pages.
Example
function rdOpen() {
Rdviewer.SetPageScroll(0); // Do not scroll pages by using a mouse wheel
Rdviewer.FileOpen("http://m2soft.co.kr/report/mrd/sample.mrd", "/rp [Seoul] [Sales Reps.]");
}
8/16/2019 Report designer Manual - 19.Appendix IV
78/160
Append ix . Repor t Designer OCX Methods, Properties, Events
158
4.1.72. SetArgumentEncrypt
Definition
void SetArgumentEncrypt(BOOL bEncrypt);
Argument
bEncrypt : 0 - Arguments without encryption, 1 – Arguments with encryption
Description
Specify whether transferred Arguments are encrypted or not, when the method of FileOpen
is called.
To transfer encrypted Arguments when the method of FileOpen is called, use the methods of
SetArgumentEncrypt and SetKindOfParam at the same time. The method of
SetArgumentEncrypt notifies that Arguments are encrypted, and the method of
SetKindOfParam shows the encryption type used.
Example
The followings are samples of calling the method of FileOpen to encrypt Arguments by using
enc.jar
.
Receiving orders per employee
8/16/2019 Report designer Manual - 19.Appendix IV
79/160
Appendix . Report Designer OCX Methods, Propert ies, Events
159
function rdOpen() {
Rdviewer.SetBackgroundColor(255,255,255);
Rdviewer.AutoAdjust=0;
Rdviewer.SetArgumentEncrypt(1);
Rdviewer.SetKindOfParam();
Rdviewer.SetReportDialogInfo(1,"","",1,"","");
Rdviewer.FileOpen("","");
}
8/16/2019 Report designer Manual - 19.Appendix IV
80/160
Append ix . Repor t Designer OCX Methods, Properties, Events
160
4.1.73. SetParamValue
Definition
void SetParamValue(BSTR ParamName, BSTR ParamValue);
Argument
ParamName : /rp or /rv variable names
ParamValue : variable values
Description
This method is to specify variable values of /rp or /rv variable.
It can be used instead of using the /rp or /rv Argument, if variable values include ‘[’ and/or ‘]’
character.
Example
function rdOpen() {
Rdviewer.SetParamValue ("$1", "Seoul");
Rdviewer.SetParamValue ("$2", "Sales Reps. [Team 1]");
Rdviewer.FileOpen("http://m2soft.co.kr/report/mrd/sample.mrd", ""); //"/rp [Seoul] [Sales
Reps. [Team 1]]" will cause error.
}
8/16/2019 Report designer Manual - 19.Appendix IV
81/160
Appendix . Report Designer OCX Methods, Propert ies, Events
161
4.1.74. SetPartSaveDialog
Definition
void SetPartSaveDialog(short nOpt, BSTR szPart);
Argument
nOpt : 0-current page , 1-partial page
szPart - Specify the range of partial pages if the value of nOpt is 1.
Description
This method is to specify the default value of the dialog box for saving partial pages.
Example
function SetpartsaveDialog_clicked()
{
Rdviewer.SetpartsaveDialog (1, "1, 3-7"); // Parts of pages, 3-7
Rdviewer.FileOpen("http://m2soft.co.kr/report/mrd/sample.mrd", "/rp [Seoul] [Sales Reps.]");
}
8/16/2019 Report designer Manual - 19.Appendix IV
82/160
Append ix . Repor t Designer OCX Methods, Properties, Events
162
4.1.75. SetPrint
Definition
void SetPrint (short pageNum, short pageRange, short startPage, short endPage);
Argument
pageNum : Number of print copies
pageRange : Print range setting. 1(all), 2(current), 3(partial)
startPage : Set the starting page to print in parts,
endPage : Set the last page to print in parts
Description
Specify an initial value of the ‘Print’ dialog box. Use the method of CMPrint() or /rop
Argument options without opening the ‘Print’ dialog box.
Example
function rdOpen() {
Rdviewer.SetPrint(2, 3, 1, 2); // 2 pages, , pages in parts, pages from 1 to 2
Rdviewer.SetPrint2(9, 2, 0, 100); //A3 paper, 2-page group printing, printing zoom ratio
100%
Rdviewer.SetPrint3(2); // data only
Rdviewer.SetPrint4(0, 1, 0); // paper center-justified
var ret = Rdviewer.FileOpen("http://m2soft.co.kr/report/mrd/sample.mrd", "/rop /rwait /rp
[Seoul] [Saes Reps.]");}
8/16/2019 Report designer Manual - 19.Appendix IV
83/160
Appendix . Report Designer OCX Methods, Propert ies, Events
163
4.1.76. SetPrint2
Definition
void SetPrint2(short pageSize, short pageType, BOOL pageFit, short pageZoom);
Argument
pageSize : Page size. 0-A3, 1-A4, 2-B4, 3-B5, 4-LETTER, 5-136, 6-80, 7-A1, 8- A2, 9-A5
pageType : Page group printing. 1-1 page, 2-2 pages, 4-4 pages, 6-6 pages, 8-8 pages
pageFit : Adjustment to pages. 0-Set the printing zoom ratio, 1-Adjustto the pages
pageZoom : Specify the printing zoom ratio when 0 is set to the pageFit Argument.(Unit.%)
Description
Specify the initial value of ‘Print’ dialog box. The specified printing option is applied in the
case of using the method of CMPrint() or /rop Argument options without opening the ‘Print’
dialog box.
Basically, a page is adjusted to fit the page size of a designed report. It is the method to print
a page with a different size of paper.
Example
function rdOpen() {
Rdviewer.SetPrint(2, 3, 1, 2); // 2 pages, pages in parts, pages from 1 to 2
Rdviewer.SetPrint2(9, 2, 0, 100); //A3 paper, 2-page group printing, printing zoom ratio
100%
Rdviewer.SetPrint3(2); // data only
Rdviewer.SetPrint4(0, 1, 0); // paper center-justified
var ret = Rdviewer.FileOpen("http://m2soft.co.kr/report/mrd/sample.mrd", "/rop /rwait /rp
[Seoul] [Sales Reps.]");
}
8/16/2019 Report designer Manual - 19.Appendix IV
84/160
Append ix . Repor t Designer OCX Methods, Properties, Events
164
4.1.77. SetPrint3
Definition
void SetPrint3(short printOption);
Argument
printOption : Printing options. 0-All, 1-Objectonly, 2-Data only
Description
Specify the initial value of ‘Print’ dialog box. The specified printing option is applied in the
case of using the method of CMPrint() or /rop Argument options without opening the ‘Print’
dialog box.
Example
function rdOpen() {
Rdviewer.SetPrint(2, 3, 1, 2); // 2 pages, pages in parts, pages from 1 to 2
Rdviewer.SetPrint2(9, 2, 0, 100); //A3 paper, 2-page group printing, printing zoom ratio
100%
Rdviewer.SetPrint3(2); // data only
Rdviewer.SetPrint4(0, 1, 0); // paper center-justfied
var ret = Rdviewer.FileOpen("http://m2soft.co.kr/report/mrd/sample.mrd", "/rop /rwait /rp
[Seoul] [Sales Reps.]");
}
8/16/2019 Report designer Manual - 19.Appendix IV
85/160
Appendix . Report Designer OCX Methods, Propert ies, Events
165
4.1.78. SetPrint4
Definition
void SetPrint4(short BlackWhite, short Center, short BothPrint);
Argument
BlackWhite : Print in a black/white copy. 0 or 1
Center : Justify a page in the center. 0 or 1
BothPrint : Print both faces of paper. 0 or 1
Description
Specify the initial value of ‘Print’ dialog box. The specified printing option is applied in the
case of using the method of CMPrint() or /rop Argument options without opening the ‘Print’
dialog box.
Example
function rdOpen() {
Rdviewer.SetPrint(2, 3, 1, 2); // 2 pages, pages in parts, pages from 1 to 2
Rdviewer.SetPrint2(9, 2, 0, 100); //A3 paper, 2-page group printing, printing zoom ratio 100%
Rdviewer.SetPrint3(2); // datat only
Rdviewer.SetPrint4(0, 1, 0); // paper center-justified
var ret = Rdviewer.FileOpen("http://m2soft.co.kr/report/mrd/sample.mrd", "/rop /rwait /rp
[Seoul] [Sales Reps]");
}
8/16/2019 Report designer Manual - 19.Appendix IV
86/160
Append ix . Repor t Designer OCX Methods, Properties, Events
166
4.1.79. SetPrintInfo
Definition
void SetPrintInfo(BSTR pPrnDrvName, short nNumCopy, short bOneBook, short
showdlglevel);
Argument
pPrnDrvName : The name of printer driver
nNumCopy : The number of printing copies
bOneBook : 1-Print by copy, 2-Print by page
showdlglevel : 1-Hide the DB access dialog only, 2-Hide the status dialog as well, 3-Hide
the ‘Print dialog as well, 4-Hide the ‘PrintCancel’ dialog as well
Description
Specify the initial value of ‘Print’ dialog box. The specified printing option is applied in the
case of using the method of CMPrint() or /rop Argument options without opening the ‘Print’
dialog box.
Example
function CMPrint_clicked()
{
Rdviewer.SetPrintInfo ("HP LaserJet 8150 PCL 6", 2, 1, 4); // the name of printer drive: HP
LaserJet 8150 PCL 6, the number of copies:2, print by copy:1, Hide all dialog boxes popping
up during printing: 4
Rdviewer.CMPrint (); // Start printing}
8/16/2019 Report designer Manual - 19.Appendix IV
87/160
Appendix . Report Designer OCX Methods, Propert ies, Events
167
4.1.80. SetPrinttoFile
Definition
boolean SetPrinttoFile(BSTR FName);
Argument
FName : PostScript file or PCL file name
Description
This method is to save a report as a local file as well as to print it out at the same time. The
report is saved as PostScript file or PCL file which is supported by the printer driver. It is
equivalent to the use of /rprnfile Argument.
Example
function SetPrinttoFile_clicked()
{
Rdviewer.SetPrinttoFile ("c:\\test.prn");
Rdviewer.FileOpen("http://m2soft.co.kr/report/mrd/sample.mrd", "/rp [Seoul] [Sales
Reps.]");}
8/16/2019 Report designer Manual - 19.Appendix IV
88/160
Append ix . Repor t Designer OCX Methods, Properties, Events
168
4.1.81. SetRData
Definition
void SetRData(BSTR dataset);
Argument
dataset : Data set which is required for executing a report
Description
It is used in the reports of both FILE and XMLFILE access methods to specify the data set
which is required to execute a report.
Its functions are as same as /rdata Arguments and even ‘[’, ‘]’ characters which is unavailable
in /rdata Arguments can be used as data.
cf. There are two kinds of Arguments such as /rf and /rdata to specify the data source in the
reports of FILE and XMLFILE access methods.
Example
function rdOpen() {
var xmldata = "Sakhr Youness et al [No.1] Beginning Java
DatabasesWrox Press Inc.";
Rdviewer.SetRData (xmldata);
var ret = Rdviewer.FileOpen("http://m2soft.co.kr/report/mrd/books.mrd", "/rv fromdate[2006-
01-01] todate[2006-01-31]");
}
8/16/2019 Report designer Manual - 19.Appendix IV
89/160
Appendix . Report Designer OCX Methods, Propert ies, Events
169
4.1.82. SetRemakeReport
Definition
void SetRemakeReport(short flag);
Argument
flag : 0 or 1
Description
It is used in printing a report generated with the option of One Page Report(/ronepgrpt), and
specifying the printing options of whether to print the contents to scale to the paper size, or
to print it in separate pages. It should be used after the method of FileOpen is called
If the Argument value of a report is 1, it is printed out in separated pages. It is equivalent to
the use of /rremakerpt Arguments.
Example
function SetRemakeReport_clicked()
{
Rdviewer.SetRemakeReport (1); // /ronepgrpt In case of a report having Arguments, print in
separate pages.
Rdviewer.FileOpen ("C:\\Program Files\\M2Soft\\Report Designer 5.0\\Examples\\Basic
report\\Table\\sales per client.mrd", "/ronepgrpt");
}
8/16/2019 Report designer Manual - 19.Appendix IV
90/160
Append ix . Repor t Designer OCX Methods, Properties, Events
170
4.1.83. SetReportDialogInfo
Definition
void SetReportDialogInfo(short bDBConDlgShow, BSTR pDBConMsg, BSTR pDBConTitle,
short bStatusDlgShow, BSTR pStatusDlgMsg, BSTR pStatusDlgTitle);
Argument
bDBConDlgShow : 0- Hide the database access dialog box, 1-Display the database access
dialog box (Default)
pDBConMsg : Display contents on the database access dialog box
pDBConTitle : Titles of the database access dialog box
bStatusDlgShow : 0-Hide the status dialog box, 1-Display the status dialog box (Default)
pStatusDlgMsg :Display contents on the status dialog box
pStatusDlgTitle : Titles of the status dialog box
Description
This method is to control the status dialog box which displays a dialog of “Accessing
database” or shows the current page.
Example
function SetReportDialogInfo_clicked()
{
Rdviewer.SetReportDialogInfo (1,"make a connection to server", "connecting to server", 1,
"creating a report", "creating a report");
Rdviewer.FileOpen ("C:\\Program Files\\M2Soft\\Report Designer 5.0\\Examples\\Basic
report\\Table\\sales per client.mrd", "/ronepgrpt /rremakerpt");
}
8/16/2019 Report designer Manual - 19.Appendix IV
91/160
Appendix . Report Designer OCX Methods, Propert ies, Events
171
4.1.84. SetSaveDialog
Definition
void SetSaveDialog(BSTR szPath, BSTR szName, short filetype);
Argument
szPath : Saving locations
szName : File names
filetype : File formats. 1 - MRR, 2 – XLS, 3 - TXT, 4 - MRRML, 5 - PDF, 6 - TIF, 7 - BMP, 8 -
GIF, 9 - JPG, 11 - HWP, 15 - PPT, 16 - DOC, 20 - All Files(*.*) (Only available in the
Professional Version)
Description
Set the initial value of ‘Save As’ dialog box.
Example
function SaveAsDialog_clicked()
{
Rdviewer.SetSaveExcelOption (1); //1- Maintain formats when saving as Microsoft Excelfiles, 2- Allow to change formats.
Rdviewer.SetSaveDialog ("c:\\MyFolder\\", "a.xls", 2); // Set the initial value of the ‘Save As’
dialog box – location, file names, file formats
var ret = Rdviewer.SaveAsDialog (); // Save the current document with displaying the ‘Save
As’ dialog box.
alert (ret);
}
8/16/2019 Report designer Manual - 19.Appendix IV
92/160
Append ix . Repor t Designer OCX Methods, Properties, Events
172
4.1.85. SetSaveDialogEx
Definition
void SetSaveDialogEx(BSTR szPath, BSTR szName, BSTR szExtList, BSTR szDefaultExt);
Argument
szPath : Saving location
szName: A file name (excluding its extension)
szExtList : The list of file formats to be added in combo box items for file formats. @ is used
as separator.(Ex.mrr@xls@bmp@tif). If the value is “ “, all available file format are listed, and
if not, they are ignored.
szDefaultExt : The default value of file formats to be displayed in combo boxes for file
formats. (Ex. tif) If the value is "", the first file format in the list is specified as the default
value.
Description
Set the initial value of ‘Save As’ dialog box.
Expand the method of SetSaveDialog that can even specify the list of combo boxes for file
formats.
Example
function SetSaveDialogEx_clicked()
{
Rdviewer.SetSaveDialogEx ("c:\\MyFolder\\", "report1",
"xls@pdf@bmp@tif@txt@mrrml@gif@jpg@ppt@doc", "pdf");
Rdviewer.FileOpen("http://m2soft.co.kr/report/mrd/sample.mrd", "/rp [Seoul] [Sales Reps.]");
}
8/16/2019 Report designer Manual - 19.Appendix IV
93/160
Appendix . Report Designer OCX Methods, Propert ies, Events
173
8/16/2019 Report designer Manual - 19.Appendix IV
94/160
Append ix . Repor t Designer OCX Methods, Properties, Events
174
4.1.86. SetSaveExcelOption
Definition
void SetSaveExcelOption(short flag);
Argument
flag : 0 – Display the dialog box of saving options for Excel files when saving, 1 – Maintain a
report format without displaying the dialog box, 2 – Allow to change a report format without
displaying dialog box.
Description
Specify whether a format is maintained or not when saving as an excel file.
It is equivalent to the use of /rxlsopt Arguments.
Example
function SetSaveExcelOption_clicked()
{
Rdviewer.FileOpen("http://m2soft.co.kr/report/mrd/sample.mrd", "/rp [Seoul] [Sales Reps.]");
Rdviewer.SetSaveExcelOption (1); //1-Keep a report format, 2- Allow to change a format.
var ret = Rdviewer.SaveAsXlsFile ("C:\\mymy\\a.xls"); // Save as an XLS file.
}
8/16/2019 Report designer Manual - 19.Appendix IV
95/160
Appendix . Report Designer OCX Methods, Propert ies, Events
175
4.1.87. SetSaveTiffOption
Definition
void SetSaveTiffOption(short nWidth, short nHeight, short nXDPI, short nYDPI, BOOL
fLsb2Msb);
Argument
nWidth : Horizontal width
nHeight : Vertical height
nXDPI : Horizontal Resolution
nYDPI : Vertical Resolution
fLsb2Msb : Fill order. 0 - msb2lsb, 1 - lsb2msb // This part is not applied.
Description
This method is to set the option to save a file as a Tiff file.
8/16/2019 Report designer Manual - 19.Appendix IV
96/160
Append ix . Repor t Designer OCX Methods, Properties, Events
176
4.1.88. SetSessionInfo
Definition
void SetSessionInfo(BSTR SessionInfo);
Description
This method is to execute a report for RDAgent server connection, which is required to use
several RDAgent servers. Refer to the server manual for further details.
8/16/2019 Report designer Manual - 19.Appendix IV
97/160
Appendix . Report Designer OCX Methods, Propert ies, Events
177
4.1.89. SetSpoolPage
Definition
BOOL SetSpoolPage(short spoolpage);
Argument
spoolpage : The number of pages to be sent to spool files.
Description
When printing, create spool files as many as specified files.
8/16/2019 Report designer Manual - 19.Appendix IV
98/160
Append ix . Repor t Designer OCX Methods, Properties, Events
178
4.1.90. SetTextboxValue
Definition
short SetTextboxValue(BSTR objname, BSTR value);
Argument
Objname : Variable names for text box objects. To specify variable names for several text
box objects, use ‘&’ as separator.
(ex.name&jumin_no&id&password&company&title&address&telno)
szValue : Specify character strings for text boxes. To specify character strings to several text
box objects, use ‘&’ as separator.(Ex. HONG GIL DONG &710809-2642123&222-
3333&1&***&m2soft&manager& Yangjae-dong &222-3333)
Description
This method is to write the values of character strings in text box objects or table cells.
The values of character strings can be written in several objects, and it returns the number of
character strings to be written.
Example
function SetTextboxValue_clicked()
{
//Rdviewer.SetTextboxValue ("name", "HONG GIL DONG");
//Rdviewer.SetTextboxValue ("jumin_no", "710809-2642123");
//Several text box value applied at the same time
var ret = Rdviewer.SetTextboxValue
("name&jumin_no&id&password&company&title&address&telno", "HONG GIL
DONG&710809-2642123&1&***&m2soft&manager&Yangjae-dong&222-3333");
alert(ret);
}
8/16/2019 Report designer Manual - 19.Appendix IV
99/160
Appendix . Report Designer OCX Methods, Propert ies, Events
179
4.1.91. SetTifCompressType
Definition
void SetTifCompressType(short flag);
Argument
flag : 0 - CCITT Group 3 fax encoding method used(Default), 1 - CCITT Group 4 fax
encoding method used
Description
This method is to specify the encoding(Compression) method in the case of saving a file as
a Tif file format.
Example
function SetTifCompressType_clicked()
{
Rdviewer.SetTifCompressType (1);
var ret = Rdviewer.SaveAsImagefile ("C:\\mymy\\a.tif", 0); // Save as a TIF image file.}
8/16/2019 Report designer Manual - 19.Appendix IV
100/160
Append ix . Repor t Designer OCX Methods, Properties, Events
180
4.1.92. SetTifImageScale
Definition
void SetTifimageScale(short gray);
Argument
gray : 0 – Black and white(Default), 1 - GrayScale, 2 - Color
Description
Specify saving options of Tif file formats.
Example
function SetTifimageScale_clicked()
{
Rdviewer.SetTifimageScale (1);
var ret = Rdviewer.SaveAsImagefile ("C:\\mymy\\a.tif", 0); // Save as a TIF imege files
}
8