Jump to content
We've recently updated our Privacy Statement, available here. ×

Generating Multiple Pdf based on the distinct values from Data Table

Arpit Trivedi

Recommended Posts

Hi Team , I am working on to genearate dynamicmultiple pdf's based on the values in Data Table.I tried generating via prepared report but it gives a single pdf with all records. I want dynamic pdfs with different name for each data set.

Issue : getting multiple pdfs but all pdf having the same data . I expect data to changeas i am changing the Data limit condition . This happens mostly in case of multiple records.

Mostly getting all teh pdfs for the last value in the list.

#Companies is list of all the unique companies names

for company in Companies:


print company





# Declaring the function which will run async

def g(app,fileName):

def f():


return f

def refreshData(company,filelocation):



for vis in page.Visuals:

print vis.Title

if vis.Title != 'skip':

myVis = vis.As[CrossTablePlot]()


print re.sub('#val',company, WhereClauseexp)

myVis.Data.WhereClauseExpression =re.sub('#val',company, WhereClauseexp)

report = Application.Document.TryGetReport("PreparedReport")[1]

name=re.sub('[^a-zA-Z0-9 n]', '', company)


print filename



print t


return true

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...