Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Document Reports

Hi

just wondering, Is it possible to pass the information about the available document reports(reportID,reportname and number of pages) created in a qlikview app  to a table??

so I can do this:

Load reportID,

        reportName,

        Pages

From Documentreports;

thanks!!

5 Replies
Not applicable
Author

Hi,

You can try the following code:

set reps = ActiveDocument.GetDocReports

msgbox(reps.Count)

OR

set ri = ActiveDocument.GetDocReportInfo

for

     i = 0 to ri.Count-1

     set r = ri.Item(i)

     msgbox(r.Id)

     msgbox(r.Name)

     msgbox(r.PageCount)

next

Pleasre refer to the APIGuide for some additional info.

Cheers.

Not applicable
Author

Thank you for your reply. Is there a way to pass the report info (reportId,reportname and pages) to a table??

cause I want my user/s to select a particular report to print that is listed in a listbox.

multibox.png

Not applicable
Author

Hi,

You can use the follwing functions in load script:

ReportComment(report_number)
Returns the comment of the report with the specified number within the active document.

ReportName(report_number)
Returns the name of the report with the specified number within the active document.

ReportID(report_number)
Returns the id of the report with the specified number within the active document.

ReportNumber(report_id_or_name)
Returns the number of the report with the specified id or name within the active document.

NoOfReports()
Returns the number of reports in the active document.

Please see the below exampl:

     Load NoOfReports() as nrpts autogenerate(1);

     Load reportid(1) as rptnumb autogenerate(1);

You need to get no of reports into a variable and loop through to get all the reportids or names.

Cheers.

Not applicable
Author

Hi,

Please see the attached sample may help you.

Cheers.

Not applicable
Author

BlackRockS wrote:

Hi,

You can use the follwing functions in load script:

ReportComment(report_number)
Returns the comment of the report with the specified number within the active document.

ReportName(report_number)
Returns the name of the report with the specified number within the active document.

ReportID(report_number)
Returns the id of the report with the specified number within the active document.

ReportNumber(report_id_or_name)
Returns the number of the report with the specified id or name within the active document.

NoOfReports()
Returns the number of reports in the active document.

Please see the below exampl:

     Load NoOfReports() as nrpts autogenerate(1);

     Load reportid(1) as rptnumb autogenerate(1);

You need to get no of reports into a variable and loop through to get all the reportids or names.

Cheers.

thank you for this info!!