Showing posts with label develop. Show all posts
Showing posts with label develop. Show all posts

Tuesday, March 27, 2012

Customize Reportserver interface

Hi,
Im currently developing various reports for my company. We have many
different clients and different reports for each client.
I want to develop a common website (just like reportserver) for all
the reports and through NT-logon redirect a client to his reports.
My question is: Is it possible to customize the reportserver interface
to do this? How ?Stefan wrote:
> Im currently developing various reports for my company. We have many
> different clients and different reports for each client.
> I want to develop a common website (just like reportserver) for all
> the reports and through NT-logon redirect a client to his reports.
> My question is: Is it possible to customize the reportserver interface
> to do this? How ?
Look at http://www.codeproject.com/useritems/SQLRSViewer.asp
You have to modify this solution but it works great.
regards
Frank
www.xax.de|||Thank you!
/Regards Stefan
"Frank Matthiesen" <fm@.xax.de> wrote in message news:<366uerF4klp8oU1@.individual.net>...
> Stefan wrote:
> > Im currently developing various reports for my company. We have many
> > different clients and different reports for each client.
> >
> > I want to develop a common website (just like reportserver) for all
> > the reports and through NT-logon redirect a client to his reports.
> >
> > My question is: Is it possible to customize the reportserver interface
> > to do this? How ?
> Look at http://www.codeproject.com/useritems/SQLRSViewer.asp
> You have to modify this solution but it works great.
> regards
> Frank
> www.xax.desql

Sunday, March 25, 2012

Customer Statements

I am trying to develop a "customer statements" type report.
I have no issue creating "one off single customer at a time" versions.
I have an issue reporting groups of customers at a time.
The scenario is this:
Single Parameter = All Customers in Canada (for example)
3 different data sets of info to show on
each customer, 1 for general address info, 1 for
invoices and 1 for payments. It is necessary
for them to be broken into 3 seperate datasets.
How can I have 3 different table each with the
above datasets and have them group on one page,
and then the next page is the next customer...
The issue is my grouping, where do I set to
start a new group after all 3 tables/datasets based
on a customer grouping?
I am debating trying subreports to accomplish this
but was hoping I could get away with using 3 tables.
Any suggestions?You definitely want to use subreports. Have your general in the main report.
I suggest using a list and placing the data in individual text boxes (versus
using the table control). Then have two subreports using the table control.
This is exactly what subreports are designed for. Subreports are your
friend.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Chris Patten" <ChrisPatten@.discussions.microsoft.com> wrote in message
news:6B1D0B5C-8DE3-4507-AF7D-E4113D10236E@.microsoft.com...
>I am trying to develop a "customer statements" type report.
> I have no issue creating "one off single customer at a time" versions.
> I have an issue reporting groups of customers at a time.
> The scenario is this:
> Single Parameter = All Customers in Canada (for example)
> 3 different data sets of info to show on
> each customer, 1 for general address info, 1 for
> invoices and 1 for payments. It is necessary
> for them to be broken into 3 seperate datasets.
> How can I have 3 different table each with the
> above datasets and have them group on one page,
> and then the next page is the next customer...
> The issue is my grouping, where do I set to
> start a new group after all 3 tables/datasets based
> on a customer grouping?
> I am debating trying subreports to accomplish this
> but was hoping I could get away with using 3 tables.
> Any suggestions?|||Thanks.
I am trying to implentment your suggestion of using a list (which I have
never used before) and dropping the fields on the body. I am not seeing the
"main area" data populate though, the fields show up blank.
"Bruce L-C [MVP]" wrote:
> You definitely want to use subreports. Have your general in the main report.
> I suggest using a list and placing the data in individual text boxes (versus
> using the table control). Then have two subreports using the table control.
> This is exactly what subreports are designed for. Subreports are your
> friend.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Chris Patten" <ChrisPatten@.discussions.microsoft.com> wrote in message
> news:6B1D0B5C-8DE3-4507-AF7D-E4113D10236E@.microsoft.com...
> >I am trying to develop a "customer statements" type report.
> > I have no issue creating "one off single customer at a time" versions.
> > I have an issue reporting groups of customers at a time.
> >
> > The scenario is this:
> >
> > Single Parameter = All Customers in Canada (for example)
> > 3 different data sets of info to show on
> > each customer, 1 for general address info, 1 for
> > invoices and 1 for payments. It is necessary
> > for them to be broken into 3 seperate datasets.
> >
> > How can I have 3 different table each with the
> > above datasets and have them group on one page,
> > and then the next page is the next customer...
> > The issue is my grouping, where do I set to
> > start a new group after all 3 tables/datasets based
> > on a customer grouping?
> >
> > I am debating trying subreports to accomplish this
> > but was hoping I could get away with using 3 tables.
> >
> > Any suggestions?
>
>

Thursday, March 22, 2012

custom web app for reportviewer

Hi,

I am trying to develop a custom web page to display and generate our company reports.

It shoud have a login page, and then a general window with 2 or 3 frames (top frame with general info, left frame with a

dynamic list of all existing reports (eventually categorized by a certain word in the report title), and a center frame

that has initialy the company logo and after selecting a specific report displays the parameters and afterwards the

generated report).

Does anybody has some pointers or links on the web where some of this is a little bit documented.

I have dev skills in vb.net and know how to work with ssrs.

My web dev skills are intermediate.

All info, tips, hints are very welcome ...

Greetings

Vinnie

If ou want logic i can provide you that..

code you need to write..

I think you can create login page and list of report..

For the 3rd frame.

keep 3 control there

1 image

2 panel with all the controls thath you need for parameter

3 reportviewer control (property visible = false and size (min that you want)

for 1 - you can initially keep image visible.

on click on list of report make it invicible and make the panel for parameter visible.

2) initially invisible as i said above while keeping it visible check for the parameters for the report that are needed and make thaem visible. everything else invisible.

( In my 10 reports I have kept name of the parameters same for same type like if i need to pull patientname and first visit date ..... so my report parameter is patienName, StartDate in 2 nd report date is i need Patientname with last visitdte

then parameter would be PatientName,last date.

in 3rd report i need patient visited between FirstDate and lastDate.. I would keep same parameter Name..

So for each parameter I hav one control.

So it would be easy to make them visible as per report name.

After that you need to set report to report viewer

than pass parameter values to report

than database login to report( if needed)

than make report viewer visible.

RptViewer.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Local;

string ReportPath = "";

ReportPath = ReportLoad.Reportpath + ReportRow["ReportName"].ToString();// ;

if (File.Exists(ReportPath))

{

RptViewer.LocalReport.ReportPath = ReportPath;

//RptViewer.SetDisplayMode(Microsoft.Reporting.WinForms.DisplayMode.PrintLayout);

//RptViewer.ZoomMode = Microsoft.Reporting.WinForms.ZoomMode.Percent;

//RptViewer.ZoomPercent = 100;

RptViewer.LocalReport.DataSources.Clear();

SetReportParameter(weekdate);

RptViewer.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("SlimPOS", GetWeekenderData(weekdate)));

RptViewer.RefreshReport();

}

private void SetReportParameter(DateTime weekenddate)

{

Microsoft.Reporting.WinForms.ReportParameterInfoCollection ParInfo;

Microsoft.Reporting.WinForms.ReportParameter[] RepParameter;

ParInfo = RptViewer.LocalReport.GetParameters();

RepParameter = new Microsoft.Reporting.WinForms.ReportParameter[ParInfo.Count];

for (int j = 0; j < ParInfo.Count; j++)

{

switch (ParInfo[j].Name.ToLower())

{

case "centername":

RepParameter[j] = new Microsoft.Reporting.WinForms.ReportParameter("CenterName", domain.Name.ToString(), false);

break;

case "pweekstartdate":

RepParameter[j] = new Microsoft.Reporting.WinForms.ReportParameter("StartDate", Settings.GetStartOfWeek(weekenddate).ToShortDateString());

break;

case "pweekenddate":

RepParameter[j] = new Microsoft.Reporting.WinForms.ReportParameter("EndDate", Settings.GetEndOfWeek(weekenddate).ToShortDateString());

break;

}

}

RptViewer.LocalReport.SetParameters(RepParameter);

}

private void SetDBLogonForReport(string ReportTitle)

{

Microsoft.Reporting.WinForms.DataSourceCredentials[] crd = new Microsoft.Reporting.WebForms.DataSourceCredentials[1];

crd[0] = new Microsoft.Reporting.WinForms.DataSourceCredentials();

crd[0].Name = ReportTitle;

crd[0].UserId = User;

crd[0].Password = Pwd;

RptViewer.LocalReport.SetDataSourceCredentials(crd);

}

Hope it helps.. all the best..

|||

If ou want logic i can provide you that..

code you need to write..

I think you can create login page and list of report..

For the 3rd frame.

keep 3 control there

1 image

2 panel with all the controls thath you need for parameter

3 reportviewer control (property visible = false and size (min that you want)

for 1 - you can initially keep image visible.

on click on list of report make it invicible and make the panel for parameter visible.

2) initially invisible as i said above while keeping it visible check for the parameters for the report that are needed and make thaem visible. everything else invisible.

( In my 10 reports I have kept name of the parameters same for same type like if i need to pull patientname and first visit date ..... so my report parameter is patienName, StartDate in 2 nd report date is i need Patientname with last visitdte

then parameter would be PatientName,last date.

in 3rd report i need patient visited between FirstDate and lastDate.. I would keep same parameter Name..

So for each parameter I hav one control.

So it would be easy to make them visible as per report name.

After that you need to set report to report viewer

than pass parameter values to report

than database login to report( if needed)

than make report viewer visible.

RptViewer.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Local;

string ReportPath = "";

ReportPath = ReportLoad.Reportpath + ReportRow["ReportName"].ToString();// ConfigurationManager.AppSettings.GetValues("RSReportpath")[0].ToString() + ReportName; // @."c:\code\slimcommon\reporting service reports\rs report\" + ReportTitle + ".rdl";// Application.StartupPath;

if (File.Exists(ReportPath))

{

RptViewer.LocalReport.ReportPath = ReportPath;

//RptViewer.SetDisplayMode(Microsoft.Reporting.WinForms.DisplayMode.PrintLayout);

//RptViewer.ZoomMode = Microsoft.Reporting.WinForms.ZoomMode.Percent;

//RptViewer.ZoomPercent = 100;

RptViewer.LocalReport.DataSources.Clear();

SetReportParameter(weekdate);

RptViewer.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("SlimPOS", GetWeekenderData(weekdate)));

RptViewer.RefreshReport();

}

private void SetReportParameter(DateTime weekenddate)

{

Microsoft.Reporting.WinForms.ReportParameterInfoCollection ParInfo;

Microsoft.Reporting.WinForms.ReportParameter[] RepParameter;

ParInfo = RptViewer.LocalReport.GetParameters();

RepParameter = new Microsoft.Reporting.WinForms.ReportParameter[ParInfo.Count];

for (int j = 0; j < ParInfo.Count; j++)

{

switch (ParInfo[j].Name.ToLower())

{

case "centername":

RepParameter[j] = new Microsoft.Reporting.WinForms.ReportParameter("CenterName", domain.Name.ToString(), false);

break;

case "pweekstartdate":

RepParameter[j] = new Microsoft.Reporting.WinForms.ReportParameter("StartDate", Settings.GetStartOfWeek(weekenddate).ToShortDateString());

break;

case "pweekenddate":

RepParameter[j] = new Microsoft.Reporting.WinForms.ReportParameter("EndDate", Settings.GetEndOfWeek(weekenddate).ToShortDateString());

break;

}

}

RptViewer.LocalReport.SetParameters(RepParameter);

}

private void SetDBLogonForReport(string ReportTitle)

{

Microsoft.Reporting.WinForms.DataSourceCredentials[] crd = new Microsoft.Reporting.WebForms.DataSourceCredentials[1];

crd[0] = new Microsoft.Reporting.WinForms.DataSourceCredentials();

crd[0].Name = ReportTitle;

crd[0].UserId = User;

crd[0].Password = Pwd;

RptViewer.LocalReport.SetDataSourceCredentials(crd);

}

Hope it helps.. all the best..

sql

Custom Stored procedure

Hi, I've tried to develop custom function for AS 2005, written in C#, and registered as database assembly

Code snippet is here

public string MySampleMethod()

{

AdomdCommand command = new AdomdCommand();

command.CommandText = string.Format("with member A AS 'username' select A on 0 FROM MyCube");

return (string)command.ExecuteScalar();

}

Error that I've got was "XML for Analysis parser: The input query is not in the language specified in the Dialect property for this request."

When I execute the same query from SQL Management Studio, everything works OK.

What I did wrong and how it can be resolved?

Thanks in advance

Borko

Hi Borko,

You can't use AS stored procs to execute queries on the same connection as you're using to call the proc, unfortunately. You can open a new connection within the proc but that may or may not be particularly useful to you - here's an example of how to do this:

using System;

using System.Collections.Generic;

using System.Text;

using Microsoft.AnalysisServices.AdomdServer;

using Microsoft.AnalysisServices.AdomdClient;

namespace MDXTests

{

public class RunMDXQueries

{

public static Microsoft.AnalysisServices.AdomdClient.AdomdDataReader RunAQuery()

{

Microsoft.AnalysisServices.AdomdClient.AdomdCommand c = new Microsoft.AnalysisServices.AdomdClient.AdomdCommand("select measures.members on 0 from [adventure works]");

AdomdConnection conn = new AdomdConnection(@."Data Source=localhost\sh; Provider=msolap.3; initial catalog=adventure works dw");

conn.Open();

c.Connection = conn;

return c.ExecuteReader();

}

}

}

You need to set security permissions to 'unrestricted' to get this to work; you can then call this from SQLMS using the following:

CALL SPSRUNNINGQUERIES.RUNAQUERY()

HTH,

Chris

|||

Chris,

information that is not possible to execute queries on the same connection as connection used to call the proc is very usefull.

Thank you very much.

Borko

Wednesday, March 7, 2012

Custom Data Processing Extension

HI everyone,
i want to develop my own data processing extension.
But i'm struggeling with the following issue:
I want to enable a user to select my custom datasource, then make a
connection to central server, that hosts abstract "Business Objects".
After that the user should be able to use the report wizard in VS.NET to
retrieve a list of all Business Objects that are hosted on that central
server and select a specific output table of a method of a business object.
But how can i embed my own UI to support such a scenario?
Thanks in advance,
MarkusYou can specify the designer associated with your custom data-extension
via the following config file:
C:\Program Files\Microsoft SQL Server\80\Tools\Report
Designer\RSReportDesigner.config
You would need to modify the associated designer within the <Designer>
group. The default designer for SQL Server is:
Microsoft.ReportDesigner.Design.VDTQueryDesigner
To create a custom designer, you would need to derrive from:
Microsoft.ReportDesigner.Design.InternalQueryDesigner
...and implement your own custom controls for the designer.
However, after having said all this, I really havent had a need to
implement a custom designer so far. In most cases, I just set the
designer to: Microsoft.ReportDesigner.Design.GenericQueryDesigner
Then, I just intercept the CommandText and do whatever I need to with
my data extension. I have had success doing this with Xml and other
text as the CommandText instead of SQL. Obviously, this won't provide
the users with your list of all Business Objects available, but it
works.
Good luck.
Lance Hunt
http://www.lance-hunt.net/|||One other alternative is to have the business-object selection be a
per-datasource configuration instead of something driven thru the query
designers.
This approach would entail extending the connection-string editor
dialog and may be a bit simpler. (just guessing)|||Hi Lance,
thanks for your great first answer! I'm in the middle of building my own UI
for selecting business entites but am facing a very strange problem...:
I inherited "Microsoft.ReportDesigner.Design.InternalQueryDesigner" and
there is one member "DesignerQueryString" that is marked as internal and
abstract.
But i'm not able to override this member in my class... i tried everything,
it's really strange :-)
Any guess?
Greetings
Markus|||Sorry, I didnt notice that field was internal-abstract. Thats pretty
silly since MS marked the class as public abstract! :(
I guess your only choice is to create your designer based upon
Microsoft.ReportDesigner.Interfaces.IQueryDesigner instead of
InternalQueryDesigner. This just means that you will have to do a bit
more plumbing. Its a shame because InternalQueryDesigner would have
worked if it werent for that one field.
Good luck...|||it's working!!! :-)))))
One (hopefully) last question:
Why doesn't the QueryBuilder show up in the Repord Wizard Form? The "Edit"
Button is disabled. But if i select anoter data source (e.g. SQL) this button
is enabled.
Greetings
Markus
"Lance" wrote:
> Sorry, I didnt notice that field was internal-abstract. Thats pretty
> silly since MS marked the class as public abstract! :(
> I guess your only choice is to create your designer based upon
> Microsoft.ReportDesigner.Interfaces.IQueryDesigner instead of
> InternalQueryDesigner. This just means that you will have to do a bit
> more plumbing. Its a shame because InternalQueryDesigner would have
> worked if it werent for that one field.
> Good luck...
>|||Which "Edit" button is disabled? (there are several)
If you are basically saying your designer isnt wired-up (not visible):
Did you add your extension to the config file at:
C:\Program Files\Microsoft SQL Server\80\Tools\Report
Designer\RSReportDesigner.conf=ADig '
You should end up adding multiple nodes to this file:
The first is the \Configuration\Extensions\Data\Extension XML
Element, and the second is
the \Configuration\Extensions\\Data\Designer element. Make sure
the "name" attribute
matches in both nodes.
Please clarify...
Lance|||Sorry, I misread your post. You are referring to the "Report Wizard"
not the DataSet tab.
I'll take a look at this and see if I can figure it out...|||yes, i already added all the nodes to the .config file.
But the edit button is disabled. I mean the button on the very last dialog
at "Reports->Add New Report" right to the "Query String" TextBox.
"Lance" wrote:
> Which "Edit" button is disabled? (there are several)
> If you are basically saying your designer isnt wired-up (not visible):
> Did you add your extension to the config file at:
> C:\Program Files\Microsoft SQL Server\80\Tools\Report
> Designer\RSReportDesigner.conf­ig '
> You should end up adding multiple nodes to this file:
> The first is the \Configuration\Extensions\Data\Extension XML
> Element, and the second is
> the \Configuration\Extensions\\Data\Designer element. Make sure
> the "name" attribute
> matches in both nodes.
> Please clarify...
> Lance
>|||Unfortunately, you cannot enable this.
The wizard is hard-coded to only support the following DataExtensions:
"Microsoft.ReportingServices.DataExtensions.SqlConnectionWrapper"
"Microsoft.ReportingServices.DataExtensions.OleDbConnectionWrapper"
"Microsoft.ReportingServices.DataExtensions.AdoMdConnection"
"Microsoft.ReportingServices.DataExtensions.OdbcConnectionWrapper"
"Microsoft.ReportingServices.DataExtensions.OracleClientConnectionWrapper"
Therefore, unless you write your own wizard, you will be unable to
enable that Edit button.|||wow... that is real extensibility ;-)))
"Lance" wrote:
> Unfortunately, you cannot enable this.
> The wizard is hard-coded to only support the following DataExtensions:
> "Microsoft.ReportingServices.DataExtensions.SqlConnectionWrapper"
> "Microsoft.ReportingServices.DataExtensions.OleDbConnectionWrapper"
> "Microsoft.ReportingServices.DataExtensions.AdoMdConnection"
> "Microsoft.ReportingServices.DataExtensions.OdbcConnectionWrapper"
> "Microsoft.ReportingServices.DataExtensions.OracleClientConnectionWrapper"
> Therefore, unless you write your own wizard, you will be unable to
> enable that Edit button.
>|||Agreed. Its pretty sad. The funny part is that I see no legitimate
reason why they included that restriction. Had they simply followed
the same model used in the designer-integration it should have worked.
*shrugs*
I havent checked the new Reporting implementation in Sql Server 2005
yet, but it may be fixed in that version.

Saturday, February 25, 2012

Custom Data Extension problems

Hi all,
I'm trying to develop a custom data extension for a proprietary database we
use, and I'm running into problems. I've built a test harness for it and it
works fine; however when I try to use it with RS I get the following error
just after having entered my query and pressed Next in the New Report wizard:
"An error occurred while the query design method was being saved. Object
reference not set to an instance of an object"
When I step through my code, I can see that everything goes well until the
designer tries to call the Parameters property on the Command object. Because
my database doesn't support parameters I'm returning null here, something
I've seen in several code examples. As soon as I've exited the property I get
the error, with the debugger saying it originates from
Microsoft.ReportDesigner.Design.Query.HasParameters.
Other background information (in no particular order):
- Before I get to the Parameters property, I see that the GetName and
GetFieldType properties on my DataReader are called the same number of times
as there are columns in my resultset, and then the Dispose method is called
on the DataReader.
- My queries are in XML, and here's the sample I'm using for testing:
<DVAutoXMLFetch Database="C:\Program Files\IMS Health\DATA\DBPINT01.PRM">
<TimePeriods Count="4">
<TimePeriod>QTR/3/02</TimePeriod>
</TimePeriods>
<Variables Count="3">
<Variable>UN</Variable>
</Variables>
<Dimensions Count="16">
<Dimension Name="CTY" IsGroup="False" BaseDim="">
<Member>AUSTRIA</Member>
</Dimension>
</Dimensions>
<FetchDefinition>
<NumberPrecision ValColNumPrec="1000" ValColRndPrec="1" CalcColRndPrec="3"
/>
<AcrossMeasures Count="2">
<AcrossMeasure Index="1" DimName="TimePeriods" />
<AcrossMeasure Index="2" DimName="Variables" />
<Columns Count="1" Rank="0" CalcRank="0" />
</AcrossMeasures>
<DownMeasures Count="1">
<DownMeasure Index="1" DimName="CTY" />
</DownMeasures>
</FetchDefinition>
</DVAutoXMLFetch>
- I'm running RS SP1 on Windows 2000.
- I can post the source code if anyone wants...
Thanks in advance for any hints!
ChrisChris,
Don't return null. Instead, instantiate your ParameterCollection and return
it back although it will be emply.
--
Hope this helps.
----
Teo Lachev, MCSD, MCT
Author: "Microsoft Reporting Services in Action"
Publisher website: http://www.manning.com/lachev
Buy it from Amazon.com: http://shrinkster.com/eq
Home page and blog: http://www.prologika.com/
----
"Chris Webb" <OnlyForPostingToNewsgroups@.hotmail.com> wrote in message
news:7373D28A-BDDA-450B-B1DC-53605BF8C821@.microsoft.com...
> Hi all,
> I'm trying to develop a custom data extension for a proprietary database
we
> use, and I'm running into problems. I've built a test harness for it and
it
> works fine; however when I try to use it with RS I get the following error
> just after having entered my query and pressed Next in the New Report
wizard:
> "An error occurred while the query design method was being saved. Object
> reference not set to an instance of an object"
> When I step through my code, I can see that everything goes well until the
> designer tries to call the Parameters property on the Command object.
Because
> my database doesn't support parameters I'm returning null here, something
> I've seen in several code examples. As soon as I've exited the property I
get
> the error, with the debugger saying it originates from
> Microsoft.ReportDesigner.Design.Query.HasParameters.
> Other background information (in no particular order):
> - Before I get to the Parameters property, I see that the GetName and
> GetFieldType properties on my DataReader are called the same number of
times
> as there are columns in my resultset, and then the Dispose method is
called
> on the DataReader.
> - My queries are in XML, and here's the sample I'm using for testing:
> <DVAutoXMLFetch Database="C:\Program Files\IMS Health\DATA\DBPINT01.PRM">
> <TimePeriods Count="4">
> <TimePeriod>QTR/3/02</TimePeriod>
> </TimePeriods>
> <Variables Count="3">
> <Variable>UN</Variable>
> </Variables>
> <Dimensions Count="16">
> <Dimension Name="CTY" IsGroup="False" BaseDim="">
> <Member>AUSTRIA</Member>
> </Dimension>
> </Dimensions>
> <FetchDefinition>
> <NumberPrecision ValColNumPrec="1000" ValColRndPrec="1"
CalcColRndPrec="3"
> />
> <AcrossMeasures Count="2">
> <AcrossMeasure Index="1" DimName="TimePeriods" />
> <AcrossMeasure Index="2" DimName="Variables" />
> <Columns Count="1" Rank="0" CalcRank="0" />
> </AcrossMeasures>
> <DownMeasures Count="1">
> <DownMeasure Index="1" DimName="CTY" />
> </DownMeasures>
> </FetchDefinition>
> </DVAutoXMLFetch>
> - I'm running RS SP1 on Windows 2000.
> - I can post the source code if anyone wants...
> Thanks in advance for any hints!
> Chris
>|||Hi Teo,
Thanks, that solved that problem. I've seen several code examples which
returned null for Parameters, which presumably must have worked at some
point; has the behaviour changed since beta 1?
Anyway, I have a new problem now - the report wizard almost, but I get a COM
Interop exception when I click Finish. The error originates from
Microsoft.DataWarehouse.VsIntegration.Designer.Serialization.DataWarehouseContainerManager.CreateDocumentObjectDictionary.
Once again the error is raised from outside my code. Any more ideas?
Thanks again,
Chris
"Teo Lachev" wrote:
> Chris,
> Don't return null. Instead, instantiate your ParameterCollection and return
> it back although it will be emply.
> --
> Hope this helps.
> ----
> Teo Lachev, MCSD, MCT
> Author: "Microsoft Reporting Services in Action"
> Publisher website: http://www.manning.com/lachev
> Buy it from Amazon.com: http://shrinkster.com/eq
> Home page and blog: http://www.prologika.com/
> ----
> "Chris Webb" <OnlyForPostingToNewsgroups@.hotmail.com> wrote in message
> news:7373D28A-BDDA-450B-B1DC-53605BF8C821@.microsoft.com...
> > Hi all,
> >
> > I'm trying to develop a custom data extension for a proprietary database
> we
> > use, and I'm running into problems. I've built a test harness for it and
> it
> > works fine; however when I try to use it with RS I get the following error
> > just after having entered my query and pressed Next in the New Report
> wizard:
> > "An error occurred while the query design method was being saved. Object
> > reference not set to an instance of an object"
> >
> > When I step through my code, I can see that everything goes well until the
> > designer tries to call the Parameters property on the Command object.
> Because
> > my database doesn't support parameters I'm returning null here, something
> > I've seen in several code examples. As soon as I've exited the property I
> get
> > the error, with the debugger saying it originates from
> > Microsoft.ReportDesigner.Design.Query.HasParameters.
> >
> > Other background information (in no particular order):
> > - Before I get to the Parameters property, I see that the GetName and
> > GetFieldType properties on my DataReader are called the same number of
> times
> > as there are columns in my resultset, and then the Dispose method is
> called
> > on the DataReader.
> > - My queries are in XML, and here's the sample I'm using for testing:
> > <DVAutoXMLFetch Database="C:\Program Files\IMS Health\DATA\DBPINT01.PRM">
> > <TimePeriods Count="4">
> > <TimePeriod>QTR/3/02</TimePeriod>
> > </TimePeriods>
> > <Variables Count="3">
> > <Variable>UN</Variable>
> > </Variables>
> > <Dimensions Count="16">
> > <Dimension Name="CTY" IsGroup="False" BaseDim="">
> > <Member>AUSTRIA</Member>
> > </Dimension>
> > </Dimensions>
> > <FetchDefinition>
> > <NumberPrecision ValColNumPrec="1000" ValColRndPrec="1"
> CalcColRndPrec="3"
> > />
> > <AcrossMeasures Count="2">
> > <AcrossMeasure Index="1" DimName="TimePeriods" />
> > <AcrossMeasure Index="2" DimName="Variables" />
> > <Columns Count="1" Rank="0" CalcRank="0" />
> > </AcrossMeasures>
> > <DownMeasures Count="1">
> > <DownMeasure Index="1" DimName="CTY" />
> > </DownMeasures>
> > </FetchDefinition>
> > </DVAutoXMLFetch>
> > - I'm running RS SP1 on Windows 2000.
> > - I can post the source code if anyone wants...
> >
> > Thanks in advance for any hints!
> >
> > Chris
> >
>
>|||Chris,
Not from the top of my head. Could you put breakpoints in all public methods
and see after which call the exception is thrown. There must be something
quirky in the data extension itself.
--
Hope this helps.
----
Teo Lachev, MCSD, MCT
Author: "Microsoft Reporting Services in Action"
Publisher website: http://www.manning.com/lachev
Buy it from Amazon.com: http://shrinkster.com/eq
Home page and blog: http://www.prologika.com/
----
"Chris Webb" <OnlyForPostingToNewsgroups@.hotmail.com> wrote in message
news:987083A9-8CE5-4A99-A887-A32247FB8776@.microsoft.com...
> Hi Teo,
> Thanks, that solved that problem. I've seen several code examples which
> returned null for Parameters, which presumably must have worked at some
> point; has the behaviour changed since beta 1?
> Anyway, I have a new problem now - the report wizard almost, but I get a
COM
> Interop exception when I click Finish. The error originates from
>
Microsoft.DataWarehouse.VsIntegration.Designer.Serialization.DataWarehouseCo
ntainerManager.CreateDocumentObjectDictionary.
> Once again the error is raised from outside my code. Any more ideas?
> Thanks again,
> Chris
> "Teo Lachev" wrote:
> > Chris,
> >
> > Don't return null. Instead, instantiate your ParameterCollection and
return
> > it back although it will be emply.
> >
> > --
> > Hope this helps.
> >
> > ----
> > Teo Lachev, MCSD, MCT
> > Author: "Microsoft Reporting Services in Action"
> > Publisher website: http://www.manning.com/lachev
> > Buy it from Amazon.com: http://shrinkster.com/eq
> > Home page and blog: http://www.prologika.com/
> > ----
> >
> > "Chris Webb" <OnlyForPostingToNewsgroups@.hotmail.com> wrote in message
> > news:7373D28A-BDDA-450B-B1DC-53605BF8C821@.microsoft.com...
> > > Hi all,
> > >
> > > I'm trying to develop a custom data extension for a proprietary
database
> > we
> > > use, and I'm running into problems. I've built a test harness for it
and
> > it
> > > works fine; however when I try to use it with RS I get the following
error
> > > just after having entered my query and pressed Next in the New Report
> > wizard:
> > > "An error occurred while the query design method was being saved.
Object
> > > reference not set to an instance of an object"
> > >
> > > When I step through my code, I can see that everything goes well until
the
> > > designer tries to call the Parameters property on the Command object.
> > Because
> > > my database doesn't support parameters I'm returning null here,
something
> > > I've seen in several code examples. As soon as I've exited the
property I
> > get
> > > the error, with the debugger saying it originates from
> > > Microsoft.ReportDesigner.Design.Query.HasParameters.
> > >
> > > Other background information (in no particular order):
> > > - Before I get to the Parameters property, I see that the GetName and
> > > GetFieldType properties on my DataReader are called the same number of
> > times
> > > as there are columns in my resultset, and then the Dispose method is
> > called
> > > on the DataReader.
> > > - My queries are in XML, and here's the sample I'm using for testing:
> > > <DVAutoXMLFetch Database="C:\Program Files\IMS
Health\DATA\DBPINT01.PRM">
> > > <TimePeriods Count="4">
> > > <TimePeriod>QTR/3/02</TimePeriod>
> > > </TimePeriods>
> > > <Variables Count="3">
> > > <Variable>UN</Variable>
> > > </Variables>
> > > <Dimensions Count="16">
> > > <Dimension Name="CTY" IsGroup="False" BaseDim="">
> > > <Member>AUSTRIA</Member>
> > > </Dimension>
> > > </Dimensions>
> > > <FetchDefinition>
> > > <NumberPrecision ValColNumPrec="1000" ValColRndPrec="1"
> > CalcColRndPrec="3"
> > > />
> > > <AcrossMeasures Count="2">
> > > <AcrossMeasure Index="1" DimName="TimePeriods" />
> > > <AcrossMeasure Index="2" DimName="Variables" />
> > > <Columns Count="1" Rank="0" CalcRank="0" />
> > > </AcrossMeasures>
> > > <DownMeasures Count="1">
> > > <DownMeasure Index="1" DimName="CTY" />
> > > </DownMeasures>
> > > </FetchDefinition>
> > > </DVAutoXMLFetch>
> > > - I'm running RS SP1 on Windows 2000.
> > > - I can post the source code if anyone wants...
> > >
> > > Thanks in advance for any hints!
> > >
> > > Chris
> > >
> >
> >
> >|||Teo,
I did that and still had no luck - and then saw the bug by accident and
fixed it. Everything now seems to run fine, but it did make me wonder - I was
debugging the devenv.exe process, but when you run a report in preview
(rather than build it) does it spawn a new process? That might explain my
problems debugging it, no?
Thanks for all your help,
Chris
"Teo Lachev" wrote:
> Chris,
> Not from the top of my head. Could you put breakpoints in all public methods
> and see after which call the exception is thrown. There must be something
> quirky in the data extension itself.
> --
> Hope this helps.
> ----
> Teo Lachev, MCSD, MCT
> Author: "Microsoft Reporting Services in Action"
> Publisher website: http://www.manning.com/lachev
> Buy it from Amazon.com: http://shrinkster.com/eq
> Home page and blog: http://www.prologika.com/
> ----
> "Chris Webb" <OnlyForPostingToNewsgroups@.hotmail.com> wrote in message
> news:987083A9-8CE5-4A99-A887-A32247FB8776@.microsoft.com...
> > Hi Teo,
> >
> > Thanks, that solved that problem. I've seen several code examples which
> > returned null for Parameters, which presumably must have worked at some
> > point; has the behaviour changed since beta 1?
> >
> > Anyway, I have a new problem now - the report wizard almost, but I get a
> COM
> > Interop exception when I click Finish. The error originates from
> >
> Microsoft.DataWarehouse.VsIntegration.Designer.Serialization.DataWarehouseCo
> ntainerManager.CreateDocumentObjectDictionary.
> > Once again the error is raised from outside my code. Any more ideas?
> >
> > Thanks again,
> >
> > Chris
> >
> > "Teo Lachev" wrote:
> >
> > > Chris,
> > >
> > > Don't return null. Instead, instantiate your ParameterCollection and
> return
> > > it back although it will be emply.
> > >
> > > --
> > > Hope this helps.
> > >
> > > ----
> > > Teo Lachev, MCSD, MCT
> > > Author: "Microsoft Reporting Services in Action"
> > > Publisher website: http://www.manning.com/lachev
> > > Buy it from Amazon.com: http://shrinkster.com/eq
> > > Home page and blog: http://www.prologika.com/
> > > ----
> > >
> > > "Chris Webb" <OnlyForPostingToNewsgroups@.hotmail.com> wrote in message
> > > news:7373D28A-BDDA-450B-B1DC-53605BF8C821@.microsoft.com...
> > > > Hi all,
> > > >
> > > > I'm trying to develop a custom data extension for a proprietary
> database
> > > we
> > > > use, and I'm running into problems. I've built a test harness for it
> and
> > > it
> > > > works fine; however when I try to use it with RS I get the following
> error
> > > > just after having entered my query and pressed Next in the New Report
> > > wizard:
> > > > "An error occurred while the query design method was being saved.
> Object
> > > > reference not set to an instance of an object"
> > > >
> > > > When I step through my code, I can see that everything goes well until
> the
> > > > designer tries to call the Parameters property on the Command object.
> > > Because
> > > > my database doesn't support parameters I'm returning null here,
> something
> > > > I've seen in several code examples. As soon as I've exited the
> property I
> > > get
> > > > the error, with the debugger saying it originates from
> > > > Microsoft.ReportDesigner.Design.Query.HasParameters.
> > > >
> > > > Other background information (in no particular order):
> > > > - Before I get to the Parameters property, I see that the GetName and
> > > > GetFieldType properties on my DataReader are called the same number of
> > > times
> > > > as there are columns in my resultset, and then the Dispose method is
> > > called
> > > > on the DataReader.
> > > > - My queries are in XML, and here's the sample I'm using for testing:
> > > > <DVAutoXMLFetch Database="C:\Program Files\IMS
> Health\DATA\DBPINT01.PRM">
> > > > <TimePeriods Count="4">
> > > > <TimePeriod>QTR/3/02</TimePeriod>
> > > > </TimePeriods>
> > > > <Variables Count="3">
> > > > <Variable>UN</Variable>
> > > > </Variables>
> > > > <Dimensions Count="16">
> > > > <Dimension Name="CTY" IsGroup="False" BaseDim="">
> > > > <Member>AUSTRIA</Member>
> > > > </Dimension>
> > > > </Dimensions>
> > > > <FetchDefinition>
> > > > <NumberPrecision ValColNumPrec="1000" ValColRndPrec="1"
> > > CalcColRndPrec="3"
> > > > />
> > > > <AcrossMeasures Count="2">
> > > > <AcrossMeasure Index="1" DimName="TimePeriods" />
> > > > <AcrossMeasure Index="2" DimName="Variables" />
> > > > <Columns Count="1" Rank="0" CalcRank="0" />
> > > > </AcrossMeasures>
> > > > <DownMeasures Count="1">
> > > > <DownMeasure Index="1" DimName="CTY" />
> > > > </DownMeasures>
> > > > </FetchDefinition>
> > > > </DVAutoXMLFetch>
> > > > - I'm running RS SP1 on Windows 2000.
> > > > - I can post the source code if anyone wants...
> > > >
> > > > Thanks in advance for any hints!
> > > >
> > > > Chris
> > > >
> > >
> > >
> > >
>
>|||It may be if the issue was security related. The idea behind the ReportHost
(F5), is to allow the report author to simulate the Report Server
(production) environment by applying the security settings from the
rspreviewpolicy.config.
--
Hope this helps.
----
Teo Lachev, MCSD, MCT
Author: "Microsoft Reporting Services in Action"
Publisher website: http://www.manning.com/lachev
Buy it from Amazon.com: http://shrinkster.com/eq
Home page and blog: http://www.prologika.com/
----
"Chris Webb" <OnlyForPostingToNewsgroups@.hotmail.com> wrote in message
news:44823615-9F6C-4477-A3DD-ECDCF43BE81A@.microsoft.com...
> Teo,
> I did that and still had no luck - and then saw the bug by accident and
> fixed it. Everything now seems to run fine, but it did make me wonder - I
was
> debugging the devenv.exe process, but when you run a report in preview
> (rather than build it) does it spawn a new process? That might explain my
> problems debugging it, no?
> Thanks for all your help,
> Chris
> "Teo Lachev" wrote:
> > Chris,
> >
> > Not from the top of my head. Could you put breakpoints in all public
methods
> > and see after which call the exception is thrown. There must be
something
> > quirky in the data extension itself.
> >
> > --
> > Hope this helps.
> >
> > ----
> > Teo Lachev, MCSD, MCT
> > Author: "Microsoft Reporting Services in Action"
> > Publisher website: http://www.manning.com/lachev
> > Buy it from Amazon.com: http://shrinkster.com/eq
> > Home page and blog: http://www.prologika.com/
> > ----
> >
> > "Chris Webb" <OnlyForPostingToNewsgroups@.hotmail.com> wrote in message
> > news:987083A9-8CE5-4A99-A887-A32247FB8776@.microsoft.com...
> > > Hi Teo,
> > >
> > > Thanks, that solved that problem. I've seen several code examples
which
> > > returned null for Parameters, which presumably must have worked at
some
> > > point; has the behaviour changed since beta 1?
> > >
> > > Anyway, I have a new problem now - the report wizard almost, but I get
a
> > COM
> > > Interop exception when I click Finish. The error originates from
> > >
> >
Microsoft.DataWarehouse.VsIntegration.Designer.Serialization.DataWarehouseCo
> > ntainerManager.CreateDocumentObjectDictionary.
> > > Once again the error is raised from outside my code. Any more ideas?
> > >
> > > Thanks again,
> > >
> > > Chris
> > >
> > > "Teo Lachev" wrote:
> > >
> > > > Chris,
> > > >
> > > > Don't return null. Instead, instantiate your ParameterCollection and
> > return
> > > > it back although it will be emply.
> > > >
> > > > --
> > > > Hope this helps.
> > > >
> > > > ----
> > > > Teo Lachev, MCSD, MCT
> > > > Author: "Microsoft Reporting Services in Action"
> > > > Publisher website: http://www.manning.com/lachev
> > > > Buy it from Amazon.com: http://shrinkster.com/eq
> > > > Home page and blog: http://www.prologika.com/
> > > > ----
> > > >
> > > > "Chris Webb" <OnlyForPostingToNewsgroups@.hotmail.com> wrote in
message
> > > > news:7373D28A-BDDA-450B-B1DC-53605BF8C821@.microsoft.com...
> > > > > Hi all,
> > > > >
> > > > > I'm trying to develop a custom data extension for a proprietary
> > database
> > > > we
> > > > > use, and I'm running into problems. I've built a test harness for
it
> > and
> > > > it
> > > > > works fine; however when I try to use it with RS I get the
following
> > error
> > > > > just after having entered my query and pressed Next in the New
Report
> > > > wizard:
> > > > > "An error occurred while the query design method was being saved.
> > Object
> > > > > reference not set to an instance of an object"
> > > > >
> > > > > When I step through my code, I can see that everything goes well
until
> > the
> > > > > designer tries to call the Parameters property on the Command
object.
> > > > Because
> > > > > my database doesn't support parameters I'm returning null here,
> > something
> > > > > I've seen in several code examples. As soon as I've exited the
> > property I
> > > > get
> > > > > the error, with the debugger saying it originates from
> > > > > Microsoft.ReportDesigner.Design.Query.HasParameters.
> > > > >
> > > > > Other background information (in no particular order):
> > > > > - Before I get to the Parameters property, I see that the GetName
and
> > > > > GetFieldType properties on my DataReader are called the same
number of
> > > > times
> > > > > as there are columns in my resultset, and then the Dispose method
is
> > > > called
> > > > > on the DataReader.
> > > > > - My queries are in XML, and here's the sample I'm using for
testing:
> > > > > <DVAutoXMLFetch Database="C:\Program Files\IMS
> > Health\DATA\DBPINT01.PRM">
> > > > > <TimePeriods Count="4">
> > > > > <TimePeriod>QTR/3/02</TimePeriod>
> > > > > </TimePeriods>
> > > > > <Variables Count="3">
> > > > > <Variable>UN</Variable>
> > > > > </Variables>
> > > > > <Dimensions Count="16">
> > > > > <Dimension Name="CTY" IsGroup="False" BaseDim="">
> > > > > <Member>AUSTRIA</Member>
> > > > > </Dimension>
> > > > > </Dimensions>
> > > > > <FetchDefinition>
> > > > > <NumberPrecision ValColNumPrec="1000" ValColRndPrec="1"
> > > > CalcColRndPrec="3"
> > > > > />
> > > > > <AcrossMeasures Count="2">
> > > > > <AcrossMeasure Index="1" DimName="TimePeriods" />
> > > > > <AcrossMeasure Index="2" DimName="Variables" />
> > > > > <Columns Count="1" Rank="0" CalcRank="0" />
> > > > > </AcrossMeasures>
> > > > > <DownMeasures Count="1">
> > > > > <DownMeasure Index="1" DimName="CTY" />
> > > > > </DownMeasures>
> > > > > </FetchDefinition>
> > > > > </DVAutoXMLFetch>
> > > > > - I'm running RS SP1 on Windows 2000.
> > > > > - I can post the source code if anyone wants...
> > > > >
> > > > > Thanks in advance for any hints!
> > > > >
> > > > > Chris
> > > > >
> > > >
> > > >
> > > >
> >
> >
> >|||Using Custom data Extensions , i am able to pass a dataset to my report. All goes fine as long as i dont need a parameter to pass to my stored procedure which i execute from my CDE. But i now need to pass a parameter to it for it to return a dataset.Please help.I have spend lots of time over this but have not yet goy the soluion
From http://www.developmentnow.com/g/115_2004_9_0_0_450456/Custom-Data-Extension-problems.ht
Posted via DevelopmentNow.com Group
http://www.developmentnow.com