Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Values for a stored procedure to be fed into a Crystal report

Status
Not open for further replies.

GingerFab

Programmer
Mar 6, 2017
3
US
I am using SAP Crystal 2013. It is used with BO. I have a report that is calling a stored procedure. There is an excel spreadsheet with all the values needed. We would like to automate the process of reading and processing all 38 lines of data from that spreadsheet. Is this possible?
I have attached what I have thus far. Any help will be appreciated greatly.
 
 http://files.engineering.com/getfile.aspx?folder=eca43f61-aeff-4f81-8c0e-4d18b64fca47&file=sendfinancialparms.rpt
It's not clear what you mean when you say "... reading and processing ... from that spreadsheet.

If you want to use the spreadsheet to filter the data returned from the SP, you could simply join the SP and the spreadsheet.

This is not a very efficient approach because the join will be done on the local machine, meaning all data from the SP will be returned, then filtered locally based on the spreadsheet.

It is not obvious from what you provided exactly which columns in the spreadsheet relate to the SP columns, but as long as the data you want to filter on is in the spreadsheet (and in the same format), simply create a join between it and the corresponding column in the SP.

Hope this helps

Cheers
Pete
 
I appreciate the response. To clarify, I do not want to just join the xls columns to the stored procedure parameter as that, as you explained, is not efficient. Also there are memo fields in the stored procedure that will not join to the xls.
2 of the fields in the xls have multiple values. Just based on that, can you suggest a way to at least get those processed?
 
Do you want to run the report 38 times , one for each row in the Excel file , or 1 time and use all the values from the Excel file ?

Viewer and Scheduler for Crystal reports, SSRS and Dynamic Dashboards.
 
I would like to run it 38 times, but if that cant be done I will be happy to do it all in one run. Thanks for understanding what I want!!
 
To easily run it 38 separate times you would need to do one of two things:

1. Find a 3rd party tool that will handle reading the Excel file and then running the report. There might be something available at
2. Write code using either the .NET or Java SDK that will read the file, set the parameters on the report and then run the report once for each row in the file.


Also, there is no way to pass multiple values into a single prompt in a stored procedure, so I'm not sure you would be able to do this just running the report once.

-Dell

DecisionFirst Technologies - Seven-time SAP BusinessObjects Solution Partner of the Year
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top