I've created a mashup with various tree tables that gets Windchill Attributes (such as name/number/quantity...) of a part when the part number is inputted into a search box.
Once I click the button to search for the number, the various tables populate with it's corresponding data.
I then click another 'CreatePDF' button where I want it to create a PDF of the populated data, however, when I use the 'CreatePDF' button it only creates a file showing empty tables and does not create a pdf of the updated/populated mashup tables.
(I have already configured the necessary 'CreatePDF' parameters (FileRepository/OutputFileName/ServerAddress/.....)). The server address is that of the mashup URL.
How do I get the PDF tool to create the PDF of the populated tree tables?
PDF Extension tool just take a snapshot of the current displaying mashup and gives that in PDF .If there is a grid/tree with huge data and is coming with a scroll then PDF will not contain all the data as it only takes the current snapshot of the mashup .When you say you click on the create PDF button then you see empty tables ,does that mean you are not even getting current displayed snapshot of mashup in PDF ? Whatever is displaying in mashup be it 5 rows in a table is not even appearing in PDF ?
Correct, the tree table is completely empty in the pdf file.
I've attached two screenshots; one of the mashup preview, the other the pdf created from it.
Note: The tree table is in a contained mashup with the 'createpdf' server address pointing to that mashup URL, hence the pdf file only shows the table. (not sure if that makes a difference?)
Any help would be greatly appreciated.
There is no problem if the tree is in contained mashup .I had a grid in contained mashup and tried the same use case and in the pdf i am getting table with data as well .Can you try executing the service from resource directly .I mean don't try to run it from mashup button .Directly go to PDFExport resource and test the createPDF service by passing the attributes directly there .I am hoping you are passing the thingworx username which has permissions to execute the services and visibility to all entities involved in mashup .
Tried the suggested but receiving the same result.
Ran the mashup, searched for part number / populated the tables, then went into the PDFExport Resource Services section. Filled in the inputs along with contained mashup URL as serverAddress and manually executed service.
Result returned a green success however output file is the same.
A PDF of the mashup tree table is created with the right headers but no actual data in the table.
(This was done in Thingworx Administrator account using Admin credentials).
It's as if it's because populating the tables doesn't physically update the URL and so executing 'CreatePDF' only scans the original mashup without it being updated.
FYI, I have bound the 'GetStructureByNumber' to the textbox/search button in order to get the data from Windchill. The output data is then bound to the tree table.
The way the PDF extension works is that it basically uses the User/Password to log in, pull up the mashup, run any services that are set to execute when the mashup loads, and then takes a screenshot. It doesn't screenshot what you see when you load the mashup and make selections yourself.
I'm in the same predicament. In my case, a user will pick a Thing to show data for and the data will show in a Time Series chart. You would have to save user selections into Properties on a Thing and then set a mashup to use those Properties to fill the mashup upon Load.
You could also use your browser's print function.
For my use case I need it to work in a way without using the print function.
I also tried what you suggested with using Things and thingProperties to assign the part number. This also did not work for me.
I've found the only thing that works is when I bypass the mashup and physically put the part number into the textbox while in mashup edit mode.
Any adjustments made when the mashup is running does not scan to pdf.