I am fetching the Piweb data in the UI screen on button click and showing in the data in the perspective table and the same table need to be downloaded in pdf format.
I am trying in the report view to fetch the same dataset to get the pdf format.
Note: Every time the table data will be dynamic data which is coming from piweb.
When passing data into the report from outside the report itself, you should provide it as a report parameter.
For example, if you are using the Report Viewer component, you can bind the report parameter directly on the component. If you are generating the report through scripting, pass the dataset in as an argument to the system.report.executeReport function.
Make sure the parameter name you pass in exactly matches the parameter defined in the report. That parameter will then be the data object you use when configuring the table in the report.
yes its binded as you suggested, but in report view table dataset is not populating. since the table is dynamic how to bind the columns in report view.
I don’t believe the Reporting Module in Ignition is dynamic enough to reconfigure report table columns at runtime. Someone else may have found a method for doing this, but I personally haven’t seen one yet.
One possible workaround is to create placeholder columns and use generic headers, then update the values through parameters. That can give the report somewhat of a dynamic feel.
For example, you could define parameters like:
columnHeader1 = x
columnHeader2 = x
columnHeader3 = x
Then bind those parameters to the table headers and populate the matching columns accordingly. It’s not truly dynamic column generation, but it may work depending on how flexible the report needs to be.
Correct. You can hide them conditionally, though, and supply custom column headers.
Design the table to take many columns with simple names, and use a scripted data source to generate a dataset with those fixed names, and generate a supplemental dataset with the original column names converted for use as column headers.