![]() |
| Why should I use a library for roles etc. | ||
![]() | Group: ARIS Support Posted: 2013-03-22 678 views | 4 comments | ![]() |
| [SOLVED] How to: Highlight ObjOcc in Model only for reporting | ||
![]() | Group: Reports & Macros in ARIS Posted: 2013-02-26 586 views | 2 comments | ![]() |
| Access Permission on Attribute | ||
![]() | Group: ARIS Support Posted: 2013-02-25 420 views | 2 comments | ![]() |
| [SOLVED] Variant-Methods not available on ObjDef | ||
![]() | Group: Reports & Macros in ARIS Posted: 2013-02-11 352 views | 1 comments | ![]() |
| Show Link-Attributs in Publisher | ||
![]() | Group: We Love BPM Posted: 2013-01-23 304 views | 0 comments | ![]() |
| How to manipulate placed attributes on an occurance by report | ||
![]() | Group: Reports & Macros in ARIS Posted: 2012-10-10 780 views | 3 comments | ![]() |
| Changelog of Modelchanges | ||
![]() | Group: ARIS Support Posted: 2012-09-26 478 views | 2 comments | ![]() |
| How to report formated attributes like AT_DESC | ||
![]() | Group: Reports & Macros in ARIS Posted: 2012-09-21 810 views | 4 comments | ![]() |
| DB-Defined Header an Footer is not visible in print outs | ||
![]() | Group: ARIS Support Posted: 2012-07-16 639 views | 5 comments | ![]() |
| How to number Objects (semi-automatic) | ||
![]() | Group: Reports & Macros in ARIS Posted: 2012-07-12 1600 views | 7 comments | ![]() |
| Comments |

Hi Dominik,
try to use:
Report class Context - Method addOutputFile
addOutputFile ( String p_sFileName, byte[] p_fileData )
Adds the specified file to list of files to be transfered to the client.
Cheers,
Jens
- Login or register to post comments

Hi Jens,
thanks for this.
I get an TypeError, saying that this function cannot be found.
And second, how can I put the Data into p_fileData?
What I have is:
var oOutDef = Context.createOutputObject()
oOutDef.OutputF("blabla", getString("ID_STYLE_RD_DEFAULT"))
oOutDef.WriteReport()This works with opening Excel. With your Info, I tried this:
var oOutDef = Context.addOutputFile("text.xls",p_fileData)
oOutDef.OutputF("blabla", getString("ID_STYLE_RD_DEFAULT"))
oOutDef.WriteReport()

Hi Dominik,
in this case I think
addOutputFileName ( String p_sFileID, int p_nLocation )
is better. You have to do the following:
1. Create a output object with a given filename
var out = Context.createOutputObject ( Constants.OUTEXCEL, filename );
2. Add some content
out.OutputF("blabla", getString("ID_STYLE_RD_DEFAULT"));3. Add the output file to transfer
Context.addOutputFileName(filename, Constants.LOCATION_OUTPUT);
4. Call WriteReport
out.WriteReport( Context.getSelectedPath(), filename );
Jens

Hi Jens,
Thanks. It almost works. Im running in trouble with the 4th statement.
When I read the ARIS help to the WriteReport(String,String)-Statement, there is documented, that the first parameter (p_sSelectedPath) will be ignored. This fits the current error. The report does not try to save the report where I like, he chooses "D:\ARIS7.2\server\temp\ReportTemp\5\text.xlsx. This is a directory that does not exist on the client. This is the server-directory, and none of the users later have access to this share. Even when the file will be stored there. They can't get the report by file-explorer.
So, how can the correct place be defined?
I have a var for this:
var selClientFolders = Dialogs.getClientFolder("Select new output folder", "", false)
What can be done?
Dominik

Here an example writing two files. Send to client in a folder selected by the user:
function main() {
var out = Context.createOutputObject ( Constants.OUTEXCEL, Context.getSelectedFile() );
out.DefineF("F1", "ARIAL", 8, Constants.C_BLACK, Constants.C_TRANSPARENT, Constants.FMT_LEFT, 0, 21, 0, 0, 0, 1);
out.BeginTable(100, Constants.C_BLACK, Constants.C_TRANSPARENT, Constants.FMT_CENTER, 0);
out.TableRow();
out.TableCellF("BlaBLa", 100, "F1");
out.EndTable(" ", 100, "ARIAL", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_CENTER | Constants.FMT_VCENTER|Constants.FMT_BOLD, 0);
var filename = "secondfile.xls";
var out2 = Context.createOutputObject ( Constants.OUTEXCEL, filename );
out2.DefineF("F1", "ARIAL", 8, Constants.C_BLACK, Constants.C_TRANSPARENT, Constants.FMT_LEFT, 0, 21, 0, 0, 0, 1);
out2.BeginTable(100, Constants.C_BLACK, Constants.C_TRANSPARENT, Constants.FMT_CENTER, 0);
out2.TableRow();
out2.TableCellF("BlaBLa2", 100, "F1");
out2.EndTable(" ", 100, "ARIAL", 10, Constants.C_BLACK, Constants.C_TRANSPARENT, 0, Constants.FMT_CENTER | Constants.FMT_VCENTER|Constants.FMT_BOLD, 0);
out2.WriteReport();
Context.addOutputFileName(filename, Constants.LOCATION_OUTPUT);
var selClientFolders = Dialogs.getClientFolder("Select new output folder", "", false);
if( selClientFolders != null ) {
for each( folder in selClientFolders ) {
Context.setSelectedPath( folder );
}
}
out.WriteReport();
}
main(); 