Showing posts with label return. Show all posts
Showing posts with label return. Show all posts

Friday, March 30, 2012

print icon on toolbar

Is there defo no way of altering what happens when user clicks the print icon? I want to return msgbox before printing starts?!There is no way to change the behavior of the print button to popup a msgbox first.sql

Saturday, February 25, 2012

Previous Business Day

At the moment, I have a report that's using "=Today.AddDays(-1)" to return
yesterday's date in the date range parameters, but the client has now come
back and requested that they would prefer not to use weekends...e.g.: loading
the report on Monday should show last Friday's date.
Can this be done?
Thanks in advance.
Jadranka Krapic
DBA
Stargate Technologies
(www.stargatetech.com.au)Hi,
Write simple custom code function
Function GetDate() As Date
Select Case Today.DayOfWeek
Case DayOfWeek.Monday
GetDate = Today.Date.AddDays(-3)
Case Else
GetDate = Today.Date.AddDays(-1)
End Select
End Function
And as parameter label and value put
=Code.GetDate()
Hope this help.
Best regards,
Dejan Lukovic
"Jadranka" <Jadranka@.discussions.microsoft.com> escribió en el mensaje
news:03C3F8BF-1EC8-420B-81D9-106D94D608A1@.microsoft.com...
> At the moment, I have a report that's using "=Today.AddDays(-1)" to return
> yesterday's date in the date range parameters, but the client has now come
> back and requested that they would prefer not to use weekends...e.g.:
loading
> the report on Monday should show last Friday's date.
> Can this be done?
> Thanks in advance.
> Jadranka Krapic
> DBA
> Stargate Technologies
> (www.stargatetech.com.au)

Preview doesn't return records like it does under data tab

I have a problem where have a report that uses a shared datasource that
references a SQL Server. My dataset called a stored procedure that builds a
sql string and passes in the string to an openquery() command that queries a
DB2 database that is a linked server on that same SQL Server. The results
show up fine on the data tab when I run it, but when I try to preview the
report I get the column headers but no fields show up. The query takes time
to complete (under 2 minutes) I'm only returning 200 rows with under maybe 6
columns and the preview mode indicates from the number of pages (6) that it
knows some data should be returned. But none of the data is populating in
the table. I've been on with Microsoft Tech Support going on three weeks
now and they are clueless. Anyone have any idea why this is happening? I
can view reports that are querying the linked server database w/o the stored
proc. I get no error message just no data.Are you using a table to view the data?
Have you tried deploying the report to make sure it is not a development
environment issue?
There is a cache of the data used for preview. Look in the directory where
you report is stored. Delete the .data file for the report and see if that
makes any difference.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Jennifer" <Jennifer@.discussions.microsoft.com> wrote in message
news:EABA6B8A-7EE0-4125-B0CE-947A401EBFA0@.microsoft.com...
>I have a problem where have a report that uses a shared datasource that
> references a SQL Server. My dataset called a stored procedure that builds
> a
> sql string and passes in the string to an openquery() command that queries
> a
> DB2 database that is a linked server on that same SQL Server. The results
> show up fine on the data tab when I run it, but when I try to preview the
> report I get the column headers but no fields show up. The query takes
> time
> to complete (under 2 minutes) I'm only returning 200 rows with under maybe
> 6
> columns and the preview mode indicates from the number of pages (6) that
> it
> knows some data should be returned. But none of the data is populating in
> the table. I've been on with Microsoft Tech Support going on three
> weeks
> now and they are clueless. Anyone have any idea why this is happening? I
> can view reports that are querying the linked server database w/o the
> stored
> proc. I get no error message just no data.|||Figured it out. The fields weren't populating with a stored proc. Added the
fields (case sensitive) and made sure they were mapped to the database names.
Then my data started populating on the previewed report. Microsoft figured
out for me.
"Jennifer" wrote:
> I have a problem where have a report that uses a shared datasource that
> references a SQL Server. My dataset called a stored procedure that builds a
> sql string and passes in the string to an openquery() command that queries a
> DB2 database that is a linked server on that same SQL Server. The results
> show up fine on the data tab when I run it, but when I try to preview the
> report I get the column headers but no fields show up. The query takes time
> to complete (under 2 minutes) I'm only returning 200 rows with under maybe 6
> columns and the preview mode indicates from the number of pages (6) that it
> knows some data should be returned. But none of the data is populating in
> the table. I've been on with Microsoft Tech Support going on three weeks
> now and they are clueless. Anyone have any idea why this is happening? I
> can view reports that are querying the linked server database w/o the stored
> proc. I get no error message just no data.