Sunday, February 19, 2012

Global and Shared variables of Crystal

I have been converting a crystal report to MSRS. Crystal allows sharing variables (called shared variables) between main reports and it's subreports. Also, it has a concept of global variables which are available throughout a report. Many decisions (e.g. hiding the footer of a report) are based on these type of variables.
How can we achieve this in MSRS ? Do we have something i can add to Report Code which works as a global variable/shared variable Or there is any worwround available in general.
Imperative to mention that i shall be using seperate datasets for subreports of CR for performance reasons as suggested in BOL.
Thanks.Variables can not be shared across multiple reports. You can pass parameters
between reports however...When you call a subreport, pass whatever
information you need as parameters.
You can also use parameters as global variables within a single report...
SP1 allows parameters to be hidden so they do not appear on the user
selection list... Create the parameter and hide it... Then use the
Parameters collection to refer to it...
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"push" <push@.discussions.microsoft.com> wrote in message
news:3E941DF6-2AEE-4F24-9145-D7A5CCDDDDAB@.microsoft.com...
> I have been converting a crystal report to MSRS. Crystal allows sharing
variables (called shared variables) between main reports and it's
subreports. Also, it has a concept of global variables which are available
throughout a report. Many decisions (e.g. hiding the footer of a report) are
based on these type of variables.
> How can we achieve this in MSRS ? Do we have something i can add to Report
Code which works as a global variable/shared variable Or there is any
worwround available in general.
> Imperative to mention that i shall be using seperate datasets for
subreports of CR for performance reasons as suggested in BOL.
> Thanks.

No comments:

Post a Comment