Showing posts with label ssrs. Show all posts
Showing posts with label ssrs. Show all posts

Wednesday, March 21, 2012

Postal Codes 10001-10005 as a parameter

Dear all
I like to implement a parameter in SSRS SP2, that accepts values like
10001-10005 as postal code. This should be translated to 10001, 10002,10003,
10004, 10005.
I tried to realize this with the following code:
Function SplittingCodes(ByVal s As String) As String
Dim ar As String()
Dim subar As String()
Dim sb As System.Text.StringBuilder = New System.Text.StringBuilder
ar = s.Split(","c)
For i As Integer = 0 To ar.Length - 1
ar(i) = ar(i).Trim()
If ar(i).Contains("-") Then
subar = ar(i).Split("-"c)
For j As Integer = CInt(subar(0)) To CInt(subar(1))
sb.Append(" '")
sb.Append(j)
sb.Append("'")
If j <> CInt(subar(1)) Then sb.Append(",")
Next
Else
sb.Append("'")
sb.Append(ar(i))
sb.Append("'")
End If
If i <> ar.Length - 1 Then sb.Append(",")
Next
Return sb.ToString()
End Function
I created an sql query that uses the parameter like this:
SELECT SUM (a) as test FROM table WHERE co IN (@.pcode)
And in the dataset tab on Parameters I used this code for the parameter
@.pcode:
=Code.SplittingCodes(Parameters!pc.Value)
Unfortunately the reports gives an empty dataset back.
Any help would be apreciated!
Thanks,
MarcHello Rombooth,
The root cause of this issue is that the sql statement you use in the
report.
My suggestion is that you could create a function in the sql server side to
split the string. And you could use this function in the sql statement.
You could refer this article to create the split function.
http://www.devx.com/tips/Tip/20009
Hope this helps.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Thanks Wei! This solved my problem.
Best Regards,
Marc|||Hello Marc,
My pleasure!
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.

Monday, February 20, 2012

Positive Pay Files in SSRS

I have been tasked with creating a Positive Pay (also known as Safe Pay) file
using SSRS. I was wondering if anyone here has had any experience doing this
or has any idea on the feasibility of this project. I am specifically
wondering whether SSRS is suitable for this type of task.
Thanks
Zack GallingerFirst, I haven't ever heard of Positive Pay so I googled it:"Positive Pay Is
a Way To Successfully Combat Check Fraud
Banks and large businesses are protecting themselves and are promoting a
technique called positive pay as a method of fighting check fraud artists.
Generally speaking, positive pay works like this:
a.. 1. Using accounting and database software, a company regularly sends
its bank a positive pay file that lists all the checks written against that
company's account(s). That file includes a record of each check's issue
date, amount, check number/account and payee name.
b.. 2. When a check reaches the bank for payment, the bank compares the
check against the positive pay file. Any discrepancies in a check's
information trigger a flag that the check in question may have been altered.
c.. 3. The bank notifies its corporate customer that the discrepancy has
been noted and asks the company to verify the authenticity of that check. "
Assuming you can create the query that gets the data then the issue is what
format the bank wants the data. It is very easy to create a CSV file.
You might find a SSIS job would be easier if the data format is complicated.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Zack" <Zack@.discussions.microsoft.com> wrote in mes
sage news:90685B31-1551-4F34-BF3A-A63D0DF181F5@.microsoft.com...
>I have been tasked with creating a Positive Pay (also known as Safe Pay)
>file
> using SSRS. I was wondering if anyone here has had any experience doing
> this
> or has any idea on the feasibility of this project. I am specifically
> wondering whether SSRS is suitable for this type of task.
> Thanks
> Zack Gallinger

Positioning report in SSRS

I created a report in SSRS. Current fiscal year report with every day
-- page break on month.
How do I position the report to the current month?
Right now the users have to page down when viewing the report.
I thought about creating an invisible sort column doing some sort of
equation on month, but I thought SSRS should have something to
position the report.
Thoughts?If users are most likely interested in monthly data, why not just have a
"month" query parameter added to the report?
"Muehe" <Muehe@.discussions.microsoft.com> wrote in message
news:CC3F03E4-D8ED-4A1F-8787-086A79686BF5@.microsoft.com...
>I created a report in SSRS. Current fiscal year report with every day
> -- page break on month.
> How do I position the report to the current month?
> Right now the users have to page down when viewing the report.
> I thought about creating an invisible sort column doing some sort of
> equation on month, but I thought SSRS should have something to
> position the report.
> Thoughts?|||I don't think much of using filters (versus query parameters) but in this
case it makes lots of sense. Have a Month parameter which has the option of
All. Then have the filter that returns all months or just the specific
month.
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Norman Yuan" <FakeName@.FakeEmail.Not> wrote in message
news:uH9fe3yQIHA.2208@.TK2MSFTNGP06.phx.gbl...
> If users are most likely interested in monthly data, why not just have a
> "month" query parameter added to the report?
>
> "Muehe" <Muehe@.discussions.microsoft.com> wrote in message
> news:CC3F03E4-D8ED-4A1F-8787-086A79686BF5@.microsoft.com...
>>I created a report in SSRS. Current fiscal year report with every day
>> -- page break on month.
>> How do I position the report to the current month?
>> Right now the users have to page down when viewing the report.
>> I thought about creating an invisible sort column doing some sort of
>> equation on month, but I thought SSRS should have something to
>> position the report.
>> Thoughts?
>