Showing posts with label pages. Show all posts
Showing posts with label pages. Show all posts

Monday, February 20, 2012

Message Box In Reporting services

Hello,

I am using sql reporting services 2000. I have tried to put a message box in my reports using a VB function. If the report contains 10 pages, the message box pops up 10 times. What do i need to do to make the message box pop up only once during the start of the report? Also, if I click CANCEL(vbOkCancel), the cursor should go back to the parameter box prompting me to enter a parameter again. In this case, I enter a date and check whether it is a MONDAY or not. VB function is as below...

Function CheckDay(ByVal S As DateTime) As Integer
Dim GivenDate as Date
Dim GivenDay as Integer
Dim intMsg as Integer
GivenDate = S
GivenDay = WeekDay(GivenDate)
If NOT GivenDay = 2
intMsg = MsgBox("The selected day is not a Monday", VbOKCancel, "The selected date is not a Monday.")
End IF

Return GivenDay
End Function

Thanks......

I recommend to use the ReportViewer control (www.gotreportviewer.com) of VS 2005 instead and build your own parameter user interface to perform the validation. Once, the validation succeeds, you would use the ReportViewer control to display the report.

The approach you are currently trying won't work. Also keep in mind that the message box pop up will only work when running that report in preview. It won't work for reports deployed on a report server.

-- Robert

Merging two reports at runtime..

How do I merge two or more reports at runtime?
For example :
I have reports (or pages) A, B and C. The user chose to print pages A and C
only. I will have to merge A and C and print them as one report.
Thanks in advance for any suggestions/solutions.
-SurendraTake a look at http://blogs.msdn.com/bryanke/articles/71491.aspx. You could
use this code in a custom app, have the users pass report names as
parameters and then use these parameters in your code to print the
corresponding reports accordingly.
--
Ravi Mumulla (Microsoft)
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Surendra" <spepakay@.hotmail.com> wrote in message
news:%23iEJB7GiEHA.3988@.tk2msftngp13.phx.gbl...
> How do I merge two or more reports at runtime?
> For example :
> I have reports (or pages) A, B and C. The user chose to print pages A and
C
> only. I will have to merge A and C and print them as one report.
> Thanks in advance for any suggestions/solutions.
> -Surendra
>|||Thanks for the suggestion Ravi!!
That was one option I had considered and was looking for a way to accomplish
this via the URL. Maybe I am being too naive and ambitious. Please let me
know if you have any other suggestions.
Thanks again
Surendra
"Ravi Mumulla (Microsoft)" <ravimu@.online.microsoft.com> wrote in message
news:OdCg6tIiEHA.3944@.tk2msftngp13.phx.gbl...
> Take a look at http://blogs.msdn.com/bryanke/articles/71491.aspx. You
could
> use this code in a custom app, have the users pass report names as
> parameters and then use these parameters in your code to print the
> corresponding reports accordingly.
> --
> Ravi Mumulla (Microsoft)
> SQL Server Reporting Services
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> "Surendra" <spepakay@.hotmail.com> wrote in message
> news:%23iEJB7GiEHA.3988@.tk2msftngp13.phx.gbl...
> > How do I merge two or more reports at runtime?
> >
> > For example :
> >
> > I have reports (or pages) A, B and C. The user chose to print pages A
and
> C
> > only. I will have to merge A and C and print them as one report.
> >
> > Thanks in advance for any suggestions/solutions.
> > -Surendra
> >
> >
>