Showing posts with label reports. Show all posts
Showing posts with label reports. Show all posts

Tuesday, March 20, 2012

Associating Report Viewer (without UI) with Data Set

Hello all - I am looking to use the ReportViewer Control to automatically print out some client based reports.

I started with the "Print a report from a console app" sample from http://www.gotreportviewer.com/.

I have managed to convert an existing server based report from an RDL to an RDLC, and added it to my Console Project with VB.NET. In addition, I created a new Data Set within this project that returns the data from the original stored procedure that was used for the RDL file. I believe I have also successfully passed in the correct parameters to the sproc, but now I need to associate this new Data Set with the RDLC report. The RDLC has a simple table control that has a few fields from the new Data Set. When the report is rendered, I receive an exception indicating the following:

{"A data source instance has not been supplied for the data source "Production_stpProductionByDay"."}

It would seem that I need to programmatically associate my Data Set with the report, but I cannot seem to figure out the correct syntax.

Here is my Run method:

m_PhaseID = 1

m_ShiftID = 1

m_DateTime = Now()

Dim report As LocalReport = New LocalReport()

Dim parReport(2) As ReportParameter

Dim parDay As New ReportParameter("Day", m_DateTime)

Dim parPhaseID As New ReportParameter("PhaseID", m_PhaseID)

Dim parShiftID As New ReportParameter("ShiftID", m_ShiftID)

parReport(0) = parDay

parReport(1) = parPhaseID

parReport(2) = parShiftID

report.ReportPath = "C:\Documents and Settings\Kruse\My Documents\Visual Studio 2005\Projects\ShellyReportPrint\ShellyReportPrint\Production.rdlc"

report.SetParameters(parReport)

Export(report)

m_currentPageIndex = 0

Print()

Any help would be greatly appreciated! Thanks..

I have yet to find a solution for this issue... has anyone else implemented something similar?

If not, I guess I will have to wait until TechEd 2K6!

Sunday, March 11, 2012

Assigning User / Group thru Web service?

I can't find a way to set user / group to a role thru the web service, this
functionality is availible in the Reports interface, but not thru the web
service?
Just to note i'v implemented Custom Security, agains a users data store. We
need to bulk load 1500 users.
Can this be done thru the db? that would be a solution also if the web
methods are not availible?
sql server 2000, rs 1.0Report Manager uses SetPolicies and SetSystemPolicies SOAP methods.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Nathan Myers" <Nathan Myers@.discussions.microsoft.com> wrote in message
news:69021F82-9C4B-4EE7-896D-A1C3E3C9B20B@.microsoft.com...
>I can't find a way to set user / group to a role thru the web service, this
> functionality is availible in the Reports interface, but not thru the web
> service?
> Just to note i'v implemented Custom Security, agains a users data store.
> We
> need to bulk load 1500 users.
> Can this be done thru the db? that would be a solution also if the web
> methods are not availible?
> sql server 2000, rs 1.0|||do these methods inclue seting a Role to a User / Group. I haven't seen it
in the documentation anywere. Can you show an example of setting a Role
(System Adminstrator) to a User (Nathan.Myers) via the Web services
SetPolicies or SetSystemPolicies?
"Lev Semenets [MSFT]" wrote:
> Report Manager uses SetPolicies and SetSystemPolicies SOAP methods.
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Nathan Myers" <Nathan Myers@.discussions.microsoft.com> wrote in message
> news:69021F82-9C4B-4EE7-896D-A1C3E3C9B20B@.microsoft.com...
> >I can't find a way to set user / group to a role thru the web service, this
> > functionality is availible in the Reports interface, but not thru the web
> > service?
> >
> > Just to note i'v implemented Custom Security, agains a users data store.
> > We
> > need to bulk load 1500 users.
> >
> > Can this be done thru the db? that would be a solution also if the web
> > methods are not availible?
> >
> > sql server 2000, rs 1.0
>
>|||Use SetSystemPolicies to set System Administrator role for a user.
Basically you need to get system policies using GetSystemPolicies, add
policy for user, and then call SetSystemPolicies
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Nathan Myers" <NathanMyers@.discussions.microsoft.com> wrote in message
news:86EAE013-7C63-40AE-997C-CE263A8C58BA@.microsoft.com...
> do these methods inclue seting a Role to a User / Group. I haven't seen it
> in the documentation anywere. Can you show an example of setting a Role
> (System Adminstrator) to a User (Nathan.Myers) via the Web services
> SetPolicies or SetSystemPolicies?
> "Lev Semenets [MSFT]" wrote:
>> Report Manager uses SetPolicies and SetSystemPolicies SOAP methods.
>> --
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>> "Nathan Myers" <Nathan Myers@.discussions.microsoft.com> wrote in message
>> news:69021F82-9C4B-4EE7-896D-A1C3E3C9B20B@.microsoft.com...
>> >I can't find a way to set user / group to a role thru the web service,
>> >this
>> > functionality is availible in the Reports interface, but not thru the
>> > web
>> > service?
>> >
>> > Just to note i'v implemented Custom Security, agains a users data
>> > store.
>> > We
>> > need to bulk load 1500 users.
>> >
>> > Can this be done thru the db? that would be a solution also if the web
>> > methods are not availible?
>> >
>> > sql server 2000, rs 1.0
>>

Thursday, March 8, 2012

assigning datasetname dynamically to a report ?

Hi friends
am new to reports in VS2005.
how can i assign a datasource dynamically to a report.
i know how to do add datasource in desgin mode to a report.(i.e i create a new datasource and drag and drop it on to report).

but in my case i need to take some parameters from users and create a dataset with relavant data and show it in a report.
i cant find any documentation or samples for it.
Thanks for your help.
BTW its winform application and i want to show that report in report viwer control.
Thanks for your helpFinally i found a way to do this.
first i created typed dataset and bound it to my report. and in my screen i populate this typed dataset with data and load the report in report viewer control.
my sample code

reportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Local;
reportViewer1.LocalReport.ReportEmbeddedResource = "WindowsApplication1.samplereport.rdlc";
reportViewer1.LocalReport.DataSources.Add(
new ReportDataSource("MyTable", GetData()));
this.reportViewer1.RefreshReport();

in getdate() method i loop thru my data reader and populated the typed dataset .

is this right approach i.e. using typed dataset and is there any better approach of doing it.
Thanks for your ideas.

Saturday, February 25, 2012

aspx page and Reporting Service

Generally, when I type http://MyServer/Reports in the location, it takes me
to the home page. On that page I see a bar with "New Folder", "New Data
Souce", "Upload File" and "Show Details" options. Below that I see "Sales
Reports" and "SampleReports" folders. Clicking those links it takes us to
the list of reports.
How can I add a folder there called "Maintenance" (Where I see "Sales
Reports" and "SampleReports" folders i.e Home page). Clicking that link it
should list all Maintenance programs available (For Example, "ReasonCodes").
That link should take us to the aspx page.
Any Suggestions?It sounds like you're trying to mix aspx pages and report manager pages.
That's not really possible using the default Report Manager. You can either
build a custom report manager that replaces the user interface, or have a
separate "Maintenance" web virtual root.
You might be able to pull this off by simply creating a report that is
nothing but links to maintenance pages that sit outside of (next to)
Reporting Services.
So the URLs would look like this:
/Reports/Folder1
/Reports/Folder1/Report1
/Reports/Folder1/Report2
/Reports/Maintenance < report with links
etc.
/Maintenance/ReasonCodes.aspx < regular ASP.NET page in separate virtual
directory from reporting
Cheers,
--
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"RA" <rchaudhary-nospam@.storis.com> wrote in message
news:%23RDhI$NzEHA.2624@.TK2MSFTNGP11.phx.gbl...
> Generally, when I type http://MyServer/Reports in the location, it takes
> me to the home page. On that page I see a bar with "New Folder", "New Data
> Souce", "Upload File" and "Show Details" options. Below that I see "Sales
> Reports" and "SampleReports" folders. Clicking those links it takes us to
> the list of reports.
> How can I add a folder there called "Maintenance" (Where I see "Sales
> Reports" and "SampleReports" folders i.e Home page). Clicking that link it
> should list all Maintenance programs available (For Example,
> "ReasonCodes"). That link should take us to the aspx page.
> Any Suggestions?
>|||Unfortunately, the list of reports or main view of Reporting Services is not
customizable. What you see is what you get. As you add more objects,
reports, folders, files, etc. Reporting Services will manage the list & menu
choices for you.
"RA" wrote:
> Generally, when I type http://MyServer/Reports in the location, it takes me
> to the home page. On that page I see a bar with "New Folder", "New Data
> Souce", "Upload File" and "Show Details" options. Below that I see "Sales
> Reports" and "SampleReports" folders. Clicking those links it takes us to
> the list of reports.
> How can I add a folder there called "Maintenance" (Where I see "Sales
> Reports" and "SampleReports" folders i.e Home page). Clicking that link it
> should list all Maintenance programs available (For Example, "ReasonCodes").
> That link should take us to the aspx page.
> Any Suggestions?
>
>

AspNetSessionExpiredException - Your results may vary?

I have a custom reporting application that displays Sql Server Reporting Services reports on an ASP.NET page using Microsoft's report viewer control. The SSRS reports are local reports (they have an rdlc extension).

When a report is left inactive for a lengthy period of time it generates anAspNetSessionExpiredException when the user attempts to move to a new page. The thing that is surprising is that the formatted exception display is contained within the report viewer. The report document map remains visible as does the report toolbar. In the right pane where the report normally appears I see a standard, raw, ASP.NET exception display.

I'm surprised that the report viewer is "catching" the exception and displaying it within the report viewer. Standard events in the page that hosts the report viewer (PreInit, Init, PageLoad) are never invoked.

I have graceful error handling defined in a base page class but it does me no good because the exception never reaches the page code-behind. Puzzling.

Do any of you ASP.NET developers know if it is possible to catch theAspNetSessionExpiredExceptionso that I can handle it in my application code rather than having SSRS display a very ugly, very raw exception message.

I've included the exception message below.

Thanks.

BlackCatBone

...

Server Error in '/templatedemo' Application.

------------------------

ASP.NET session has expired

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: Microsoft.Reporting.WebForms.AspNetSessionExpiredException: ASP.NET session has expired

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[AspNetSessionExpiredException: ASP.NET session has expired]

Microsoft.Reporting.WebForms.ReportDataOperation..ctor() +683

Microsoft.Reporting.WebForms.HttpHandler.GetHandler() +553

Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext context) +10

System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +154

System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

------------------------

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

I am having exactly the same problem. If anyone knows the solution to this it would be fabulous to here from you.

|||

I had the same problem and I found the solution in this posthttp://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=170875&SiteID=1. See Brian Hartman's post regarding sessionState. I used his suggestion of using the out-of-process session state as StateServer mode and it fixed the issue for me. Good luck.

Thursday, February 16, 2012

ASP.Net SQL Server Reports

Hi All

I want to utilize (embed) sql reporting service report in my ASP.Net web page. i.e., I want to handle all connections to sql server etc., from the ASP.Net page itself.. I have seen lot of examples which deal with SQL reporting services directly using viewers and hosting the report on IIS etc.,

Please give some idea on how to do the task

Any kind of help would be gr8ly helpful

SQLRS is available as a web service. You can always call the webservice and pass the parameters and retrieve the report. There's plenty of articles availableif you google.

Monday, February 13, 2012

Asp.net session has expired

Hi

I have designed reports using SQL Server Business Intelligence Development Studio tool (Sql Server reporting service). I have uploaded these reports to report manager.

I am displaying list of reports in tree view control, in my application. I am viewing report in Report Viewer control as per the report selection in tree view control, in same page. I am getting

Server Error in '/Application_name' Application or

  • ASP.NET session has expired error frequently while switching between various reports. Kindly provide me solution

  • .

  • Regards

    Sagayaraj Rayappan

    Are you reseting the Report Path each time they click on an item or are you saving the ExecutionID off? You will need to set the report path each time and not try and use the existed execution ID unless you can keep the session alive yourself.|||

    Thanks for the information. I am resetting Report Path each time when we clicked on an item. How to keep the session alive myself?. What is ExecutionID and how to use it?. Kindly give more details on this.

    |||

    You do not want to use the ExecutionID, I just wanted to rule that out first.

    Is the error occuring from within the report viewer or the entire page?

    |||This error occurs for entire page.|||Since the error occurs on the entire page, this points to an issue in your app. If it was the report server session that had the timeout, the error would occur within the viewer (you would still see the toolbar. Try removing the viewer control and replacing it with a simple control and see if the problem persists.|||

    Hi i am also getting the same error.In my web page i refer the reportviewer and showing different reports.While navigate to different reports randomly i am getting this error.

    Can anyone suggest how to solve this?

    Microsoft.Reporting.WebForms.AspNetSessionExpiredException: ASP.NET session has expired

    [AspNetSessionExpiredException: ASP.NET session has expired]
    Microsoft.Reporting.WebForms.ReportDataOperation..ctor() +683
    Microsoft.Reporting.WebForms.HttpHandler.GetHandler() +553
    Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext context) +10
    System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +154
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

    Thanks in advance,Tom

    |||

    Daniel Reib wrote:

    Since the error occurs on the entire page, this points to an issue in your app. If it was the report server session that had the timeout, the error would occur within the viewer (you would still see the toolbar. Try removing the viewer control and replacing it with a simple control and see if the problem persists.

    Hi I'm getting this error from with the ReportViewer control... I've tried to change the session timeout with the following code but it still times out earlier then the timeout value stated...? Is there some other attribute that needs to be changed also?

    rs -i sessionTimeout.rss -s http://localhost/reportserver -v timeout="6000"

    Many thanks in advance,

    Rob.

    |||

    Did you get a solution to this? The setting you have changed is on the reportserver, your problem is on the app that contains the reportviewer. Look at my post here: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=371287&SiteID=1&PageID=2

    |||

    Hi Mark,

    My issue was slightly different. Because of the nature of our reporting system, users may leave a report open for a long period of time (maybe hours) and then come back to it and attempt to run a drillthrouhgh report from where they left off.

    My solution to this was to increase the session timeout in the application pool which has worked well. I'm lucky I guess that the user base for the system is very small, i.e. no more than twenty users, so we should run into any resource issues (finger crossed).

    Regards,

    Rob.

  • Asp.net session has expired

    Hi

    I have designed reports using SQL Server Business Intelligence Development Studio tool (Sql Server reporting service). I have uploaded these reports to report manager.

    I am displaying list of reports in tree view control, in my application. I am viewing report in Report Viewer control as per the report selection in tree view control, in same page. I am getting

    Server Error in '/Application_name' Application or

  • ASP.NET session has expired error frequently while switching between various reports. Kindly provide me solution

  • .

  • Regards

    Sagayaraj Rayappan

    Are you reseting the Report Path each time they click on an item or are you saving the ExecutionID off? You will need to set the report path each time and not try and use the existed execution ID unless you can keep the session alive yourself.|||

    Thanks for the information. I am resetting Report Path each time when we clicked on an item. How to keep the session alive myself?. What is ExecutionID and how to use it?. Kindly give more details on this.

    |||

    You do not want to use the ExecutionID, I just wanted to rule that out first.

    Is the error occuring from within the report viewer or the entire page?

    |||This error occurs for entire page.|||Since the error occurs on the entire page, this points to an issue in your app. If it was the report server session that had the timeout, the error would occur within the viewer (you would still see the toolbar. Try removing the viewer control and replacing it with a simple control and see if the problem persists.|||

    Hi i am also getting the same error.In my web page i refer the reportviewer and showing different reports.While navigate to different reports randomly i am getting this error.

    Can anyone suggest how to solve this?

    Microsoft.Reporting.WebForms.AspNetSessionExpiredException: ASP.NET session has expired

    [AspNetSessionExpiredException: ASP.NET session has expired]
    Microsoft.Reporting.WebForms.ReportDataOperation..ctor() +683
    Microsoft.Reporting.WebForms.HttpHandler.GetHandler() +553
    Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext context) +10
    System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +154
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

    Thanks in advance,Tom

    |||

    Daniel Reib wrote:

    Since the error occurs on the entire page, this points to an issue in your app. If it was the report server session that had the timeout, the error would occur within the viewer (you would still see the toolbar. Try removing the viewer control and replacing it with a simple control and see if the problem persists.

    Hi I'm getting this error from with the ReportViewer control... I've tried to change the session timeout with the following code but it still times out earlier then the timeout value stated...? Is there some other attribute that needs to be changed also?

    rs -i sessionTimeout.rss -s http://localhost/reportserver -v timeout="6000"

    Many thanks in advance,

    Rob.

    |||

    Did you get a solution to this? The setting you have changed is on the reportserver, your problem is on the app that contains the reportviewer. Look at my post here: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=371287&SiteID=1&PageID=2

    |||

    Hi Mark,

    My issue was slightly different. Because of the nature of our reporting system, users may leave a report open for a long period of time (maybe hours) and then come back to it and attempt to run a drillthrouhgh report from where they left off.

    My solution to this was to increase the session timeout in the application pool which has worked well. I'm lucky I guess that the user base for the system is very small, i.e. no more than twenty users, so we should run into any resource issues (finger crossed).

    Regards,

    Rob.

  • Asp.net session has expired

    Hi

    I have designed reports using SQL Server Business Intelligence Development Studio tool (Sql Server reporting service). I have uploaded these reports to report manager.

    I am displaying list of reports in tree view control, in my application. I am viewing report in Report Viewer control as per the report selection in tree view control, in same page. I am getting

    Server Error in '/Application_name' Application or

  • ASP.NET session has expired error frequently while switching between various reports. Kindly provide me solution

  • .

  • Regards

    Sagayaraj Rayappan

    Are you reseting the Report Path each time they click on an item or are you saving the ExecutionID off? You will need to set the report path each time and not try and use the existed execution ID unless you can keep the session alive yourself.|||

    Thanks for the information. I am resetting Report Path each time when we clicked on an item. How to keep the session alive myself?. What is ExecutionID and how to use it?. Kindly give more details on this.

    |||

    You do not want to use the ExecutionID, I just wanted to rule that out first.

    Is the error occuring from within the report viewer or the entire page?

    |||This error occurs for entire page.|||Since the error occurs on the entire page, this points to an issue in your app. If it was the report server session that had the timeout, the error would occur within the viewer (you would still see the toolbar. Try removing the viewer control and replacing it with a simple control and see if the problem persists.|||

    Hi i am also getting the same error.In my web page i refer the reportviewer and showing different reports.While navigate to different reports randomly i am getting this error.

    Can anyone suggest how to solve this?

    Microsoft.Reporting.WebForms.AspNetSessionExpiredException: ASP.NET session has expired

    [AspNetSessionExpiredException: ASP.NET session has expired]
    Microsoft.Reporting.WebForms.ReportDataOperation..ctor() +683
    Microsoft.Reporting.WebForms.HttpHandler.GetHandler() +553
    Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext context) +10
    System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +154
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

    Thanks in advance,Tom

    |||

    Daniel Reib wrote:

    Since the error occurs on the entire page, this points to an issue in your app. If it was the report server session that had the timeout, the error would occur within the viewer (you would still see the toolbar. Try removing the viewer control and replacing it with a simple control and see if the problem persists.

    Hi I'm getting this error from with the ReportViewer control... I've tried to change the session timeout with the following code but it still times out earlier then the timeout value stated...? Is there some other attribute that needs to be changed also?

    rs -i sessionTimeout.rss -s http://localhost/reportserver -v timeout="6000"

    Many thanks in advance,

    Rob.

    |||

    Did you get a solution to this? The setting you have changed is on the reportserver, your problem is on the app that contains the reportviewer. Look at my post here: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=371287&SiteID=1&PageID=2

    |||

    Hi Mark,

    My issue was slightly different. Because of the nature of our reporting system, users may leave a report open for a long period of time (maybe hours) and then come back to it and attempt to run a drillthrouhgh report from where they left off.

    My solution to this was to increase the session timeout in the application pool which has worked well. I'm lucky I guess that the user base for the system is very small, i.e. no more than twenty users, so we should run into any resource issues (finger crossed).

    Regards,

    Rob.

  • ASP.NET Reports Web Site vs. ASP.NET Crystal Reports Web Site?

    Hello,
    Thanks for reviewing my question. I hope this is the correct forum. I have
    VS 2008 and noticed that when you create a new website you have two choices:
    ASP.NET Reports Web Site or ASP.NET Crystal Reports Web Site. What's the
    differences? Is one better than the other?
    Many Thanks
    PeterFor years MS has bundled in Crystal Reports with Visual Studio. They have
    continued to do this even as they allow creating reports with their
    reporting tool (Reporting Services). They are two different products with
    two totally different lineages. RS started out as a server based reporting
    product using a service oriented architecture. Crystal Reports started out
    as a client/server reporting tool and moved into a server based reporting.
    RS added a local mode using the control that shipped with VS 2005.
    Reporting Services ships its own development environment if you are using
    the server based product (part of SQL Server).
    I gather VS 2008 has improved the ability to use the RS control to create
    reports over that in VS 2005.
    I have no idea what is meant by an ASP.Net reports web site unless they mean
    a web site to use the VS reporting services webform control (they ship with
    both a webform and winform control).
    Anyway, Crystal Reports and Reporting Services both have their plus and
    minuses. If using the complete server based product and you already have SQL
    Server then the licensing for Reporting Services is much cheaper (RS is part
    of SQL Server). Certain types of reports are easier in RS and others are
    harder.
    --
    Bruce Loehle-Conger
    MVP SQL Server Reporting Services
    "Peter" <Peter@.discussions.microsoft.com> wrote in message
    news:5EAF8D05-287B-4BF3-A301-83ADC461318C@.microsoft.com...
    > Hello,
    > Thanks for reviewing my question. I hope this is the correct forum. I
    > have
    > VS 2008 and noticed that when you create a new website you have two
    > choices:
    > ASP.NET Reports Web Site or ASP.NET Crystal Reports Web Site. What's the
    > differences? Is one better than the other?
    > Many Thanks
    > Peter|||On 6 Dic, 20:48, "Bruce L-C [MVP]" <bruce_lcNOS...@.hotmail.com>
    wrote:
    > For years MS has bundled in Crystal Reports with Visual Studio. They have
    > continued to do this even as they allow creating reports with their
    > reporting tool (Reporting Services). They are two different products with
    > two totally different lineages. RS started out as a server based reporting=
    > product using a service oriented architecture. Crystal Reports started out=
    > as a client/server reporting tool and moved into a server based reporting.=
    > RS added a local mode using the control that shipped with VS 2005.
    > Reporting Services ships its own development environment if you are using
    > the server based product (part of SQL Server).
    > I gather VS 2008 has improved the ability to use the RS control to create
    > reports over that in VS 2005.
    > I have no idea what is meant by an ASP.Net reports web site unless they me=an
    > a web site to use the VS reporting services webform control (they ship wit=h
    > both a webform and winform control).
    > Anyway, Crystal Reports and Reporting Services both have their plus and
    > minuses. If using the complete server based product and you already have S=QL
    > Server then the licensing for Reporting Services is much cheaper (RS is pa=rt
    > of SQL Server). Certain types of reports are easier in RS and others are
    > harder.
    > --
    > Bruce Loehle-Conger
    > MVP SQL Server Reporting Services
    > "Peter" <Pe...@.discussions.microsoft.com> wrote in message
    > news:5EAF8D05-287B-4BF3-A301-83ADC461318C@.microsoft.com...
    >
    > > Hello,
    > > Thanks for reviewing my question. =A0I hope this is the correct forum. ==A0I
    > > have
    > > VS 2008 and noticed that when you create a new website you have two
    > > choices:
    > > ASP.NET Reports Web Site or ASP.NET Crystal Reports Web Site. =A0What's =the
    > > differences? =A0Is one better than the other?
    > > Many Thanks
    > > Peter- Nascondi testo tra virgolette -
    > - Mostra testo tra virgolette -
    See also this Reporting system
    http://www.datatime.eu/DataTimeUniversal.htm
    Cheers,
    -P

    Sunday, February 12, 2012

    Asp.net C# app calling up Reports

    Hi,
    Does any one have samples(code) on how to have a asp.net app call up
    reports. How about
    samples on using the Reportviewer control as well?
    Thanks,
    JJThe link explains step by step procedure on calling a report to a asp.net app
    http://www.codeproject.com/aspnet/AHCreatRepsAspNet.asp
    Hope this helps
    Rajan
    "JJ" wrote:
    > Hi,
    > Does any one have samples(code) on how to have a asp.net app call up
    > reports. How about
    > samples on using the Reportviewer control as well?
    > Thanks,
    > JJ
    >
    >

    Thursday, February 9, 2012

    ASP.NET + Reporting Service + Dynamic controls help

    Dynamic Controls are giving me nightmares.
    I have a normal drop down list called Reports:
    Reports - let's user select the report they want to generate
    The number of parameters of the report is never known ahead of time,
    which is why I need to dynamically create them based on the selected
    report.
    Let's say I have 3 drop down lists that depend on each other as the
    paramters:
    Country - has list of countries in the world
    Province - empty initially.
    City - - empty initially.
    1. First you select "Canada" from the Country list
    2. Post Back with value "Canada"
    3. Load back Country list with Canada selected, and List of Provinces
    4. Click on provinces and select Ontario
    * PROBLEM: I can't get the value "Ontario" back :-( It's like it dies
    on the second try
    The 3 drop down lists are created dynamically in Page_Load. They have
    to be because another drop down list (Report), has to be selected
    first. If I were to create them in Page_Init, the viewstate would take
    care of my postback headaches, but I can't because the Reports drop
    down list is not available. The viewstate is loaded _after_ Page_Init.
    To make matters worse, I can't query a database or else I'ld be done a
    long time ago. I'm using a web service. MS Reporting Service's web
    service to be exact. To resolve cascading parameters, I need to get
    those 2 values (Canada, Ontario) and call
    GetReportParameters(report, historyID, forRendering, values,
    credentials)
    with values containing (Ontario, and Canada).
    I tried adding a event handler for the dynamically created drop down
    lists, but that fires after post back, so no help at all since it seems
    to work when I select Canada, but then when I select Ontario, I check
    the "sender" and it's back to it's initial state. I'm so frustrated
    and tired of this.
    I'm doing all of this because I wanted a datepicker, so I'm recreating
    a web UI that does all that. I did it, and works perfectly, only not
    for reports that have cascading parameters.
    I'm getting slaughtered here :-(Hi Roy,
    I feel your pain, I did very similar work setting up a dynamically built
    report front end for this beast. What I had to end up doing is adding a call
    in to (re)call a sub routine that had already been fired on post back. Due
    to the order of operations and which pieces of information you get and where,
    I determined the only way for me to dynamically build the page corrctly after
    postback was to run through the code (sub routine) again. In my case, after
    I got to a certain point and I had gathered all the info I needed, I had to
    call PageLoad(Me) which runs the page load code again. If I understand your
    plight correctly, you might see if this would work for you somehow. I am
    storing all of the parameters for the chosen report in Session and reading
    them back out on page load again.
    "Roy Assaly" wrote:
    > Dynamic Controls are giving me nightmares.
    > I have a normal drop down list called Reports:
    > Reports - let's user select the report they want to generate
    > The number of parameters of the report is never known ahead of time,
    > which is why I need to dynamically create them based on the selected
    > report.
    > Let's say I have 3 drop down lists that depend on each other as the
    > paramters:
    > Country - has list of countries in the world
    > Province - empty initially.
    > City - - empty initially.
    > 1. First you select "Canada" from the Country list
    > 2. Post Back with value "Canada"
    > 3. Load back Country list with Canada selected, and List of Provinces
    > 4. Click on provinces and select Ontario
    > * PROBLEM: I can't get the value "Ontario" back :-( It's like it dies
    > on the second try
    > The 3 drop down lists are created dynamically in Page_Load. They have
    > to be because another drop down list (Report), has to be selected
    > first. If I were to create them in Page_Init, the viewstate would take
    > care of my postback headaches, but I can't because the Reports drop
    > down list is not available. The viewstate is loaded _after_ Page_Init.
    > To make matters worse, I can't query a database or else I'ld be done a
    > long time ago. I'm using a web service. MS Reporting Service's web
    > service to be exact. To resolve cascading parameters, I need to get
    > those 2 values (Canada, Ontario) and call
    > GetReportParameters(report, historyID, forRendering, values,
    > credentials)
    > with values containing (Ontario, and Canada).
    > I tried adding a event handler for the dynamically created drop down
    > lists, but that fires after post back, so no help at all since it seems
    > to work when I select Canada, but then when I select Ontario, I check
    > the "sender" and it's back to it's initial state. I'm so frustrated
    > and tired of this.
    > I'm doing all of this because I wanted a datepicker, so I'm recreating
    > a web UI that does all that. I did it, and works perfectly, only not
    > for reports that have cascading parameters.
    > I'm getting slaughtered here :-(
    >|||Thanks Myles.
    I just used the Session() variable like you said and 3 hours later I'm
    done some spiffy logic and blamo! My web UI now supports Cascading
    Parameter for dropdownlists. Hopefully I didn't break anything! lol.
    Thanks.|||Are you sure you don't load the provinces list on each post back.
    Your code should look something like this (Page_OnLoad) :
    if (!IsPostBack)
    {
    this.GetCountries();
    }
    if (cbxCountry.SelectedValue != null && cbxCountry.SelectedValue.Length
    > 0)
    {
    this.GetProvinces(cbxCountry.SelectedValue);
    }
    Also check that the UseViewState of your controles are set to true.|||Hi Julich,
    I wish it was that simple, but what I actually ended up "rewriting" was
    the MS Reporting services front end GUI! So it has to be generic
    meaning that the names of the controls (cbxCountry) are not known until
    runtime when the user selects the report and the paramters are fetched.
    I just used Country/Province/City because it's an excellent and easy to
    understand problem when it comes to cascading parameters.
    In essence, I get the report name, then I get the report parameters,
    and based on their name, I autogenerate all the necessary controls
    (dropdownlist, textbox, or my custom date picker - which MS left out!
    grrr..) I do strict type checking to determine what control to
    dynamically create and I also validate so no garbage can be place as
    default values or any other type of values.
    All controls have a nomenclature like:
    _REPORT_PARAMATER_x where x is the parameter name. This convention
    makes it easier to find them in the Control tree, and in my case, the
    root of the tree is actually a placeholder.
    Again, I basically rewrote MS's reporting service's front end GUI in
    ASP.NET (VB.NET) code behind. I hate reinventing the wheel but the
    lack of a calendar/date picker is unforgivable. I was REALLY
    disappointed that MS didn't put it in. The last thing I want is a
    client to start entering dates in a text box. Does month go first, or
    day?! And the idea of having 3 drop down lists (year, month, day) is
    not acceptable because it looks ugly. Appearance is important.
    + roy
    Julich wrote:
    > Are you sure you don't load the provinces list on each post back.
    > Your code should look something like this (Page_OnLoad) :
    > if (!IsPostBack)
    > {
    > this.GetCountries();
    > }
    > if (cbxCountry.SelectedValue != null && cbxCountry.SelectedValue.Length
    > > 0)
    > {
    > this.GetProvinces(cbxCountry.SelectedValue);
    > }
    > Also check that the UseViewState of your controles are set to true.|||I totally agree with you on the poor quality of the default MS RS GUI.
    I'm also surprised that no ISV did publish an improved one. Didn't have
    time to test the 2005 version but I hope it will be improved in a
    significant way.
    +1 on "appearance is important".
    Julich|||The biggest UI improvements are multi-select parameters (this is a big one
    for me), end user sorting of the report (click on the column to sort on),
    calendar pick list for parameter (I am not 100% sure of this one), custom
    report items (this will open up RS for 3rd party controls like guages, etc).
    Bruce Loehle-Conger
    MVP SQL Server Reporting Services
    "Julich" <julich@.gmail.com> wrote in message
    news:1121865468.539733.287500@.z14g2000cwz.googlegroups.com...
    >I totally agree with you on the poor quality of the default MS RS GUI.
    > I'm also surprised that no ISV did publish an improved one. Didn't have
    > time to test the 2005 version but I hope it will be improved in a
    > significant way.
    > +1 on "appearance is important".
    > Julich
    >|||Hi Bruce,
    yes, we are looking for custom report items to do our charting....we
    are very keen on getting higher quality and more flexible charting over
    the standard product...looking forward to RS 2005... :-)
    Peter