Using the SSRS Smart Object

  • 30 August 2010
  • 1 reply
  • 2 views

Badge +3

Following this blog http://www.k2underground.com/blogs/johnny/archive/2010/08/17/k2-4-5-tip-of-the-day-using-the-ssrs-service-broker-to-generate-pdfs-and-other-formats.aspx?CommentPosted=true I created a smart object for a SQL Server report.


I have tested the Smart Object with the smart object tester and it works correctly.


What I am having some trouble with is using it in a work flow. I would like to render the report as an Excel file, rename it if possible and add it do a document library.  When you call the smart object's Excel method I see that it returns a file object. How can I use this?


I'm knew to K2 so I'm a little lost at the moment. Any pointers would be greatly appreciated.


thanks,


Luis


1 reply

Badge +10

Hi Luis,


The K2 SharePoint Documents event can be used to upload a document to SharePoint.


This event takes a file object as an input. Drag the wizard onto the canvas and select the option to create a new file from a K2 field.


On the next page, navigate to your SmartObject and bind the "Report FileContent" property of the "Export to Excel" method to the K2 Field textbox.


In the next screen you can use the "Filename" property in the Filename textbox and rename it using Inline Functions or by using any of the Workflow Context/Data/XMLfields.


This should achieve what you require.


Regards,

Reply