Wednesday, March 28, 2012
Pareto Charts
Does anyone know how to do Pareto Charts in Crystal Reports? Is it possible?
Also - when I use the chart expert, in the Data tab the following are grayed out: Group, Cross Tab, Olap; any ideas why?
Thanks!I don't think you can do Pareto with standard version of Charting tool (Amigo).
We don't use the standard tool anywhere, due to its limitations.
An upgrade to CRChart, which does 2 Pareto formats, can be obtained from Dan Weingart at:
http://www.threedgraphics.com/tdg/noteworthy/crystalreports.asp
We nogeotiated and got about 50% off the standard retail price for this replacement for sscdsdk80.dll (Crystal's charting engine), and so far it has done everything we asked for.
As for groups etc, I'm not sure, but I think CrossTab needs to have a crosstab present in the report before it can summarise the crosstab data via a report.
Dave
appended a snapshot from ThreeD's doc's for you.|||Thanks! Big help!!|||Can I pick your brain again? When I go to use the Pareto Charts, do I need to set my data in a cross tab report?
Any feedback is greatly appreciated.|||I don't think you need a cross tab, but like verything with Crystal, its hard to remember the premutations.
Last time I used a Paerto was over a year ago.
You should just be able to make a data series for each one, and represent one as you aggregated trend line and one as you raw data.
Need more time to investigate than I can give, unfortunately. deadlines, deadlines.
Dave
Monday, March 26, 2012
Parent package call to Child package
I run into some issues and really need some expert help here.
Here is the problem. I have two packages (parent.dtsx and child.dtsx). Both package have its own configuration file (parent.dtsConfig and child.dtsConfig). The file Child.dtsConfig contains a variable (i.e. "X") that is to be used by Child.dtsx.
Inside parent.dtsx. there is a package-task that calls into Child.dtsx. It worked perfectly well if I run parent.dtsx using Dtexec or from inside SSIS's IDE.
Now I want to programmably call "parent.dtsx" from my C# code. I loaded package using "app.LoadPackage"... Inside C# code, I want to reconfigure Child-package's variable ("X"). I then loaded in "Child.dtsx". However when I run "parent.dtsx" and child.dtsx still loads the original value for "X". The reconfigured value for "X" is not updated.
Please help on how to get around this issue.
Thanks.
Are you changing the configuration file or the value in the package itself? If you change the value in the package, it will be overwritten by the value from the config file at runtime.|||Your comments are exactly CORRECT...
I load the package and change the values (for both parent and chiled) inside the C# code. Yes, when I kick off parent package from C#, the child package load variables' value from child's configuration file.... This is NOT what I want.. Do you know any way to avoid this ? How do I persist the udpated values ?
|||Change the config file information with your C# code. Or use a SQL Server based configuration and update the table before each child package execution.|||
Phil Brammer wrote:
Change the config file information with your C# code. Or use a SQL Server based configuration and update the table before each child package execution.
Or don't use configurations. If you are running the packages from your code, and you are setting the values each time you load and execute the packages, what purpose are the configurations serving?
|||Thank you... Your comments are valid suggestions.
However,
first, I have a master package (parent) and many child packages. Each individual child package has its own configuration file (childXXX.dtsConfig) which is an XML file. We did not use SQL as configuration. We want to reuse this entire package suite for two different business domains. In one scenario, we run packages using DTEXEC (or scheduled job) and it worked well. In another scenario, we want to RE-USE the entire package suite from C# code. I want to re-configure each packages inside C# code. And lauch the master package and HOPEFULLY execute all child packages with updated variable values (rather than reading from configuration files because configuration file contains old-values which I do not want to load). Those configuration files
So i need to keep all XML configuration files.
Secondly even if I do not use configuration file, I still cannot persist child's updated variable values. I have set up a simple pair of package (parent and child) to verify it. Inside parent package, i have a task to execute the child package... And i reconfigure child package and start to run parent package inside C#. I found that Child package's configuration updates are lost.
I have zipped all of my testing files and wish to send you all files via email if you are interest. I would definitely appreciate your help as I am stuck now.
Please help.
|||Right, but the configuration files override any changes you make with C# as John stated. How do you propose to get around that?|||
Steve Wang 2006 wrote:
Thank you... Your comments are valid suggestions.
However,
first, I have a master package (parent) and many child packages. Each individual child package has its own configuration file (childXXX.dtsConfig) which is an XML file. We did not use SQL as configuration. We want to reuse this entire package suite for two different business domains. In one scenario, we run packages using DTEXEC (or scheduled job) and it worked well. In another scenario, we want to RE-USE the entire package suite from C# code. I want to re-configure each packages inside C# code. And lauch the master package and HOPEFULLY execute all child packages with updated variable values (rather than reading from configuration files because configuration file contains old-values which I do not want to load). Those configuration files
So i need to keep all XML configuration files.
Secondly even if I do not use configuration file, I still cannot persist child's updated variable values. I have set up a simple pair of package (parent and child) to verify it. Inside parent package, i have a task to execute the child package... And i reconfigure child package and start to run parent package inside C#. I found that Child package's configuration updates are lost.
I have zipped all of my testing files and wish to send you all files via email if you are interest. I would definitely appreciate your help as I am stuck now.
Please help.
In your simple test, are you re-saving the child package after changing the variable settings? When you execute the parent from code, it will load the child package from the location pointed to by the package connection manager. It will not run the one you have loaded in your program.
I don't think you can do what you are trying to do. As Phil mentioned, the configurations will always take precedence over values saved in the package. If you want to run the same packages with different configurations, try using two different sets of configuration files, or have the parent package pass all values to the child packages through a parent package configuration. That way, you set the parent values when you execute it, and all the child packages pick up their values from it.
|||Thanks Phil and John for prompt response...
In my simple test, I re-saved the re-configured parent and child packages to new XML files (using Application.SaveToXML(..) ) and reloaded them back with the hope of child package not loading configuration from configuration files. It did not work.... i.e. Child package still loaded variable values from child.dtsConfig file.
I have also tried to overwrite the configuration file using SSIS's API (i.e. Package.ExportConfigurationFile (....). This function seems to have some bugs that does NOTHING always.. Nothing is written out to file. Here is a posing that complains this API: http://sqljunkies.com/Forums/Search/default.aspx?SearchFor=1&SearchText=neetash
What I thought is: If i could overwrite the configuration file with updated variable setting (from C#), then the issue is solved. However the API "Package.ExportConfigurationFile(...)" is useless.
|||Even if you were able to use the ExportConfigurationFile function - wouldn't that impact the ability to run the packages directly through DTEXEC? You'd effectively be altering both ways of running the packages.
If that is acceptable, I'd still suggest just loading the config file into an XML DOM object, change what you need to change, and save it back out.
If you need to keep the two methods of running the packages seperate, you'd still need to go with Parent Package configurations.
Saturday, February 25, 2012
Parameters and Formulas in a group field
"This formula cannot be used because it must be evaluated later"
my formula is a account balance formula and I have a parameter that I want to choose where the balance is greater than ".01"
How can I get this accomplished?So you want to use the result of the group footer formula in the record selection formula?
What is your formula? You might be able to use the group selection formula instead.
e.g. if you're grouping on account and summing a value field your group selection formula could be something like
sum({value}, {account}) > 0
which will only return accounts whose 'balance' is > 0