Showing posts with label report. Show all posts
Showing posts with label report. Show all posts

Friday, March 30, 2012

how to exec a stored procedure

hi,

how do I exec stored procedure that accept parameter and return a single value?

here is example of report

stu_id = ******

stu_name = ****

subject | marks

aa****** | call sp_mark and return student mark for that particular student id and subject

bb****** | call sp_mark and return student mark for that particular student id and subject

cc****** | call sp_mark and return student mark for that particular student id and subject

thks,

You cannot call a stored procedure per row if you mean that with your mentioned design, you would have to get all the information within one procedure to display it in the bound table.

Jens K. Suessmeyer.

http://www.sqlserver2005.de
|||

Hi Charles,

Have you tried using a user defined function in place of the stored procedure?

Simone

|||

A potentially better performing alternative to a user defined function would probably be a derived table containing the marks for each student by subject. You would then join on the table.

Something like

select stu_id, stu_name, subject, mark

from students s

left outer join (select stu_id, subject, marks from marks) m on m.stu_id = s.stu_id

Of course you would need to summarize the marks into a table...

cheers,

Andrew

how to exclude time portion of datefield in a textbox?

Hello,
The datasourece in my report contains a date field, and the time portion of
this date field is showing up. Is there a format function that I can use in
the textbox or do I need to remove the time portion at the datasource level?
If there is some kind of formatting I can do in the textbox - what does that
look like? What is the syntax?
Thanks,
RichIn the textbox properties, format tab, format code, use 'd'. The format
codes are from .Net you can also use the format function if you need to
concatenate. The elipsi button shows more options.
Steve MunLeeuw
"Rich" <Rich@.discussions.microsoft.com> wrote in message
news:93FE2808-E8D0-4F74-BF11-B669FE2718D6@.microsoft.com...
> Hello,
> The datasourece in my report contains a date field, and the time portion
> of
> this date field is showing up. Is there a format function that I can use
> in
> the textbox or do I need to remove the time portion at the datasource
> level?
> If there is some kind of formatting I can do in the textbox - what does
> that
> look like? What is the syntax?
> Thanks,
> Rich|||Thanks. I will give that a try. Although, I did tweak the datasource a
little and added this which also does the trick (just not at the report level
is the thing):
convert(char(8), s.CurExpireDate, 1) CurExpireDate
which returns say - 10/18/06 format
where CurExpireDate was the datefield in my datasource.
May I ask what the syntax looks like using 'd' in the report textbox?
= ...Fields!CurExpireDate.Value
"Steve MunLeeuw" wrote:
> In the textbox properties, format tab, format code, use 'd'. The format
> codes are from .Net you can also use the format function if you need to
> concatenate. The elipsi button shows more options.
> Steve MunLeeuw
> "Rich" <Rich@.discussions.microsoft.com> wrote in message
> news:93FE2808-E8D0-4F74-BF11-B669FE2718D6@.microsoft.com...
> > Hello,
> >
> > The datasourece in my report contains a date field, and the time portion
> > of
> > this date field is showing up. Is there a format function that I can use
> > in
> > the textbox or do I need to remove the time portion at the datasource
> > level?
> >
> > If there is some kind of formatting I can do in the textbox - what does
> > that
> > look like? What is the syntax?
> >
> > Thanks,
> > Rich
>
>|||The expression in the textbox would the the same:
=Fields!CurExpireDate.Value
the textbox is applying the formatting to the contents of the textbox.
If you wanted to concatenate strings then the expression would look
something like this:
= "Generated on " & Format(Globals!ExecutionTime, "d")
Steve MunLeeuw
"Rich" <Rich@.discussions.microsoft.com> wrote in message
news:FCE38529-426A-41FC-88DD-EAF9974AB6ED@.microsoft.com...
> Thanks. I will give that a try. Although, I did tweak the datasource a
> little and added this which also does the trick (just not at the report
> level
> is the thing):
> convert(char(8), s.CurExpireDate, 1) CurExpireDate
> which returns say - 10/18/06 format
> where CurExpireDate was the datefield in my datasource.
> May I ask what the syntax looks like using 'd' in the report textbox?
> = ...Fields!CurExpireDate.Value
>
>
> "Steve MunLeeuw" wrote:
>> In the textbox properties, format tab, format code, use 'd'. The format
>> codes are from .Net you can also use the format function if you need to
>> concatenate. The elipsi button shows more options.
>> Steve MunLeeuw
>> "Rich" <Rich@.discussions.microsoft.com> wrote in message
>> news:93FE2808-E8D0-4F74-BF11-B669FE2718D6@.microsoft.com...
>> > Hello,
>> >
>> > The datasourece in my report contains a date field, and the time
>> > portion
>> > of
>> > this date field is showing up. Is there a format function that I can
>> > use
>> > in
>> > the textbox or do I need to remove the time portion at the datasource
>> > level?
>> >
>> > If there is some kind of formatting I can do in the textbox - what does
>> > that
>> > look like? What is the syntax?
>> >
>> > Thanks,
>> > Rich
>>|||Thank you for this information.
Rich
"Steve MunLeeuw" wrote:
> The expression in the textbox would the the same:
> =Fields!CurExpireDate.Value
> the textbox is applying the formatting to the contents of the textbox.
> If you wanted to concatenate strings then the expression would look
> something like this:
> = "Generated on " & Format(Globals!ExecutionTime, "d")
> Steve MunLeeuw
>
> "Rich" <Rich@.discussions.microsoft.com> wrote in message
> news:FCE38529-426A-41FC-88DD-EAF9974AB6ED@.microsoft.com...
> > Thanks. I will give that a try. Although, I did tweak the datasource a
> > little and added this which also does the trick (just not at the report
> > level
> > is the thing):
> >
> > convert(char(8), s.CurExpireDate, 1) CurExpireDate
> >
> > which returns say - 10/18/06 format
> >
> > where CurExpireDate was the datefield in my datasource.
> >
> > May I ask what the syntax looks like using 'd' in the report textbox?
> >
> > = ...Fields!CurExpireDate.Value
> >
> >
> >
> >
> > "Steve MunLeeuw" wrote:
> >
> >> In the textbox properties, format tab, format code, use 'd'. The format
> >> codes are from .Net you can also use the format function if you need to
> >> concatenate. The elipsi button shows more options.
> >>
> >> Steve MunLeeuw
> >>
> >> "Rich" <Rich@.discussions.microsoft.com> wrote in message
> >> news:93FE2808-E8D0-4F74-BF11-B669FE2718D6@.microsoft.com...
> >> > Hello,
> >> >
> >> > The datasourece in my report contains a date field, and the time
> >> > portion
> >> > of
> >> > this date field is showing up. Is there a format function that I can
> >> > use
> >> > in
> >> > the textbox or do I need to remove the time portion at the datasource
> >> > level?
> >> >
> >> > If there is some kind of formatting I can do in the textbox - what does
> >> > that
> >> > look like? What is the syntax?
> >> >
> >> > Thanks,
> >> > Rich
> >>
> >>
> >>
>
>

How to exclude duplicate records from totals

My column figures are correct in my report, but duplicate values are being added to the totals.

I am using:

Format(Sum(Fields!ACEG_Contribution.Value), "C")

This is not a matrix report. I am using tables so it only has table headers and table footers.

How can I fix this? Please advise a-sap.

Thanx in advance for any assistance you can provide,

gb

Hi Gerry-

Not completly certain where your duplication is coming from - as per your description. If duplicate values are present in your data, you would want to use the DISTINCT clause in your query to filter duplicates.

If you have groupings in your table, and want to subtotal rather than grandtotal, you can use the scope argument on the SUM function to filter per group i.e. Sum(Fields!Value, "Group1)".

If you want to display duplicates, bu only sum the non-duplicates, you would need to have a separate query which uses the DISTINCT caluse, then create an expression in your table footer which does sum of second dataset. i.e. SUM(Fields!Value, "DataSet2")

Hope that helps,

Thanks, Jon

Friday, March 23, 2012

How to enable Remote Erros on Report Server 2005?

hi, all

When i tried to access a report via URL and I got an error page like:

Reporting Services Error

For more information about this error navigate to the report server on the local server machine, or enable remote errors
SQL Server Reporting Services

So, How to enable the remote errors and then I was able to see what is wrong.

Thanks.

You could set the "EnableRemoteErrors" configuration value to True in the ReportServer.ConfigurationInfo database table.

Alternatively, you can use the SetSystemProperties SOAP call:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsprog/htm/rsp_ref_soapapi_service_lz_63le.asp

-- Robert

|||Hi, Sorry from the newbie question :)

I saw the answer:
"You could set the "EnableRemoteErrors" configuration value to True in the ReportServer.ConfigurationInfo database table."

How can I get to the ReportServer.ConfigurationInfo database table?

I am on the reportservice server and I run "reporting services configuration manager" and the "sql server managment". I didn't saw that option :(

Any help?
Thanks.
|||

Hi,

Go To SQL Server Management Studion , Select ReportServer Database and run below Statement

Select * From ConfigurationInfo

Where Name = 'EnableRemoteErrors'

Change the Value to True

Thanks

Nilesh

How to enable Remote Erros on Report Server 2005?

hi, all

When i tried to access a report via URL and I got an error page like:

Reporting Services Error


For more information about this error navigate to the report server on the local server machine, or enable remote errors


SQL Server Reporting Services

So, How to enable the remote errors and then I was able to see what is wrong.

Thanks.

You could set the "EnableRemoteErrors" configuration value to True in the ReportServer.ConfigurationInfo database table.

Alternatively, you can use the SetSystemProperties SOAP call:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsprog/htm/rsp_ref_soapapi_service_lz_63le.asp

-- Robert

|||Hi, Sorry from the newbie question :)

I saw the answer:
"You could set the "EnableRemoteErrors" configuration value to True in the ReportServer.ConfigurationInfo database table."

How can I get to the ReportServer.ConfigurationInfo database table?

I am on the reportservice server and I run "reporting services configuration manager" and the "sql server managment". I didn't saw that option :(

Any help?
Thanks.

How to enable Remote Erros on Report Server 2005?

hi, all

When i tried to access a report via URL and I got an error page like:

Reporting Services Error


For more information about this error navigate to the report server on the local server machine, or enable remote errors


SQL Server Reporting Services

So, How to enable the remote errors and then I was able to see what is wrong.

Thanks.

You could set the "EnableRemoteErrors" configuration value to True in the ReportServer.ConfigurationInfo database table.

Alternatively, you can use the SetSystemProperties SOAP call:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rsprog/htm/rsp_ref_soapapi_service_lz_63le.asp

-- Robert

|||Hi, Sorry from the newbie question :)

I saw the answer:
"You could set the "EnableRemoteErrors" configuration value to True in the ReportServer.ConfigurationInfo database table."

How can I get to the ReportServer.ConfigurationInfo database table?

I am on the reportservice server and I run "reporting services configuration manager" and the "sql server managment". I didn't saw that option :(

Any help?
Thanks.

How to enable remote erros for report server?

hi, all
When i tried to access a report via URL and I got an error page like:
Reporting Services Error
----
For more information about this error navigate to the report server on
the local server machine, or enable remote errors
----
SQL Server Reporting Services
So, How to enable the remote errors and then I was able to see what is
wrong.
Thanks.I'm getting the same error. We can get around the problem for now by logging
onto the server to see exactly what the error is, but I have yet to find out
how to turn on remote errors.
Any one have any ideas how to do this?
"Nick" wrote:
> hi, all
> When i tried to access a report via URL and I got an error page like:
> Reporting Services Error
> ----
> For more information about this error navigate to the report server on
> the local server machine, or enable remote errors
> ----
> SQL Server Reporting Services
> So, How to enable the remote errors and then I was able to see what is
> wrong.
> Thanks.
>|||I have done this with RS 2000.
It is in the machine.config file for .NET Framework v1.1 in the
<windows>\Microsoft.NET\Framework\<Version>\ folder.
There is a XML Tag <System.Web>/<customErrors>
I think you set the value to "RemoteOnly"
It looks like there is a similar tag for .NET 2.0 but the config file looks
a little different. Hopefully, this can can point you in the right direction
-Sean
"Nick" wrote:
> hi, all
> When i tried to access a report via URL and I got an error page like:
> Reporting Services Error
> ----
> For more information about this error navigate to the report server on
> the local server machine, or enable remote errors
> ----
> SQL Server Reporting Services
> So, How to enable the remote errors and then I was able to see what is
> wrong.
> Thanks.
>|||Sean, I found on another posting that this setting is within the
ConfigurationInfo table in the ReportServer database. Setting the value to
True makes it work.
Steve
"Sean P." wrote:
> I have done this with RS 2000.
> It is in the machine.config file for .NET Framework v1.1 in the
> <windows>\Microsoft.NET\Framework\<Version>\ folder.
> There is a XML Tag <System.Web>/<customErrors>
> I think you set the value to "RemoteOnly"
> It looks like there is a similar tag for .NET 2.0 but the config file looks
> a little different. Hopefully, this can can point you in the right direction
> -Sean
>
> "Nick" wrote:
> > hi, all
> >
> > When i tried to access a report via URL and I got an error page like:
> >
> > Reporting Services Error
> > ----
> >
> > For more information about this error navigate to the report server on
> > the local server machine, or enable remote errors
> > ----
> > SQL Server Reporting Services
> > So, How to enable the remote errors and then I was able to see what is
> > wrong.
> >
> > Thanks.
> >
> >|||setting *what* value exactly? my ConfigurationInfo table has 9 rows in
it and none of these contain anything that looks like it may be the right
setting to change.
heres the contents of my ConfigurationInfo table.
EnableExecutionLogging True
EnableMyReports False
ExecutionLogDaysKept 60
MyReportsRole My Reports
SessionTimeout 600
SiteName SQL Server Reporting Services
SystemReportTimeout 1800
SystemSnapshotLimit -1
UseSessionCookies true
"SteveIrwin" wrote:
> Sean, I found on another posting that this setting is within the
> ConfigurationInfo table in the ReportServer database. Setting the value to
> True makes it work.
> Steve
> "Sean P." wrote:
> > I have done this with RS 2000.
> > It is in the machine.config file for .NET Framework v1.1 in the
> > <windows>\Microsoft.NET\Framework\<Version>\ folder.
> >
> > There is a XML Tag <System.Web>/<customErrors>
> > I think you set the value to "RemoteOnly"
> >
> > It looks like there is a similar tag for .NET 2.0 but the config file looks
> > a little different. Hopefully, this can can point you in the right direction
> >
> > -Sean
> >
> >
> > "Nick" wrote:
> >
> > > hi, all
> > >
> > > When i tried to access a report via URL and I got an error page like:
> > >
> > > Reporting Services Error
> > > ----
> > >
> > > For more information about this error navigate to the report server on
> > > the local server machine, or enable remote errors
> > > ----
> > > SQL Server Reporting Services
> > > So, How to enable the remote errors and then I was able to see what is
> > > wrong.
> > >
> > > Thanks.
> > >
> > >|||My ConfigurationInfo table has the following info
EnableExecutionLogging True
EnableIntegratedSecurity true
EnableMyReports False
ExecutionLogDaysKept 60
ExternalImagesTimeout 600
MyReportsRole My Reports
SessionTimeout 600
SiteName SQL Server Reporting Services
SnapshotCompression SQL
SystemReportTimeout 1800
SystemSnapshotLimit -1
UseSessionCookies true
Do we need to add a record for customErrors?

How to Enable Email Subscriptions

We recently installed email capability on the server where the Report Server
lives. What do we have to do to enable subscriptions to be emailed to people?
When I go to set up a subscription it doesn't list "Email" as a report
delivery mechanism. Do I have to change something in the RS config (if
so...where and what?) or do we just need to restart Reporting Services on
that server and it will know that email is enabled?
Thanks.You will need to go into the Reporting Services Configuration Manager and set
up your Email settings.
For more information you can go to this link:
http://msdn2.microsoft.com/en-us/library/ms345234.aspx
--
~lb
"Lucky Horseshoe" wrote:
> We recently installed email capability on the server where the Report Server
> lives. What do we have to do to enable subscriptions to be emailed to people?
> When I go to set up a subscription it doesn't list "Email" as a report
> delivery mechanism. Do I have to change something in the RS config (if
> so...where and what?) or do we just need to restart Reporting Services on
> that server and it will know that email is enabled?
> Thanks.

How to enable Email delivery for Subscriptions

Hello,
Grateful if someone tell me the steps that needs to be carried out for
enabling the Email delivery "Report Server Email" option when creating a new
report subscription.
Currently, I do not see this option except Printer delivery and File delivery.
Thanks,
KaushikYou need to configure your server for email. You have several options on how
to do this. The easiest (and requires no email client on the server) is to
send it on to another email server that actually sends the email.
BOL: E-mail Setting (Reporting Services Configuration
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/uirfsql9/html/cdad1529-bfa6-41fb-9863-d9ff1b802577.htm
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Kaushik" <Kaushik@.discussions.microsoft.com> wrote in message
news:5A97EFC4-2A84-413A-A40E-4E96D07207EC@.microsoft.com...
> Hello,
> Grateful if someone tell me the steps that needs to be carried out for
> enabling the Email delivery "Report Server Email" option when creating a
> new
> report subscription.
> Currently, I do not see this option except Printer delivery and File
> delivery.
> Thanks,
> Kaushik

Wednesday, March 21, 2012

How to embed Activex contol in SSRS

How to embed Activex contol in SSRS. I have created one custom library in VB.NET and tried to reference and previewed (Report -> Report Properties-> Reference), but I got following errors. Same library is working fine for other .NET applications. Is there any limitations to use .dll in SSRS, please let me know
1) "Error while loading code module:"
2) "Error in class instance declaration"
Any chance??

How to eliminate login screen when i try to access report via URL

I am trying to access a report via url

http://69.23.3.112/reportserver?/rptProject/rptStatus&eStatus=All&eUser=2

it always asks for username and password.

All my users login to my project which is asp.net 1.1(vs2003) based project, now from inside the project, if they try to access any report from (which is on framework 2.0), they have to go through a autentication screen which is related to sql server reporting services.

can you please help, how to override this login screen.

Thank you very much for the information.

If It is for login to the datasource then you ned to pass datasource credentials. (reportviewer.setdatasourcecredentials())And if it ask you to login to the report server than you need to set the report server to allow access of the report to your website.

and if you want you can set report server credentials.. and give that credentials access to the reports using report manager.

|||

Hi, Thanks.

I gave permissions to report manager folder for aspnet and also iusr_machine name both.

and also checked anonymous login for reports virtual directory under intepub.

still i get the login screen if somone trying to access reports via reporting services reports folder.

i am calling the reports via url from vs 2003 , and my reports are on vs 2005.

And microsoft did'nt release no report viewer with framework 1.1., that is causing the problem.

please help guys.,

Thank you all.

|||

I can give you one option.

You can crete one project with a page (may be 1 default.aspx) containing report viewer and if you want parameter promp controls of your own.

And redirect your users from original website to new website when ever they select menuitem( or whatever you have used) for report.

Now for login screen.

I need to know where it pop us..

when anyone trying to go to report folder or when any one trying to run report.

If it is asking when anyone trying to go to report folder.. I thing you need to pass login for the user in URL( Not sure how)

If it is asking when they run report just do one thing. go to each report.. than properties than datasource and save credentials for datasource.

How to eliminate login screen when i try to access report via URL

I am trying to access a report via url

http://69.23.3.112/reportserver?/rptProject/rptStatus&eStatus=All&eUser=2

it always asks for username and password.

All my users login to my project which is asp.net 1.1(vs2003) based project, now from inside the project, if they try to access any report from (which is on framework 2.0), they have to go through a autentication screen which is related to sql server reporting services.

can you please help, how to override this login screen.

Thank you very much for the information.

If It is for login to the datasource then you ned to pass datasource credentials. (reportviewer.setdatasourcecredentials())And if it ask you to login to the report server than you need to set the report server to allow access of the report to your website.

and if you want you can set report server credentials.. and give that credentials access to the reports using report manager.

|||

Hi, Thanks.

I gave permissions to report manager folder for aspnet and also iusr_machine name both.

and also checked anonymous login for reports virtual directory under intepub.

still i get the login screen if somone trying to access reports via reporting services reports folder.

i am calling the reports via url from vs 2003 , and my reports are on vs 2005.

And microsoft did'nt release no report viewer with framework 1.1., that is causing the problem.

please help guys.,

Thank you all.

|||

I can give you one option.

You can crete one project with a page (may be 1 default.aspx) containing report viewer and if you want parameter promp controls of your own.

And redirect your users from original website to new website when ever they select menuitem( or whatever you have used) for report.

Now for login screen.

I need to know where it pop us..

when anyone trying to go to report folder or when any one trying to run report.

If it is asking when anyone trying to go to report folder.. I thing you need to pass login for the user in URL( Not sure how)

If it is asking when they run report just do one thing. go to each report.. than properties than datasource and save credentials for datasource.

sql

Monday, March 19, 2012

How to edit textbox or a cell of table?

Hi everybody!
I've created a report in reporting services and in it i need to have a
dynamic textbox.
Let me describe more.I have two reports ,in first report i have
manegers' names .After that users see first report and manegers'
informations for example their names and saleries , they want to
select manegers on base for example their saleries ,i mean the user
must see informations then decide and select manegers who their
employees will be shown in second report ,in this case i need a
textbox that the user can write Yes or No in it,or checkbox for
multiple select .
After that users select their manegers they can see manegers'
employees in second report.
I need a textbox that has two values (Yes and No) and these values
must be shown in textbox in preview mode to select by users or user
can select Yes or No or checkbox.
Can anybody help me?
ShimaSwhy not just create one report that groups on the managers names and when
the name is clicked the details are shown. This functionality is built in
and easy to do.
another option is to add link on the managers name and when clicked open the
second report by passing the manager's name as a parameter. you won't be
able to do multiple choices though.
<shima.seifolahi@.gmail.com> wrote in message
news:1193114815.518228.133770@.t8g2000prg.googlegroups.com...
> Hi everybody!
> I've created a report in reporting services and in it i need to have a
> dynamic textbox.
> Let me describe more.I have two reports ,in first report i have
> manegers' names .After that users see first report and manegers'
> informations for example their names and saleries , they want to
> select manegers on base for example their saleries ,i mean the user
> must see informations then decide and select manegers who their
> employees will be shown in second report ,in this case i need a
> textbox that the user can write Yes or No in it,or checkbox for
> multiple select .
> After that users select their manegers they can see manegers'
> employees in second report.
> I need a textbox that has two values (Yes and No) and these values
> must be shown in textbox in preview mode to select by users or user
> can select Yes or No or checkbox.
> Can anybody help me?
> ShimaS
>|||I did it ,but i need to select more than one prson in first report,
for one person i don't have any problem
Thanks

How to edit someone else's report definition?

I need to be able to share report definitions with other people in my group, so we can all edit and makes changes to each report definition if the need arises. When I tried to use a shared folder the other person could not access my report def, so evidently there is security applied. What's the correct method to do this? Please point me at the documentation if it's listed somewhere - even an MSPress book would be fine. This is for both SQLRS2000 and 2005.

thanks

Peter

Assuming you are using Visual Studio....Did the other person add your .rdl file to their project?

|||We are using VS2003 - we are using a shared folder and I placed my rptproj file on the share - the objective is to have only one file that we can both edit, e.g. if one of us is away.|||

Try this. You will each have a project in VS. Have the other user add an 'Existing Item' to their project..this is your .rdl file on the share.

Then inside VS they should be able to open the .rdl file.

|||that's better, but the other person gets an error that the Data Sources are not defined, so it looks as though the RDL is not enough. Do I need to share the RDS file as well?|||Yes, share the datasource as well. you will also want to make sure that the project properties are the same so the coworker can deploy new versions of the report.|||

OK - further forward progress, however the data source apparently does not bring over the credentials so I assume we'll have to enter them again manually.

thanks!!

How To Dynamically Switch Between Databases In Report?

I have a situation where I have about 5 different customers. Eachcustomer's database is structurally the same, though the actual datawill vary. Each customer will run exactly the same reports as othercustomers. What I'm wondering is... is there a way to share reportsbetween these companies, but switch the data sources dynamically (fromthe web app)? From what I understand I can only have one data sourceconnection. By the way I'm using SQL Server 2000.
I'm pretty new to this RS stuff.
Thanks,
csdietrich
There may be a way to switch the datasource dynamicaly but I don't know how...
You can however have your report hit a stored proc which can in turn hit the correct database depending on the parameters passed to it.

How To Dynamically Switch Between Databases In Report

Let me preface this by stating that I am a Reporting Services newbie...
I need to design a report that displays financial data for 2 companies,
Company A and Company B. The problem is that each company has their own
distinct database. The schema is identical between them, just different data
in each.
The report is identical for each company, the only different is that the
report needs to pull from Database A to display the report data for Company
A, and alternatively pull from Database B to display the report data for
Company B. The user wants to be able to specify whether they want to run the
report for Company A, or Company B.
How can I design the report or setup the data source to switch databases
depending on if the user wants to see the report for Company A or Company B?
Can this be done with a report parameter? If so, how?
I really don't want to create and maintain 2 identical reports, the only
difference being the data source.
One possible option I guess would be to create a view that combines data
from identical tables in both databases, and use that view as the datasource
in the report.
Just looking for what others have done in similar circumstances so I don't
spend multiple days architecting the wrong approach.
Thanks!Here is one way. It is an interesting technique in that it uses the ability
to run a batch of SQL statement. Use the generic query designer. Then paste
in the following (as an example).
declare @.SQL varchar(255)
select @.SQL = 'select name from ' + @.Database + '.dbo.sysobjects where xtype
= ''U'' order by name'
exec (@.SQL)
You can also use an expression but one thing that is nice about the above
method is it will still fill in the field names (sometimes you have to click
on the refresh fields button but it all works). In your case you would have
the @.Database parameter be based on a list they choose from CompanyA,
CompanyB where the value for the selection would be the database name.
To do what you want will require a little more messing around. You could
first develop against one database to make sure you have the query correct
and then change it to be dynamic.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Smit-Dog" <SmitDog@.discussions.microsoft.com> wrote in message
news:43D571CF-ACF4-4BCE-B482-9F49E5817E8C@.microsoft.com...
> Let me preface this by stating that I am a Reporting Services newbie...
> I need to design a report that displays financial data for 2 companies,
> Company A and Company B. The problem is that each company has their own
> distinct database. The schema is identical between them, just different
data
> in each.
> The report is identical for each company, the only different is that the
> report needs to pull from Database A to display the report data for
Company
> A, and alternatively pull from Database B to display the report data for
> Company B. The user wants to be able to specify whether they want to run
the
> report for Company A, or Company B.
> How can I design the report or setup the data source to switch databases
> depending on if the user wants to see the report for Company A or Company
B?
> Can this be done with a report parameter? If so, how?
> I really don't want to create and maintain 2 identical reports, the only
> difference being the data source.
> One possible option I guess would be to create a view that combines data
> from identical tables in both databases, and use that view as the
datasource
> in the report.
> Just looking for what others have done in similar circumstances so I don't
> spend multiple days architecting the wrong approach.
> Thanks!|||Thanks Bruce... Looks like 1 of many possible approaches to this problem.
I just found out that it is likely that the customer will be adding more
companies, hence addtional databases that the report needs to be run against.
I guess I need to go figure out how to setup and pass parameters to the
report to allow the end-user to specify the "root" database name of the
company at runtime.
"Bruce L-C [MVP]" wrote:
> Here is one way. It is an interesting technique in that it uses the ability
> to run a batch of SQL statement. Use the generic query designer. Then paste
> in the following (as an example).
> declare @.SQL varchar(255)
> select @.SQL = 'select name from ' + @.Database + '.dbo.sysobjects where xtype
> = ''U'' order by name'
> exec (@.SQL)
> You can also use an expression but one thing that is nice about the above
> method is it will still fill in the field names (sometimes you have to click
> on the refresh fields button but it all works). In your case you would have
> the @.Database parameter be based on a list they choose from CompanyA,
> CompanyB where the value for the selection would be the database name.
> To do what you want will require a little more messing around. You could
> first develop against one database to make sure you have the query correct
> and then change it to be dynamic.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
>
> "Smit-Dog" <SmitDog@.discussions.microsoft.com> wrote in message
> news:43D571CF-ACF4-4BCE-B482-9F49E5817E8C@.microsoft.com...
> > Let me preface this by stating that I am a Reporting Services newbie...
> >
> > I need to design a report that displays financial data for 2 companies,
> > Company A and Company B. The problem is that each company has their own
> > distinct database. The schema is identical between them, just different
> data
> > in each.
> >
> > The report is identical for each company, the only different is that the
> > report needs to pull from Database A to display the report data for
> Company
> > A, and alternatively pull from Database B to display the report data for
> > Company B. The user wants to be able to specify whether they want to run
> the
> > report for Company A, or Company B.
> >
> > How can I design the report or setup the data source to switch databases
> > depending on if the user wants to see the report for Company A or Company
> B?
> > Can this be done with a report parameter? If so, how?
> >
> > I really don't want to create and maintain 2 identical reports, the only
> > difference being the data source.
> >
> > One possible option I guess would be to create a view that combines data
> > from identical tables in both databases, and use that view as the
> datasource
> > in the report.
> >
> > Just looking for what others have done in similar circumstances so I don't
> > spend multiple days architecting the wrong approach.
> >
> > Thanks!
>
>|||Hi,
What i'm currently doing is creating a reporting database that will include
all my reports stored procedure and have those stored procedure accessing my
OLTP data through a linked server. This way, if i need to install my
reporting solution at a new customer site, I only need to modify my linked
server parameters.
Hope this helps,
Eric
"Smit-Dog" wrote:
> Thanks Bruce... Looks like 1 of many possible approaches to this problem.
> I just found out that it is likely that the customer will be adding more
> companies, hence addtional databases that the report needs to be run against.
> I guess I need to go figure out how to setup and pass parameters to the
> report to allow the end-user to specify the "root" database name of the
> company at runtime.
> "Bruce L-C [MVP]" wrote:
> > Here is one way. It is an interesting technique in that it uses the ability
> > to run a batch of SQL statement. Use the generic query designer. Then paste
> > in the following (as an example).
> > declare @.SQL varchar(255)
> > select @.SQL = 'select name from ' + @.Database + '.dbo.sysobjects where xtype
> > = ''U'' order by name'
> > exec (@.SQL)
> >
> > You can also use an expression but one thing that is nice about the above
> > method is it will still fill in the field names (sometimes you have to click
> > on the refresh fields button but it all works). In your case you would have
> > the @.Database parameter be based on a list they choose from CompanyA,
> > CompanyB where the value for the selection would be the database name.
> >
> > To do what you want will require a little more messing around. You could
> > first develop against one database to make sure you have the query correct
> > and then change it to be dynamic.
> >
> >
> > --
> > Bruce Loehle-Conger
> > MVP SQL Server Reporting Services
> >
> >
> > "Smit-Dog" <SmitDog@.discussions.microsoft.com> wrote in message
> > news:43D571CF-ACF4-4BCE-B482-9F49E5817E8C@.microsoft.com...
> > > Let me preface this by stating that I am a Reporting Services newbie...
> > >
> > > I need to design a report that displays financial data for 2 companies,
> > > Company A and Company B. The problem is that each company has their own
> > > distinct database. The schema is identical between them, just different
> > data
> > > in each.
> > >
> > > The report is identical for each company, the only different is that the
> > > report needs to pull from Database A to display the report data for
> > Company
> > > A, and alternatively pull from Database B to display the report data for
> > > Company B. The user wants to be able to specify whether they want to run
> > the
> > > report for Company A, or Company B.
> > >
> > > How can I design the report or setup the data source to switch databases
> > > depending on if the user wants to see the report for Company A or Company
> > B?
> > > Can this be done with a report parameter? If so, how?
> > >
> > > I really don't want to create and maintain 2 identical reports, the only
> > > difference being the data source.
> > >
> > > One possible option I guess would be to create a view that combines data
> > > from identical tables in both databases, and use that view as the
> > datasource
> > > in the report.
> > >
> > > Just looking for what others have done in similar circumstances so I don't
> > > spend multiple days architecting the wrong approach.
> > >
> > > Thanks!
> >
> >
> >|||In this case he has two databases that the customer wants to pick which one
to report off of.
Also, I would be very very careful with linked servers, especially if you
are using the four part naming. You could easily get burned. It takes very
little for SQL Server to decide to bring the whole table over and process it
locally. It is not doing a passthrough query. It seems like it would just
send the SQL to the remote server for processing but that is not what
happens with 4 part naming. This is what happens with OpenQuery but if you
are using 4 part naming then you could easily find yourself with a major
performance headache when you roll out to production.
Just a heads up on the dangers of linked servers.
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Aiwa" <Aiwa@.discussions.microsoft.com> wrote in message
news:2C43C2F9-BC10-4951-87FD-428CDF9D1D69@.microsoft.com...
> Hi,
> What i'm currently doing is creating a reporting database that will
include
> all my reports stored procedure and have those stored procedure accessing
my
> OLTP data through a linked server. This way, if i need to install my
> reporting solution at a new customer site, I only need to modify my linked
> server parameters.
> Hope this helps,
> Eric
> "Smit-Dog" wrote:
> > Thanks Bruce... Looks like 1 of many possible approaches to this
problem.
> >
> > I just found out that it is likely that the customer will be adding more
> > companies, hence addtional databases that the report needs to be run
against.
> >
> > I guess I need to go figure out how to setup and pass parameters to the
> > report to allow the end-user to specify the "root" database name of the
> > company at runtime.
> >
> > "Bruce L-C [MVP]" wrote:
> >
> > > Here is one way. It is an interesting technique in that it uses the
ability
> > > to run a batch of SQL statement. Use the generic query designer. Then
paste
> > > in the following (as an example).
> > > declare @.SQL varchar(255)
> > > select @.SQL = 'select name from ' + @.Database + '.dbo.sysobjects where
xtype
> > > = ''U'' order by name'
> > > exec (@.SQL)
> > >
> > > You can also use an expression but one thing that is nice about the
above
> > > method is it will still fill in the field names (sometimes you have to
click
> > > on the refresh fields button but it all works). In your case you would
have
> > > the @.Database parameter be based on a list they choose from CompanyA,
> > > CompanyB where the value for the selection would be the database name.
> > >
> > > To do what you want will require a little more messing around. You
could
> > > first develop against one database to make sure you have the query
correct
> > > and then change it to be dynamic.
> > >
> > >
> > > --
> > > Bruce Loehle-Conger
> > > MVP SQL Server Reporting Services
> > >
> > >
> > > "Smit-Dog" <SmitDog@.discussions.microsoft.com> wrote in message
> > > news:43D571CF-ACF4-4BCE-B482-9F49E5817E8C@.microsoft.com...
> > > > Let me preface this by stating that I am a Reporting Services
newbie...
> > > >
> > > > I need to design a report that displays financial data for 2
companies,
> > > > Company A and Company B. The problem is that each company has their
own
> > > > distinct database. The schema is identical between them, just
different
> > > data
> > > > in each.
> > > >
> > > > The report is identical for each company, the only different is that
the
> > > > report needs to pull from Database A to display the report data for
> > > Company
> > > > A, and alternatively pull from Database B to display the report data
for
> > > > Company B. The user wants to be able to specify whether they want to
run
> > > the
> > > > report for Company A, or Company B.
> > > >
> > > > How can I design the report or setup the data source to switch
databases
> > > > depending on if the user wants to see the report for Company A or
Company
> > > B?
> > > > Can this be done with a report parameter? If so, how?
> > > >
> > > > I really don't want to create and maintain 2 identical reports, the
only
> > > > difference being the data source.
> > > >
> > > > One possible option I guess would be to create a view that combines
data
> > > > from identical tables in both databases, and use that view as the
> > > datasource
> > > > in the report.
> > > >
> > > > Just looking for what others have done in similar circumstances so I
don't
> > > > spend multiple days architecting the wrong approach.
> > > >
> > > > Thanks!
> > >
> > >
> > >|||Hi Bruce,
Thanks for the heads up.
I'm actually using OpenQuery since it looks like the only way to abstract
the database name when using a linked server.
Is there a better way to do this ?
Thanks,
Eric
"Bruce L-C [MVP]" wrote:
> In this case he has two databases that the customer wants to pick which one
> to report off of.
> Also, I would be very very careful with linked servers, especially if you
> are using the four part naming. You could easily get burned. It takes very
> little for SQL Server to decide to bring the whole table over and process it
> locally. It is not doing a passthrough query. It seems like it would just
> send the SQL to the remote server for processing but that is not what
> happens with 4 part naming. This is what happens with OpenQuery but if you
> are using 4 part naming then you could easily find yourself with a major
> performance headache when you roll out to production.
> Just a heads up on the dangers of linked servers.
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
>
> "Aiwa" <Aiwa@.discussions.microsoft.com> wrote in message
> news:2C43C2F9-BC10-4951-87FD-428CDF9D1D69@.microsoft.com...
> > Hi,
> >
> > What i'm currently doing is creating a reporting database that will
> include
> > all my reports stored procedure and have those stored procedure accessing
> my
> > OLTP data through a linked server. This way, if i need to install my
> > reporting solution at a new customer site, I only need to modify my linked
> > server parameters.
> >
> > Hope this helps,
> > Eric
> >
> > "Smit-Dog" wrote:
> >
> > > Thanks Bruce... Looks like 1 of many possible approaches to this
> problem.
> > >
> > > I just found out that it is likely that the customer will be adding more
> > > companies, hence addtional databases that the report needs to be run
> against.
> > >
> > > I guess I need to go figure out how to setup and pass parameters to the
> > > report to allow the end-user to specify the "root" database name of the
> > > company at runtime.
> > >
> > > "Bruce L-C [MVP]" wrote:
> > >
> > > > Here is one way. It is an interesting technique in that it uses the
> ability
> > > > to run a batch of SQL statement. Use the generic query designer. Then
> paste
> > > > in the following (as an example).
> > > > declare @.SQL varchar(255)
> > > > select @.SQL = 'select name from ' + @.Database + '.dbo.sysobjects where
> xtype
> > > > = ''U'' order by name'
> > > > exec (@.SQL)
> > > >
> > > > You can also use an expression but one thing that is nice about the
> above
> > > > method is it will still fill in the field names (sometimes you have to
> click
> > > > on the refresh fields button but it all works). In your case you would
> have
> > > > the @.Database parameter be based on a list they choose from CompanyA,
> > > > CompanyB where the value for the selection would be the database name.
> > > >
> > > > To do what you want will require a little more messing around. You
> could
> > > > first develop against one database to make sure you have the query
> correct
> > > > and then change it to be dynamic.
> > > >
> > > >
> > > > --
> > > > Bruce Loehle-Conger
> > > > MVP SQL Server Reporting Services
> > > >
> > > >
> > > > "Smit-Dog" <SmitDog@.discussions.microsoft.com> wrote in message
> > > > news:43D571CF-ACF4-4BCE-B482-9F49E5817E8C@.microsoft.com...
> > > > > Let me preface this by stating that I am a Reporting Services
> newbie...
> > > > >
> > > > > I need to design a report that displays financial data for 2
> companies,
> > > > > Company A and Company B. The problem is that each company has their
> own
> > > > > distinct database. The schema is identical between them, just
> different
> > > > data
> > > > > in each.
> > > > >
> > > > > The report is identical for each company, the only different is that
> the
> > > > > report needs to pull from Database A to display the report data for
> > > > Company
> > > > > A, and alternatively pull from Database B to display the report data
> for
> > > > > Company B. The user wants to be able to specify whether they want to
> run
> > > > the
> > > > > report for Company A, or Company B.
> > > > >
> > > > > How can I design the report or setup the data source to switch
> databases
> > > > > depending on if the user wants to see the report for Company A or
> Company
> > > > B?
> > > > > Can this be done with a report parameter? If so, how?
> > > > >
> > > > > I really don't want to create and maintain 2 identical reports, the
> only
> > > > > difference being the data source.
> > > > >
> > > > > One possible option I guess would be to create a view that combines
> data
> > > > > from identical tables in both databases, and use that view as the
> > > > datasource
> > > > > in the report.
> > > > >
> > > > > Just looking for what others have done in similar circumstances so I
> don't
> > > > > spend multiple days architecting the wrong approach.
> > > > >
> > > > > Thanks!
> > > >
> > > >
> > > >
>
>|||declare @.SQL varchar(255)
select @.SQL = 'select max(somefield) from ' + @.Server +
'.database.dbo.tablename'
exec (@.SQL)
Four part naming works but it is dangerous. You are better off to use
OpenQuery as you are. Yukon handles 4 part naming better than it does now.
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Aiwa" <Aiwa@.discussions.microsoft.com> wrote in message
news:D906328F-8E54-425D-8E29-7C3636EEFDFD@.microsoft.com...
> Hi Bruce,
> Thanks for the heads up.
> I'm actually using OpenQuery since it looks like the only way to abstract
> the database name when using a linked server.
> Is there a better way to do this ?
> Thanks,
> Eric
> "Bruce L-C [MVP]" wrote:
> > In this case he has two databases that the customer wants to pick which
one
> > to report off of.
> >
> > Also, I would be very very careful with linked servers, especially if
you
> > are using the four part naming. You could easily get burned. It takes
very
> > little for SQL Server to decide to bring the whole table over and
process it
> > locally. It is not doing a passthrough query. It seems like it would
just
> > send the SQL to the remote server for processing but that is not what
> > happens with 4 part naming. This is what happens with OpenQuery but if
you
> > are using 4 part naming then you could easily find yourself with a major
> > performance headache when you roll out to production.
> >
> > Just a heads up on the dangers of linked servers.
> >
> > --
> > Bruce Loehle-Conger
> > MVP SQL Server Reporting Services
> >
> >
> > "Aiwa" <Aiwa@.discussions.microsoft.com> wrote in message
> > news:2C43C2F9-BC10-4951-87FD-428CDF9D1D69@.microsoft.com...
> > > Hi,
> > >
> > > What i'm currently doing is creating a reporting database that will
> > include
> > > all my reports stored procedure and have those stored procedure
accessing
> > my
> > > OLTP data through a linked server. This way, if i need to install my
> > > reporting solution at a new customer site, I only need to modify my
linked
> > > server parameters.
> > >
> > > Hope this helps,
> > > Eric
> > >
> > > "Smit-Dog" wrote:
> > >
> > > > Thanks Bruce... Looks like 1 of many possible approaches to this
> > problem.
> > > >
> > > > I just found out that it is likely that the customer will be adding
more
> > > > companies, hence addtional databases that the report needs to be run
> > against.
> > > >
> > > > I guess I need to go figure out how to setup and pass parameters to
the
> > > > report to allow the end-user to specify the "root" database name of
the
> > > > company at runtime.
> > > >
> > > > "Bruce L-C [MVP]" wrote:
> > > >
> > > > > Here is one way. It is an interesting technique in that it uses
the
> > ability
> > > > > to run a batch of SQL statement. Use the generic query designer.
Then
> > paste
> > > > > in the following (as an example).
> > > > > declare @.SQL varchar(255)
> > > > > select @.SQL = 'select name from ' + @.Database + '.dbo.sysobjects
where
> > xtype
> > > > > = ''U'' order by name'
> > > > > exec (@.SQL)
> > > > >
> > > > > You can also use an expression but one thing that is nice about
the
> > above
> > > > > method is it will still fill in the field names (sometimes you
have to
> > click
> > > > > on the refresh fields button but it all works). In your case you
would
> > have
> > > > > the @.Database parameter be based on a list they choose from
CompanyA,
> > > > > CompanyB where the value for the selection would be the database
name.
> > > > >
> > > > > To do what you want will require a little more messing around. You
> > could
> > > > > first develop against one database to make sure you have the query
> > correct
> > > > > and then change it to be dynamic.
> > > > >
> > > > >
> > > > > --
> > > > > Bruce Loehle-Conger
> > > > > MVP SQL Server Reporting Services
> > > > >
> > > > >
> > > > > "Smit-Dog" <SmitDog@.discussions.microsoft.com> wrote in message
> > > > > news:43D571CF-ACF4-4BCE-B482-9F49E5817E8C@.microsoft.com...
> > > > > > Let me preface this by stating that I am a Reporting Services
> > newbie...
> > > > > >
> > > > > > I need to design a report that displays financial data for 2
> > companies,
> > > > > > Company A and Company B. The problem is that each company has
their
> > own
> > > > > > distinct database. The schema is identical between them, just
> > different
> > > > > data
> > > > > > in each.
> > > > > >
> > > > > > The report is identical for each company, the only different is
that
> > the
> > > > > > report needs to pull from Database A to display the report data
for
> > > > > Company
> > > > > > A, and alternatively pull from Database B to display the report
data
> > for
> > > > > > Company B. The user wants to be able to specify whether they
want to
> > run
> > > > > the
> > > > > > report for Company A, or Company B.
> > > > > >
> > > > > > How can I design the report or setup the data source to switch
> > databases
> > > > > > depending on if the user wants to see the report for Company A
or
> > Company
> > > > > B?
> > > > > > Can this be done with a report parameter? If so, how?
> > > > > >
> > > > > > I really don't want to create and maintain 2 identical reports,
the
> > only
> > > > > > difference being the data source.
> > > > > >
> > > > > > One possible option I guess would be to create a view that
combines
> > data
> > > > > > from identical tables in both databases, and use that view as
the
> > > > > datasource
> > > > > > in the report.
> > > > > >
> > > > > > Just looking for what others have done in similar circumstances
so I
> > don't
> > > > > > spend multiple days architecting the wrong approach.
> > > > > >
> > > > > > Thanks!
> > > > >
> > > > >
> > > > >
> >
> >
> >

How to Dynamically set the width of report body.

I have a report where we display a certain number of columns based on
some condition. If I display all the columns then the report looks okay
but if I display fewer columns then there is empty space on each row
which would have otherwise been occupied by the hidden columns of the
table. Is there any way to dynamically set the width of the table and
the report body.
Thanks and I appreciate you taking the time.
S Girase
sgirase@.gmail.comyou could try building the report with a matrix.. it'll adjust the
number of columns based on the results.

how to dynamically create report in web app?

Hello,
I am rather new to report service. What I want to achieve is prvide a web
page and let users to choose what fields they want to see, what table they
want to query and what formats they want to apply.
Is it something achievable? Would someone give me some tutorial or hints?
Many Thanks
--
hello, please helpAlthough possible it is not trivial. You need to know the RDL specification
(go to MSDN.microsoft.com and search on RDL specification, there are several
articles). Then there is the issue that this is a server based product, you
cannot change the RDL on the fly. You have to publish the RDL. With RS 2005
you can use the new controls and give the control the RDL and the dataset
(in local mode you do not even need the server). These controls come with VS
2005 (Not with SQL Server). So, check out the spec and see if this is really
something you want to tackle. Depending on the complexity you might be
better off to use XML and XSL instead.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"jerry.xuddd" <jerryxuddd@.discussions.microsoft.com> wrote in message
news:78300BE1-38D8-4491-997D-2C4C0EC98AFE@.microsoft.com...
> Hello,
> I am rather new to report service. What I want to achieve is prvide a web
> page and let users to choose what fields they want to see, what table they
> want to query and what formats they want to apply.
> Is it something achievable? Would someone give me some tutorial or hints?
> Many Thanks
> --
> hello, please help

Friday, March 9, 2012

How to drop data value filed in Report Builder "Chart"

Report Builder (SQL 2005 September CTP) does not allow me to drop a field into the "Drag and Drop Data Value" box.

Are there any restrictions on the data type for the value series?

BTW, I love the tool!

Data values (Y-values) in charts should be numeric fields.

-- Robert

How to drill down on fields

Hi All ,

I am new to Sql Server and Reporting services ..

I was trying to make a drill down report

I have created Grooup on detail row and set the Visibility with one of the group rows just above ..

But when preview the report I cannot see any data ..

How ever If I Delete the Groups I can see the data ..

Is there anything that I am missing Please help

Did you specify the toggle item ? Otherwise you won′t be able to toggel the hidden rows.

Jens K. Suessmeyer.

http://www.sqlserver2005.de
|||

Hi Jens ,

Thanks for did that and am able to see the data ..