Friday, March 30, 2012
More problems with hidden parameters
blanking the prompt and therefore making it read only.
I have attempted to do this in the recommended way, i.e. by unticking the
"prompt user" check box for the parameter within report manager and
leaving the prompt with a value in it. However, when I then try to pass a
value for the parameter at runtime via a URL I get the error "Parameter1 is
read-only and cannot be modified".
N.B. I notice that when I then go back into the properties of the report,
the prompt for the parameter has been
changed from what it originally was to "Parameter1:" which is the name of
the parameter. I should also mention that this report is running against a
Sybase database.This is the defined behavior. If the 'prompt user' check box is not checked
then the parameter value can never be passed in, not via URL or SOAP. If
the parameter is marked 'prompt user' but it has no prompt string then the
Report Server toolbar will not prompt for the parameter and the parameter
can be passed in. If the 'prompt user' check box is check and there is a
prompt string then the Report Server toolbar will prompt the user and the
value can be passed in.
Does that help?
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"GML" <g_m_lowe@.hotmail.co.uk> wrote in message
news:#9sQcGIgEHA.2020@.TK2MSFTNGP10.phx.gbl...
> I've read that in SP1, it should be possible to hide a parameter without
> blanking the prompt and therefore making it read only.
> I have attempted to do this in the recommended way, i.e. by unticking the
> "prompt user" check box for the parameter within report manager and
> leaving the prompt with a value in it. However, when I then try to pass a
> value for the parameter at runtime via a URL I get the error "Parameter1
is
> read-only and cannot be modified".
> N.B. I notice that when I then go back into the properties of the report,
> the prompt for the parameter has been
> changed from what it originally was to "Parameter1:" which is the name of
> the parameter. I should also mention that this report is running against
a
> Sybase database.
>
>|||Actually that helps me, wished I'd found this one before posting my own
question.
I should add that this is not the way the readme for SP1 suggests it should
work, it says that previously removing the check from the Promp User used to
make the parameter read only, but this behaviour has changed.
Regards
Mike Hanson
"Daniel Reib [MSFT]" wrote:
> This is the defined behavior. If the 'prompt user' check box is not checked
> then the parameter value can never be passed in, not via URL or SOAP. If
> the parameter is marked 'prompt user' but it has no prompt string then the
> Report Server toolbar will not prompt for the parameter and the parameter
> can be passed in. If the 'prompt user' check box is check and there is a
> prompt string then the Report Server toolbar will prompt the user and the
> value can be passed in.
> Does that help?
> --
> -Daniel
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "GML" <g_m_lowe@.hotmail.co.uk> wrote in message
> news:#9sQcGIgEHA.2020@.TK2MSFTNGP10.phx.gbl...
> > I've read that in SP1, it should be possible to hide a parameter without
> > blanking the prompt and therefore making it read only.
> > I have attempted to do this in the recommended way, i.e. by unticking the
> > "prompt user" check box for the parameter within report manager and
> > leaving the prompt with a value in it. However, when I then try to pass a
> > value for the parameter at runtime via a URL I get the error "Parameter1
> is
> > read-only and cannot be modified".
> >
> > N.B. I notice that when I then go back into the properties of the report,
> > the prompt for the parameter has been
> > changed from what it originally was to "Parameter1:" which is the name of
> > the parameter. I should also mention that this report is running against
> a
> > Sybase database.
> >
> >
> >
>
>sql
more on parameters...
For reasons that are not important to explain, we have several different
types of parameters..we have a couple that we would like to have the user do
an external search (there are too many values to set the parameter up to run
an sp to display allowable values) so we want to create a 'search' page for
them to narrow down / search and pick an appropriate value. The SP that
supplies the report(s) needs to have a value passed to run the report (we
can't filter after the fact). My question is that no 2 databases (out of 60
+ databases) are going to have the same value(s) for these particular
parameters - but I need to set the parm up to have a default value...I
believe... . Does the default value have to be an allowable value? Or can
you put something in as a place holder or a phrase to look for in code so we
can take the neccessary next step (open search page)?
I hope I am explaining this ok...
Thanks,Its hard to unserstand. In generay you can define any default values for RS
Reports if you like. Same for SP, but I think you should be careful wit
datatype there.
Markus Pöhler
netpoint-edv gmbh
Germany
"Myles" wrote:
> We have a custom .net webb app front end that uses the SOAP methods for rs.
> For reasons that are not important to explain, we have several different
> types of parameters..we have a couple that we would like to have the user do
> an external search (there are too many values to set the parameter up to run
> an sp to display allowable values) so we want to create a 'search' page for
> them to narrow down / search and pick an appropriate value. The SP that
> supplies the report(s) needs to have a value passed to run the report (we
> can't filter after the fact). My question is that no 2 databases (out of 60
> + databases) are going to have the same value(s) for these particular
> parameters - but I need to set the parm up to have a default value...I
> believe... . Does the default value have to be an allowable value? Or can
> you put something in as a place holder or a phrase to look for in code so we
> can take the neccessary next step (open search page)?
> I hope I am explaining this ok...
>
> Thanks,
Friday, March 23, 2012
Monthly Reports
Actually I am generating report by stored procedure by passing two parameters like START date and END date.
Now my problem is I need to generate report for every month seperately that fall in range of START date and END date.
thanks
IndiraIndira,
Group by Date, and when creating the group, if you use a date, Crystal will, by default, give the grouping options:
the date, in a dropdown
the order to sort by, in a dropdown,
the grouping frequency, in a dropdown (defaults to "for each day.")
change the last one to "for each month."
Crystal will then produce your summaries for each calendar month within the range.
You can then add a page break after this date group, to start anew page with a new month.
That's how you'd produce one report covering many months, aggregated by each month.
YOur question says you want to produce separate monthly reports.
If they are paper copies, you just restart your page numbering for each new group, print the report out, and then distribute the separate months pages as separate reports.
If you want to produce separate files, you will need to outline which method you want to use to distribute the separate reports, because thismight require code via VB or C etc...
Dave
Monthly parameter expressions [Formerly:Queried parameters]
Hello,
I need to be able to set the date parameters of a report dynamically when it is run based on system time. The problem I am having is being able to compare the dates (StartDate & EndDate) against [Service Date 1]. Essentially this report will only pull the current month's data.
The date fields being created with the GETDATE, DATEADD & DATEDIFF functions are working correctly. Do I need to create a separate dataset to be able to run the parameters automatically in the actual report?
Any help would be greatly appreciated!
SELECT TodaysDate =GetDate()-2,dbo.[Billing Detail].[Service Date 1], DATEADD(mm, DATEDIFF(mm, 0, DATEADD(yy, 0, GETDATE())), 0) AS StartDate, DATEADD(dd, - 1, DATEADD(mm, DATEDIFF(mm, -1, GETDATE()), 0)) AS EndDate, dbo.[Billing Detail].Billing, dbo.[Billing Detail].Chart, dbo.[Billing Detail].Item,
dbo.[Billing Detail].[Sub Item], dbo.Patient.[Patient Code], dbo.Patient.[Patient Type], dbo.[Billing Header].Charges, dbo.Practice.Name
FROM dbo.[Billing Detail] INNER JOIN
dbo.Patient ON dbo.[Billing Detail].Chart = dbo.Patient.[Chart Number] INNER JOIN
dbo.[Billing Header] ON dbo.[Billing Detail].Billing = dbo.[Billing Header].Billing CROSS JOIN
dbo.Practice
WHERE (dbo.[Billing Detail].Item = 0) AND (dbo.[Billing Detail].[Sub Item] = 0) AND (dbo.[Billing Detail].[Service Date 1] Between StartDate AND EndDate
Phorest,
You should be able to add the parameters to your query. If you are going against SQL Server, you can replace your parameters with @.StartDate AND @.EndDate. Then in the properies of the dataset, you can assign those parameters to Parameters!StartDate.Value and Parameters!EndDate.Value, respectively.
Jessica
|||Thanks for your reply!
OK,
I think what I need to do is write the expression as a non-queried default value. However when I paste in what I know works in SQL Management Studio it returns an error "Name 'mm' is not declared"
<@.StartDate> =DATEADD(mm, DATEDIFF(mm, 0, DATEADD(yy, 0, GETDATE())), 0)
<@.EndDate> =DATEADD(dd, - 1, DATEADD(mm, DATEDIFF(mm, -1, GETDATE()), 0))
I tried putting an integer after DATEADD(mm, X , 102 DATEDIFF... but i can't get beyond intellisense. How can I fix my expression to work with Reporting Services?
What I need is to have expressions to choose the first day of the month to the last day of the same month compared to NOW()
|||Apparently that is the trick to use non-queried default values as an expression, However what I posted yesterday will not work as an expression due to the expressions limitations in SSRS:
<@.StartDate> =DATEADD(mm, DATEDIFF(mm, 0, DATEADD(yy, 0, GETDATE())), 0)
<@.EndDate> =DATEADD(dd, - 1, DATEADD(mm, DATEDIFF(mm, -1, GETDATE()), 0))
Now I am using:
<@.StartDate> =DATEADD("D", -30, NOW())
<@.EndDate> =DATEADD("D", 1, NOW())
After much searching and experimentation I can get this to work well, but it isn't exactly what I want. Does any one have any tips as to being able to write the expression to select the first day of the current month and last day of the month?
It seems to be just beyond my grasp at this time...
Thanks!
|||Phorest,
I'm afraid I misunderstood what you're trying to do. If you want a query that returns rows where the [Billing Detail].[Service Date 1] is between the start and the end of the current month, you can do that all in SQL.
It would look something similar to:
WHERE dbo.[Billing Detail].[Service Date 1]
BETWEEN dateadd(mm, datediff(mm,0,getdate()), 0)
AND dateadd(ms,-3,dateadd(mm, datediff(m,0,getdate() ) + 1, 0))
Does that work for you?
Jessica
|||I'll have to try that in the SQL, though I was more after an expression more as a datetime datatype so it picks all the dates in the current month only and the user can then adjust the parameter manually after the initial running of the report if they so choose.
Thanks!
|||I found what I was looking for here: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1581230&SiteID=1
In the Report Parameters properties I set the DataType to DateTime and using the Default Values, Non-Queried radio button set the expressions like the following:
@.StartDate =DateSerial(Year(NOW()), Month(NOW)) +0,1) gives me the first date of the current month.
@.EndDate =DateSerial(Year(NOW()), Month(NOW)) +1,0) gives me the last date of the current month.
All is wellnow!
sql