Tuesday, March 27, 2012
case statement
thanksIn Report Properties there's a code tab.
There you can write function like this:
Public Function DisplayLink(ByVal Country, ByVal ShipPostalCode) As String
Dim strMapLink As String
Dim _PostalCode As String = ShipPostalCode.ToString()
Dim _Country As String = Country.ToString()
Select Case _Country
Case "USA"
strMapLink="string1"
Case "France"
strMapLink="string2"
Case "Germany"
strMapLink="string3"
Case Else
strMapLink = ""
End Select
Return strMapLink
End Function
"ter" wrote:
> is it possible to use the case statement in the reports.plz give the example
> thanks|||There is also a case/switch function in RS (like iif). Don't know the exact
syntax by now, but look at the newer posts. There was a guy with the same
prob of you. he
"ש×?×?×?" wrote:
> In Report Properties there's a code tab.
> There you can write function like this:
> Public Function DisplayLink(ByVal Country, ByVal ShipPostalCode) As String
> Dim strMapLink As String
> Dim _PostalCode As String = ShipPostalCode.ToString()
> Dim _Country As String = Country.ToString()
> Select Case _Country
> Case "USA"
> strMapLink="string1"
> Case "France"
> strMapLink="string2"
> Case "Germany"
> strMapLink="string3"
> Case Else
> strMapLink = ""
> End Select
> Return strMapLink
> End Function
> "ter" wrote:
> > is it possible to use the case statement in the reports.plz give the example
> > thanks
Monday, March 19, 2012
Cascading Parameters in Report Builder Reports!
Is it possible to create cascading parameters with in Report Builder? I have done this with Report Designer but i need a solution with Report Builder.
(I need the structure: First the user selects the state, afer the postpack the cirties of the state are listed in another dropdownlist for selection).
Thanks in advance
I need to know if it is possible. I have checked Report Builder and didn't find a way for it.
I am curios if i have missed something or if Report Builder doesn't support cascadign parameters.
Sunday, March 11, 2012
Cascading Parameter issue with RS2005... It worked in RS2000
1) Date Range (dropdown) – populated via Non-Queried Available values (Ex. Today, Week to Date, Month to Date, Fiscal Period)
2) Fiscal Period (cascading dropdown) – populated via Query Available values (if Date Range = ‘Fiscal Period’, select the last 24 fiscal months, else select Date Range value)
3) Start Date (cascading textbox) – populated via Query Default values (depending on Fiscal Period value calculate Start Date)
4) End Date (cascading textbox) – populated via Query Default values (depending on Fiscal Period value calculate End Date)
The user starts by selecting a Date Range which auto populates the Fiscal Period the auto populates the 2 Date textboxes. This works great in RS2000; however it’s not 100% in RS2005. Here’s what happens:
If a user selects ‘Today’ or ‘Month to Date’ in Date Range, everything works fine. At this point there is only 1 value in Fiscal Period dropdown. If the user selects ‘Fiscal Period’ in the Date Range, the Fiscal Period is populated with 24 values (1 for the last 24 fiscal months) and is set to the top value (June – 2006). The 2 Date textboxes are also populated correctly.
The problem is when the user changes the value in the Fiscal Period dropdown. Let's say the pick 'Mar - 2004'. The 2 Date fields are not refreshed or updated. If the user changes the selection back in the first dropdown (Date Range), everything is refreshed and updated appropriately. I don’t under stand why the first dropdown will refresh all the dependent parameters but the second dropdown won’t refresh the 2 Date fields below it?
Any input would be very helpful. I’ve tested this on 3 different development boxes and 2 different RS2005 servers. All tests had the same results.
Thanks,
Nick
Any ideas why this thing works in RS2000, but not in RS2005? Any input would be valued. Thanks,
Nick
Cascading Parameter Defaults
parameters with defaults. So far though, I've been unable to combine these
concepts.
Using the example mentioned in BOL, I'd like to have a division parameter
choice drive a department parameter dropdown. When the department dropdown
is populated, is there any way to specify a default value? So far, my
attempts to do so have failed - with no default being chosen and no errors
appearing.
Does anyone know how I might be able to accomplish this?I was able to use defaults with cascading parms. In my scenario, I wanted
the user to choose the division (I'm actually using something else), but then
have the option to choose the department. Basically, the report would show
data for the entire division if the department parm wasn't choosen.
The only way I could get this to work was to use a default for the
department parm. I set the default to "non-queried" and the formula equal to
="" (and empty string). Also, the department parm is checked off to allow
null and blank values.
At first this didn't work because the default value must be a valid value in
the department dataset that populates the dropdown. My fix was to union in
a select statement tothe dataset with the default empty string value. Here's
that sql:
SELECT '' DeptID, '' DeptName
UNION ALL
SELECT DeptID, DeptName FROM DeptTable
WHERE DivID = @.DivID
ORDER BY DeptName
Now, when the division dropdown is choosen, the cascade parm populates the
department dropdown. But since the default is set to "", and "" is a valid
choice in the recordset - RS is happy.
The only thing else I had to do was have the actual report dataset know how
to handle the department as an empty string. No biggie.
Mike, to apply this to your scenario, I think the key is making sure the
default value is always in the dataset for the dept dropdown.
Hope this helps, Frank
Cascading Multivalue Parameters fail to populate in subscription view
SSRS - SP2
We have many reports with cascading multivalue parameters. The reports and the parameters work as expected within the BI development and when deployed to the RS server. The issue we are having is that when we go to the Report Manager webpage for one of these reports and create a New Subscription the report parameters in the subscription field fail to populate. The first one or two parameters may properly populate but the 3rd, 4th, and 5th fail to populate. As a result we can not select the parameters to submit the subscription.
We have two example reports where one report uses only sql (text) and the other report uses only stored procedures. Both reports have 2 or more cascading parameters.
Any known issues with cascading multivalue parameters in the Report Manager subscription view?
I'm having the exact same problem. Did you get a fix or an answer?Cascading Multivalue Parameters fail to populate in subscription view
SSRS - SP2
We have many reports with cascading multivalue parameters. The reports and the parameters work as expected within the BI development and when deployed to the RS server. The issue we are having is that when we go to the Report Manager webpage for one of these reports and create a New Subscription the report parameters in the subscription field fail to populate. The first one or two parameters may properly populate but the 3rd, 4th, and 5th fail to populate. As a result we can not select the parameters to submit the subscription.
We have two example reports where one report uses only sql (text) and the other report uses only stored procedures. Both reports have 2 or more cascading parameters.
Any known issues with cascading multivalue parameters in the Report Manager subscription view?
I'm having the exact same problem. Did you get a fix or an answer?Wednesday, March 7, 2012
Carry Forward Balance
I'm creating a "stock ledger" using Crystal Reports 8.0. This report is printed monthly and requires that the previous month's closing balance become current month's opening balance. How do I do this?
Regards,
Rajmathihi.........
i dont know wts ur tables structure is.................but u can apply condition in ur query as
select sum(AmountField) from TableName where Month(TableName.DateField)=Month(TableName.DateField)-1
Best of Luck|||Hello "Silly Star"
Thanks for the reply, but the opening balance stock quantity and stock value are to be calculated as follows:
Every time new stock is received, the new quantity and its value gets added to the existing stock and a new rate-per-unit is calculated. suppose say I have received two consignments of a particular item on different dates, one of 100 units at 1 Re. each and the other also of 100 units, but at a cost of Rs. 1.10 each then the total stock with me is worth 210.
The same concept is applicable when stock is issued. Now when I have to issue an item I have to issue at Rs. 1.05 each.
Therefore directly considering the total of the quantity recieved and quantity issued can give me info on the quantity used, but there is huge variation in the cost (value) factor. There is fluctuation in the value and the RPU gets changed everytime new stock is received.
The report that I have designed could be used to get stock across months (say Apr - Oct). The closing balance of Apr should be taken as opening balance for May and so on.
It seems in D2K there is separate option using which this can be performed. I just wanted to know if there is a way out in Crystal Reports too
Regards,
Rajmathi|||RajMathi,
I am not sure about this.
I think you can use formula field having the code
currencyvar opbal;
whilprintingrecords;
if month{datefiled}="April" then
opbal:=opbal+{ClosingBalField};
Use other formula to check whether the month is may, if so
add opbal value to openingbalance value of May|||Hello madhi,
Well, I missed out one thing. There are several items in stock and the grouping is on items, so opening balance is separate for each item.
Regards|||RajMathi,
Ok then use other formula named @.Reset having this code
currencyvar opbal;
EhilePrintingRecords;
opbal:=0;
and place this in Group header and other formula in Dectails Section
Tuesday, February 14, 2012
Can't use VS 2003 for reports now that VS 2005 and SQL 2005 are installed?
develop a web-based reporting solution. I've also had SQL Server 2000
installed, including the evaluation version of Reporting Services. I
just recently installed Visual Studio 2005 (but left Visual Studio 2003
installed as well) and updated to SQL Server 2005, including the new
version of Reporting Services. I made a copy of one of the report
projects from my VS 2003 solution and I can successfully open it in VS
2005 and convert the reports to the new RS 2005 format. However, when
I try to open my original solution (not the converted copy) in VS 2003,
the non-report projects open fine, but I get the follow message as it
tries to open each of the report projects: "The application for
C:\MyReportProject.rptproj is not installed. Make sure the application
for the project type (.rptproj) is installed." After that, the word
"unavailable" appears next to each of the report projects in Solution
Explorer, but the non-report projects are fine.
Any ideas?I am having the same issue.
--
John
"Lee" wrote:
> I've been using Visual Studio 2003 successfully for several months to
> develop a web-based reporting solution. I've also had SQL Server 2000
> installed, including the evaluation version of Reporting Services. I
> just recently installed Visual Studio 2005 (but left Visual Studio 2003
> installed as well) and updated to SQL Server 2005, including the new
> version of Reporting Services. I made a copy of one of the report
> projects from my VS 2003 solution and I can successfully open it in VS
> 2005 and convert the reports to the new RS 2005 format. However, when
> I try to open my original solution (not the converted copy) in VS 2003,
> the non-report projects open fine, but I get the follow message as it
> tries to open each of the report projects: "The application for
> C:\MyReportProject.rptproj is not installed. Make sure the application
> for the project type (.rptproj) is installed." After that, the word
> "unavailable" appears next to each of the report projects in Solution
> Explorer, but the non-report projects are fine.
> Any ideas?
>|||Dear All,
solution :
--
install the Client Components from SQL SERVER 2005.
SQL SERVER 2005 -> Client Components -> Business Intelligence
with regards,
Murali
"John K" wrote:
> I am having the same issue.
> --
> John
>
> "Lee" wrote:
> > I've been using Visual Studio 2003 successfully for several months to
> > develop a web-based reporting solution. I've also had SQL Server 2000
> > installed, including the evaluation version of Reporting Services. I
> > just recently installed Visual Studio 2005 (but left Visual Studio 2003
> > installed as well) and updated to SQL Server 2005, including the new
> > version of Reporting Services. I made a copy of one of the report
> > projects from my VS 2003 solution and I can successfully open it in VS
> > 2005 and convert the reports to the new RS 2005 format. However, when
> > I try to open my original solution (not the converted copy) in VS 2003,
> > the non-report projects open fine, but I get the follow message as it
> > tries to open each of the report projects: "The application for
> > C:\MyReportProject.rptproj is not installed. Make sure the application
> > for the project type (.rptproj) is installed." After that, the word
> > "unavailable" appears next to each of the report projects in Solution
> > Explorer, but the non-report projects are fine.
> >
> > Any ideas?
> >
> >|||That will install 2005 components...
What I need back is the 2003 projects templates that work will SQL 2000 !
Has anybody managed to fix this issue ?
> install the Client Components from SQL SERVER 2005.
> SQL SERVER 2005 -> Client Components -> Business Intelligence
> with regards,
> Murali
>
> "John K" wrote:
> > I am having the same issue.
> >
> > --
> > John
> >
> >
> > "Lee" wrote:
> >
> > > I've been using Visual Studio 2003 successfully for several months to
> > > develop a web-based reporting solution. I've also had SQL Server 2000
> > > installed, including the evaluation version of Reporting Services. I
> > > just recently installed Visual Studio 2005 (but left Visual Studio 2003
> > > installed as well) and updated to SQL Server 2005, including the new
> > > version of Reporting Services. I made a copy of one of the report
> > > projects from my VS 2003 solution and I can successfully open it in VS
> > > 2005 and convert the reports to the new RS 2005 format. However, when
> > > I try to open my original solution (not the converted copy) in VS 2003,
> > > the non-report projects open fine, but I get the follow message as it
> > > tries to open each of the report projects: "The application for
> > > C:\MyReportProject.rptproj is not installed. Make sure the application
> > > for the project type (.rptproj) is installed." After that, the word
> > > "unavailable" appears next to each of the report projects in Solution
> > > Explorer, but the non-report projects are fine.
> > >
> > > Any ideas?
> > >
> > >|||Did you try re-installing the RS 2000 report designer?
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"mikey" <mikey@.discussions.microsoft.com> wrote in message
news:C4164015-D773-40D7-BABB-4E0AE343CC1E@.microsoft.com...
> That will install 2005 components...
> What I need back is the 2003 projects templates that work will SQL 2000 !
> Has anybody managed to fix this issue ?
>
>> install the Client Components from SQL SERVER 2005.
>> SQL SERVER 2005 -> Client Components -> Business Intelligence
>> with regards,
>> Murali
>>
>> "John K" wrote:
>> > I am having the same issue.
>> >
>> > --
>> > John
>> >
>> >
>> > "Lee" wrote:
>> >
>> > > I've been using Visual Studio 2003 successfully for several months to
>> > > develop a web-based reporting solution. I've also had SQL Server
>> > > 2000
>> > > installed, including the evaluation version of Reporting Services. I
>> > > just recently installed Visual Studio 2005 (but left Visual Studio
>> > > 2003
>> > > installed as well) and updated to SQL Server 2005, including the new
>> > > version of Reporting Services. I made a copy of one of the report
>> > > projects from my VS 2003 solution and I can successfully open it in
>> > > VS
>> > > 2005 and convert the reports to the new RS 2005 format. However,
>> > > when
>> > > I try to open my original solution (not the converted copy) in VS
>> > > 2003,
>> > > the non-report projects open fine, but I get the follow message as it
>> > > tries to open each of the report projects: "The application for
>> > > C:\MyReportProject.rptproj is not installed. Make sure the
>> > > application
>> > > for the project type (.rptproj) is installed." After that, the word
>> > > "unavailable" appears next to each of the report projects in Solution
>> > > Explorer, but the non-report projects are fine.
>> > >
>> > > Any ideas?
>> > >
>> > >|||Hi Bruce,
I did this morning.. and it has worked by installing the client designer of
SQL 2000 reporting back onto my machine.
Thanks for the reply. Just hadn't had chance to post my solution back.