TOPIC: Stored Procs, Parameters, PDFs, Specific Folders..

Stored Procs, Parameters, PDFs, Specific Folders.. 13 Jun 2015 23:29 #1972

  • Troche
  • Troche's Avatar
  • Offline
Some questions about the capabilities of your scheduling software.

I'm running the desktop version of Crystal Reports version 14.0. The data source for my report is a stored procedure on SQL Server 2008. The stored procedure takes input parameters for a single company id and a date range. When I choose "Refresh Report Data" from the Reports menu I get a dialog box where I can choose from "Use current parameter values" or "Prompt for new parameter values". I choose the latter and change the company id. I have to run the report separately for each company. Is there any way I could use your scheduling software to run this report multiple times by entering a list of company ID's?

Also, I need to export the reports as pdf files to folders that have the same name as the company id.

Any suggestions?

Thanks,

Ed Troche
The administrator has disabled public write access.

Stored Procs, Parameters, PDFs, Specific Folders.. 15 Jun 2015 15:24 #1973

  • aellis
  • aellis's Avatar
  • Offline
Ed,

I had a really great reply to this made up but accidentally hit the back button and lost all of it so you will get an abbreviated redo :) Anyway, what you are looking for is something called 'bursting' and it is something that other utilities out there do very well but that Logicity is not currently ideal for. That said, there is a way to do it with Logicity if you are adventurous:

1. Take the RRD you are wishing to burst and open it in Notepad. Copy the action line(s);
2. Create a brand new Crystal Report that is pointed to the data source you wish to burst from. For example, the table with a list of companies.
3. Write a formula in this report that outputs the text from #1 swapping out any hard coded data with the dynamic values you want to pull from the database. Make this formula the only thing that outputs in your Details section of the report.
4. In the Logicity export format options, set your text export characters per inch to 72.
5. Create a RRD to run the report developed in #3 with a Save action, saving it out as a RRD file.
6. Now schedule the output RRD file in #5 - just make sure that the scheduled task for #5 comes before #6.

If this sounds confusing it is because it is. In fact, we took down a write-up we had on the website for it because it caused so much confusion. Long term we intend on making a proper burst routine into Logicity but for now this is the hack to get something like bursting available with what we've got. The one good thing about this setup is that you get complete control - not just filling in parameter values but also file paths (including subfolders), multi-type exports, whatever you can imagine.

Hope this helps!
Adam
The administrator has disabled public write access.

Stored Procs, Parameters, PDFs, Specific Folders.. 15 Jun 2015 16:54 #1974

  • RonMoses
  • RonMoses's Avatar
  • Offline
While I admire the thought that went into aellis's approach - and believe me, I'm taking notes - it seems a bit over-complicated for what you're trying to do. If you have the list of company IDs, and it's relatively static, you can simply do the following:

1. Create an RRD with the report in question, and set the parameter to the first company ID.
2. Save the RRD, then open the RRD file in Notepad.
3. Make a new copy of the report line for every company in your list.
4. On each line, edit the Name, Parameter, and output filename values as needed.
5. Save the file, open it in Logicity and confirm that each report looks the way you want it to.

That being said, if the company list is at all dynamic, you may need to go with something closer to what aellis recommended.
Last Edit: 15 Jun 2015 16:54 by RonMoses.
The administrator has disabled public write access.

Stored Procs, Parameters, PDFs, Specific Folders.. 15 Jun 2015 19:59 #1975

  • Troche
  • Troche's Avatar
  • Offline
Adam - Thanks for the help. - Ed
The administrator has disabled public write access.

Stored Procs, Parameters, PDFs, Specific Folders.. 15 Jun 2015 20:02 #1976

  • Troche
  • Troche's Avatar
  • Offline
Ron - Sounds much simpler, but yes the company list will be dynamic. Thank you for the response. - Ed
The administrator has disabled public write access.