vision10 / mssql-ssrs

Promise based api for MSSQL Reporting Services with ntlm, basic, custom security
23 stars 6 forks source link

INQUIRY Only - Report Execution #4

Closed ghost closed 5 years ago

ghost commented 5 years ago

I just want to understand the feature for Report Execution.

Correct me if I understand it properly.

which did I expect when I run this code?

var reportPath = '/Folder/ReportName'; var fileType = 'word'; var parameters = { parameterName: 'parameterValue', parameterName2: false multiValue: ['value1', 'value2'] }; //or var parameters = [ { Name: 'parameterName', Value: 'parameterValue' }, { Name: 'parameterName2', Value: false } { Name: 'multiValue', Value: ['value1', 'value2'] } ] var report = await ssrs.reportExecution.getReport(reportPath, fileType, parameters)

Hoping for your kind response.

vision10 commented 5 years ago

You will get a result like this

{
    "Extension":"pdf"
    "MimeType":"application/pdf"
    "Result:" "" // base64 string
    "StreamIds":null
}

You will get a base64 string result to manipulate

I just create a file in some directory fs.writeFile('/path/reportname', report.Result, "base64")

ghost commented 5 years ago

@vision10 - Thanks a lot, closing this ticket.