[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

SAP Crystal for VS2010 - Loading Parameter DefaultValue using C#

Posted on 2012-08-21
5
Medium Priority
?
1,144 Views
Last Modified: 2012-08-21
Hello,

I've written a C# application that basically is used to run and display a Crystal Report.  I used VS 2010 to create the application along with SAP Crystal Reports for VS 2010.  I've got code in my application that looks at the parameters in the crystal report.  If the parameter name matches a name in a i have in a subroutine, I will pull a sql query out of a database and load up a Datatable.  I then loop through the datatable and load the DefaultValues field of the current parameter i am on.  The purpose is to give the user a dynamic (up to date) list of say a personnel table.  This works but it is extremely slow.  To load about 500 names in the defaultvalues list it takes about 5 minutes.  Does anyone have a solution for this.  Is there a way to load the entire datatable at one time instead of walking the table.  Any help would be appreciated.

Attached is the code.
Code.txt
0
Comment
Question by:UncleT
  • 3
  • 2
5 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 38318216
WHy don't you make the parameters themselves dynamic?

mlmcc
0
 

Author Comment

by:UncleT
ID: 38318248
The parameter itself is a concatination of several fields in the database (ie persons full name) and there is no way to do that dynamically in crystal (version 11).  If there is a way to do this this may be my solution but I couldn't figure out how to concatinate (Last Name, First Name, Middle Name and a PersonnelPK) in crystal 11.  Do you know of a way to do this?
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 38318262
I can't think of a way to do that.  How about rather  than using the Crystal parameter screen write one in the application then pass the values to the report?

mlmcc
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 2000 total points
ID: 38318269
Can you build a view in the database?

You could build a command that does the concatenation then use it for the parameter

mlmcc
0
 

Author Closing Comment

by:UncleT
ID: 38318310
mlmcc,

Both of your answers were excellent suggestions.  I've already did something kind of like your first suggestion, I put an inbox to tell the user to give me the personnel's last name and this narrows the DB search down to where there isn't much wait time on loading the parameters.  The other suggestion of creating a view is a very good solution also.  I may look at that one too.  Thanks for your help.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses
Course of the Month20 days, 11 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question