Showing posts with label separate. Show all posts
Showing posts with label separate. Show all posts

Monday, March 12, 2012

Passing a parameter from main report SP to subreport SP

Hi,

I am using crystal reports 8.5

I have a report which has a subreport. The main report and the subreport are driven by two separate sybase SPs. The main report SP accepts 3 input parameters while the subreport SP accepts one.
One of the 3 input parameters of the main report SP is to be passed to the subreport SP as its input parameter.
So ideally when the report is run, it should ask for only 3 input params.

I tried to link the subreport. But somehow in the link box, I can't see the input parameter of the subreport which is what I want to link to the param of the main report.

Can anybody help ?

Thanks a lot,
AparnaYou can make use of Shared variables.
Assign parameter values to them and use them in subreports. Read it in help file

Passing A Date Parameter With A Month And Year As Separate Variabl

I have a query that contains the following part:
WHERE DOCDATE < @.Year + @.Month + '01'
This is supposed to allow me to find only the records before the month and
year selected. If I enter integer values for year and month, the query
returns the expected results. If I pass the parameters through the report
(where the user can choose the names of the month as opposed to the integer
value), the report does not return any results even though the year and month
data types are set as integers and the values being passes are integers, not
the month string itself(the 'label'). Can anyone help me reformulate my query
to get this working properly?
Thanks.On Nov 20, 4:48 pm, Zack <Z...@.discussions.microsoft.com> wrote:
> I have a query that contains the following part:
> WHERE DOCDATE < @.Year + @.Month + '01'
> This is supposed to allow me to find only the records before the month and
> year selected. If I enter integer values for year and month, the query
> returns the expected results. If I pass the parameters through the report
> (where the user can choose the names of the month as opposed to the integer
> value), the report does not return any results even though the year and month
> data types are set as integers and the values being passes are integers, not
> the month string itself(the 'label'). Can anyone help me reformulate my query
> to get this working properly?
> Thanks.
What you could do is create a Parameter (example it ChosenDateTime)
that is DateTime, Internal, with a Default Value of Non-queried:
= DateSerial( Parameters!Year.Value, Parameters!Month.Value, 1 )
then use
WHERE DOCDATE < @.ChosenDateTime
-- Scott

Wednesday, March 7, 2012

Pass in encrypted password parameter somehow?

I have multiple databases, one for each client. I created a master report. Then I created links to this report for each client database in separate client-specific folders. I parameterized the connection string so that the server name and the database name are parameters of the linked report. The connection string is: ="data source=" & Parameters!SrvrName.Value & ";initial catalog=" & Parameters!DbName.Value.

The problem is that the security for now is Windows Authentication. (We are in the testing phase). However, my users will be both internal (company) and external (client) users. We do not want to set up database user IDs for each client user. I could create a single SQL account that has read access to all databases, relying on the Reporting Services security. But I would prefer to create separate SQL accounts for each database as the information is sensitive. Then I would probably pass that information in as a parameter to the report as well. Either way, I would have to include the password somehow. But, if I do that, I'm not sure how to include the password parameter. I would like it to be secure and passing it in as a parameter is not very secure.

I would really appreciate some suggestions on how to proceed.

Consider storing the database credentials in the Report Server web.config file instead of passing them as parameters. The ExpressionBasedConnection report in this download shows how this could be done.