Showing posts with label guys. Show all posts
Showing posts with label guys. Show all posts

Tuesday, March 27, 2012

A data source instance has not been supplied for the data source

Hi Guys,

I have create a report and it works in development mode. But when I call this report from aspx page it give me above error message. Please let me know how can I setup datasource of this report at runtime. Below is my code

Regards

ReportParameter[] rptPara = new ReportParameter[1];

rptPara[0] = new ReportParameter("rDate", WebDateChooser1.Text, false);

ReportViewer1.LocalReport.ReportPath = @."C:Business\RPT585.rdl";

ReportViewer1.LocalReport.SetParameters(rptPara);

ReportViewer1.LocalReport.Refresh();

Please anybody could let me guide here....

|||

This is how you can provide DataSource information to report at runtime.

Example:

ObjectDataSource objAdventureWorks = new ObjectDataSource("MyData", "GetDataAddress");

objAdventureWorks.ID = "Adventureworks";

this.Controls.Add(objAdventureWorks);

this.ReportViewer.LocalReport.DataSources.Add(new ReportDataSource("AdventureWorks2000", "Adventureworks"));

|||

I have added the datasource of my report but still keep getting this error message. Please let me guide how to fix this error. adn how to set data source instance. Below is my code

ReportParameter[] rptPara = new ReportParameter[1];

rptPara[0] = new ReportParameter("rDate", WebDateChooser1.Text, false);

ReportViewer1.LocalReport.ReportPath = @."C:\business\RPT528.rdl";

ReportViewer1.LocalReport.SetParameters(rptPara);

ReportViewer1.LocalReport.DataSources.Add(new ReportDataSource("dsCustomers"));

ReportViewer1.LocalReport.Refresh();

|||

http://blogs.msdn.com/bimusings/archive/2005/07/01/434659.aspx

I think this article should answer your question. I was experiencing the same error and Russell's work-around fixed it.

TF

Sunday, March 25, 2012

A connection could not be made to the report server http://localhost/ReportServer.

Hello Guys,

Please take me out from this hell. I created report using VS2005 Business Intelligence Project. It builds fine. I can also see data in the design time. But when I am trying to deploy it gives me this error.

TITLE: Microsoft Report Designer

A connection could not be made to the report server http://localhost/ReportServer.


ADDITIONAL INFORMATION:

Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'.
The request failed with the error message:
--
<html>
<head>
<title>Configuration Error</title>
<style>
body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
pre {font-family:"Lucida Console";font-size: .9em}
.marker {font-weight: bold; color: black;text-decoration: none;}
.version {color: gray;}
.error {margin-bottom: 10px;}
.expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
</style>
</head>

<body bgcolor="white">

<span><H1>Server Error in '/ReportServer' Application.<hr width=100% size=1 color=silver></H1>

<h2> <i>Configuration Error</i> </h2></span>

<font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">

<b> Description: </b>An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
<br><br>

<b> Parser Error Message: </b>An error occurred loading a configuration file: Failed to start monitoring changes to 'c:\inetpub\wwwroot' because access is denied.<br><br>

<b>Source Error:</b> <br><br>

<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code><pre>

[No relevant source lines]</pre></code>

</td>
</tr>
</table>

<br>

<b> Source File: </b> c:\inetpub\wwwroot\web.config<b> Line: </b> 0
<br><br>

<hr width=100% size=1 color=silver>

<b>Version Information:</b> Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210

</font>

</body>
</html>
<!--
[HttpException]: Failed to start monitoring changes to 'c:\inetpub\wwwroot' because access is denied.
at System.Web.FileChangesMonitor.FindDirectoryMonitor(String dir, Boolean addIfNotFound, Boolean throwOnError)
at System.Web.FileChangesMonitor.StartMonitoringFile(String alias, FileChangeEventHandler callback)
at System.Web.Configuration.WebConfigurationHost.StartMonitoringStreamForChanges(String streamName, StreamChangeCallback callback)
at System.Configuration.BaseConfigurationRecord.MonitorStream(String configKey, String configSource, String streamname)
at System.Configuration.BaseConfigurationRecord.InitConfigFromFile()
[ConfigurationErrorsException]: An error occurred loading a configuration file: Failed to start monitoring changes to 'c:\inetpub\wwwroot' because access is denied. (c:\inetpub\wwwroot\web.config)
at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)
at System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSection(String configKey, Boolean getLkg, Boolean checkPermission)
at System.Configuration.BaseConfigurationRecord.GetSection(String configKey)
at System.Web.Configuration.RuntimeConfig.GetSectionObject(String sectionName)
at System.Web.Configuration.RuntimeConfig.GetSection(String sectionName, Type type, ResultsIndex index)
at System.Web.Configuration.RuntimeConfig.get_HealthMonitoring()
at System.Web.Configuration.HealthMonitoringSectionHelper..ctor()
at System.Web.Management.HealthMonitoringManager..ctor()
at System.Web.Management.HealthMonitoringManager.Manager()
at System.Web.Management.WebBaseEvent.RaiseRuntimeError(Exception e, Object source)
at System.Web.HttpResponse.ReportRuntimeError(Exception e, Boolean canThrow, Boolean localExecute)
at System.Web.HttpRuntime.FinishRequest(HttpWorkerRequest wr, HttpContext context, Exception e)
-->
--. (Microsoft.ReportingServices.Designer)


BUTTONS:

OK


Hello Rahul,

Since you're getting access denied errors on 'c:\inetpub\wwwroot', can you make sure you have access to that directory? Also, check the security settings within IIS.

Jarret

|||

What happens when you try to navigate to http://localhost/ReportServer ?

|||

Try using www.sysinternals.com filemon to determine what the cause of the access denied error is.

Here is a similar message with resolution:

http://weblog.gpconsulting.com/archive/2005/08/26/181.aspx

cheers,

Andrew

|||

Hello Guys,

Thanks fro your reply.

Jarret: Security Settings witht the IIS is fine.

GregSQL : Here is the error when I run on IE

Server Error in '/ReportServer' Application.


Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: An error occurred loading a configuration file: Failed to start monitoring changes to 'c:\inetpub\wwwroot' because access is denied.

Source Error:

[No relevant source lines]


Source File: c:\inetpub\wwwroot\web.config Line: 0


Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210


Andrew - T4G : I already gone throgh that link, but does not worth.

|||

Did you try filemon?

Here are some detailed steps to troubleshoot.

http://tinyurl.com/3647cg

|||Your report server is not configured properly. Most likely has something to do with IIS and/or the web publishing directory c:\Inetpub\wwwroot.|||

Below is the output of Filemon When I try to run http://localhost/Reports/ in IE,

47 11:04:36 AM aspnet_wp.exe:632 QUERY INFORMATION C:\inetpub\wwwroot\web.config NOT FOUND Attributes: Error
48 11:04:36 AM aspnet_wp.exe:632 QUERY INFORMATION C:\inetpub\wwwroot\web.config NOT FOUND Attributes: Error
49 11:04:36 AM aspnet_wp.exe:632 QUERY INFORMATION C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportManager\PrecompiledApp.config NOT FOUND Attributes: Error

This is just for the information, no web.comfig is present in wwwroot and no PrecompiledApp.config is present in C:\...\ReportManager directory. The ReportManager and ReportServer directories is the virtual directory on the IIS, which is automatically made, if you choose, default configuration while installing SQL Server 2005.

The only config files present in the C:\...\ReportManager directory are:

RSWebApplication.config, Web.config, rsmgrpolicy.config

and in C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer are:

rsreportserver.config, rssrvpolicy.config, Web.config

What I can trouble shoot with the above information?

Thursday, March 22, 2012

A Common Query Question!

Hi Guys,

I have a query that gives me multiple rows for every customer, where as my requirement is to have one row for each customer. Below are the details:

Customers Table

Cust_ID int (PK)

Cust_Name varchar(255)

Subscription_Status int

Cust_Subscription_Audit Table

ID Identity(PK)

Cust_ID int

Old_Subscription_Status int

New_Subscription_Status int

Audit_Date DateTime

Logins Table (one customer may have multiple logins )

ID Identity (PK)

Cust_ID int

login name varchar(256)

email_ID varchar(256)

F_Name varchar(50)

L_name varchar(50)

role int

Last_Modified DateTime

INDEXES

Logins Table

PK__Clustered Ascending

No Index on Audit Table

Customers Table

PK__Clustered_ Ascending

Below is the query that is being used to extract the data

Code Snippet

SELECT C.Cust_Name, C.Cust_ID, L.F_Name +' '+ L.L_Name AS [CustName], L.Email_ID,MAX(CSA.Audit_Date)

FROM Customers C

INNERJOIN Cust_Subscription_Audit CSA ON C.Cust_ID= CSA.Cust_ID

INNERJOIN Logins L ON L.Cust_ID= C.Cust_ID

WHERE C.Subscription_Status >=1 AND L.Role= 1

GROUPBY C.Cust_Name, C.Cust_ID, L.F_Name +' '+ L.L_Name, L.Email_ID

This gives me multiple rows for a customer. What I am looking for is

1) One row for each customer.(Query 1)

2) If possible can pick the row of my choice Like log in that was added first or last based on login or Modified date in login table.(Query 2)

3) If possible can pick the row by row number i.e. if there are multiple logins for a customer then the 2nd login. (Query 3)

Your help will be appreciated.

Thanks

-Leo

Can you post some DDL, including constraints and indexes, sample data and expected result, please?

AMB

|||

Hi ,

Thanks for your prompt reply. Here is the Sample Data

Customers Table

Cust_ID Cust_Name SubsStatus

1 abc corp. 7

2 Adventure Works Inc 1

3 MicroCorn Inc 2

4 Fabrikam 7

5 Goleeeee Inc 5

Logins Table

ID Cust ID Login Email f_Name l_Name Role Date_Modified

1 1 rob1 rob1@.hotmail.com Rob Haany 1 2006-02-28 13:24
2 2 scot1 scot1@.yahoo.com Scot claudia 1 2006-05-24 12:30
3 3 scot2 scot2@.hotmail.com Scot Roy 1 2006-05-24 12:30
4 4 rob NULL RON HARTON 1 2006-08-22 15:26
5 4 qsir qsir@.hotmail.com Q Sir 1 2006-09-17 12:23
6 5 nzaar nzaar@.hotmail.com nad zaar 3 2006-09-17 12:23
7 5 jluk jluk@.hotmail.com Ron Richard 1 2006-09-17 12:23
8 2 drase draze@.hotmail.com Dino Mosoli 1 2006-08-22 15:26
9 2 dlins David Lin 3 2006-12-28 13:24
10 4 dmay NULL David May 1 2006-05-24 12:30

Role 1 = admin

Role 3 = Primary Contact

ID Cust_ID Old_Subscription_Status New_Subscription_Status Audit_Date

1 1 3 7 2006-09-24 12:30

2 2 0 1 2006-03-24 02:30

3 3 1 2 2006-08-24 10:30

4 4 1 7 2006-11-24 12:30

5 5 3 5 2006-09-24 12:30

6 4 3 1 2006-10-24 12:30

7 3 0 1 2006-06-24 12:30

8 1 0 1 2006-02-24 12:30

9 1 1 3 2006-07-24 12:30

10 5 1 3 2006-07-24 12:30

The required result is

Cust_ID Cust_Name F_name L_Name Email Audit Date

1 abc Corp Rob Haany rob1@.hotmail.com 2006-09-24 12:30

2 Adventure Works Inc Scot claudia scot1@.yahoo.com 2006-03-24 02:18

3 MicroCorn Inc Scot Roy scot2@.hotmail.com 2006-08-24 10:28

4 Fabrikam Q Sir qsir@.hotmail.com 2006-11-24 12:30

5 Goleeee Inc Ron Richard jluk@.hotmail.com 2006-09-24 12:30

Right now what is happening is threre are more than one records for Cust_ID = 2. The basic question is (Query 1) is how can we restrict the result set to only one row per Cust_ID. So my other questions (Query 2, Query3) were how can we choose one of these records based on some criteria e.g. since more than one records are there for Cust_ID = 2, and I wana choose the one that is with earliest Date_Modified or 2nd earliest Modified date.

Thanks,

-Leo.

|||

hi Leo,

If you are using SQL server 2005 Try this:

Code Snippet

SELECT C.Cust_Name, C.Cust_ID, L.F_Name +' '+ L.L_Name AS [CustName], L.Email_ID, MAX(CSA.Audit_Date)

FROM Customers C

INNER JOIN Cust_Subscription_Audit CSA ON C.Cust_ID = CSA.Cust_ID

CROSS APPLY (select top 1 * from Logins where Cust_ID=CSA.Cust_ID ) L

WHERE C.Subscription_Status >=1 AND L.Role= 1

GROUP BY C.Cust_Name, C.Cust_ID, L.F_Name +' '+ L.L_Name, L.Email_ID

|||

Thank you very much for this nice hint. I tweeked the query little bit and it woked for me here is the modified query.

Code Snippet

SELECT C.Cust_Name, C.Cust_ID, L.F_Name +' '+ L.L_Name AS [CustName], L.Email_ID, MAX(CSA.Audit_Date)

FROM Customers C

INNER JOIN Cust_Subscription_Audit CSA ON C.Cust_ID = CSA.Cust_ID

OUTER APPLY (select top 1 * from Logins where Cust_ID=CSA.Cust_ID And [Role] = 1 ) L

WHERE C.Subscription_Status >=1

GROUP BY C.Cust_Name, C.Cust_ID, L.F_Name +' '+ L.L_Name, L.Email_ID

|||do you need OUTER APPLU here? OUTER APPLY returns both rows that produce a result set, and rows that do not, with NULL values in the columns produced by the table-valued function (pretty much like OUTER JOIN in case of normal table). So if there is no match in table 'Logins' the value of L.F_Name +' '+ L.L_Name AS [CustName], L.Email_ID will be NULL.

Friday, February 24, 2012

64 Bit drivers IBM Db2

Hey guys .. I am trying to run SSIS on the WIn2k3 .. The server is a 64 bit machine. I could not find Db2 drivers for a 64 bit one .. any clues as to how , I can find it. By the way .. I have been running the package in 32 bit mode for now .. which I dont think is a very good idea.

Any suggestions are most welcome ..

Have you tried the Microsoft one (http://www.microsoft.com/downloads/details.aspx?familyid=D09C1D60-A13C-4479-9B91-9E8B9D835CDC&displaylang=en)

The standalone Microsoft OLE DB Provider 2005, which ships in the Feature Pack for SQL Server 2005, offers a single download package and setup program. The setup will detect the processor and install (1) X86 only on Windows X86, (2) x86 side-by-side X64 on Windows X64, or (3) x86 only on Windows IA64. The other Microsoft OLE DB Provider for DB2 that ships in HIS 2006, offers x86 only. The end result of running "either" setup program is an X86 only DB2OLEDB provider.

If you don't want the WOW64 "work-around" for SSIS, you must get the 64 bit provider for DB2 from IBM. Its part of their standard client install kit.

Sunday, February 19, 2012

6.5 vs 8.0 query output. Please shine some light.

Hi guys,
Quick question (I hope).
Why is there a difference in the output of this query in 6.5 campatibility vs 8.0 campatibility?

DECLARE @.FooterLine varchar(30)

select @.FooterLine = rtrim(@.FooterLine) + 'Run by Region'

select @.footerline

6.5 returns Run by Region
8.0 returns NULLbecause something + NULL = NULL in 8.0

if you initialize @.FooterLine to '' or something else you won't have this problem.|||HAHA, thats right. Thanks.

Thursday, February 16, 2012

5 Database Queries to go with an online purchasing system :-)

Hi Guys,

I'm having trouble thinking of ideas for queries that would go with an online purchasing system. The queries must be partially complex (i.e. not just a simple insert query :p).

I can easily write the queries myself but i just need a little help thinking of useful queries.

A query for an 'Invoice' for example is a perfect idea as it implements table joins etc.

Possible other queries are:
Find all customers that have spent a total of more than X amount
Find all delivery address's that X customer has sent items to
Track an order to see if items have been sent yet or not.
etc...

If anyone else can think of a few other ideas i'd be very grateful :-)

thx for reading :-)

--Philkillsonline purchasing sytem? or homework assignment? ;)

total sales by category for the previous month
average price of backlogged orders (product not in stock)
most popular item (by quantity sold, not total price)|||easiest technique...
open a copy of Access, create yuour tables
create the realtionships
open up the query designer
add the required constraints...
run the query, prove it works
open up the query in SQL mode, copy and paste the SQL to your homework assignment paper
...jobsagoodun

... requires minimum thought and creativity, and absolutely no proof that you have understood the concepts behid joins, where clauses etc...|||online purchasing sytem? or homework assignment? ;)

total sales by category for the previous month
average price of backlogged orders (product not in stock)
most popular item (by quantity sold, not total price)

Some nice ideas there thx ^^

easiest technique...
open a copy of Access, create yuour tables
create the realtionships
open up the query designer
add the required constraints...
run the query, prove it works
open up the query in SQL mode, copy and paste the SQL to your homework assignment paper
...jobsagoodun

... requires minimum thought and creativity, and absolutely no proof that you have understood the concepts behid joins, where clauses etc...

and lol...

a nice way to cheat i suppose... but i do actually understand joins etc ;p|||total sales by category for the previous month
average price of backlogged orders (product not in stock)
most popular item (by quantity sold, not total price)
Variations on these:
- Total sales for all foregoing months
- Top ten most popular items
- Most popular category per client (useful for better direct advertising ;-)
- Top ten clients in terms of the amount spent
- Same question, but now in 12 columns, for each of the last 12 months|||- Customer's year to date sales (purchases) compared with last year's year to date sales (purchases).
:shocked: