displaying crystal report with data of wcf service - c#

I am new bee in crystal report. I have to call a WCF service which will return some data in entity list, Now i have to bind this data in a report within a asp.net page. I am not able to find how to do it with crystal report.
All the example i have found, they are using static connection with database. Is there any way to accomplish it.Any kind of suggestion, guide or help will be appreciated.

Call your service
Take the returned list from your service and fill it into a DataSet
Put your DataSet into the Reportdocument using the ReportDocument.SetDataSource(yourDataSet) method http://msdn.microsoft.com/en-us/library/ms226127(v=vs.80).aspx

Related

how to get only column names from XML datasource in ssrs

I have a requirement to consume and display records from webservice in ssrs. From webserice I am able to access and display the records when I was returned as list. but I would like to return the dataset from webservice and consume the columns in ssrs dataset. So I would help to not to create class in webserivce.
Attached is the web service method screen shot and XML query written in ssrs report.
SSRS REPORT XML QUERY:
Webservice method:

Passing Values from XML to Web Service Using SSIS

I've been having trouble accomplishing the following task and was looking for input from the community on how I might go about solving it; if this is the wrong place to post this, please let me know and I will move it.
Using a SSIS package I am trying to:
Read values from an XML document.
Pass those values to a web service.
Record the return value in a new XML document (or a flat-file for simplicity sake).
For reference, let's take a simple example. I want to pass a series of currency types to this web service:
http://www.webservicex.net/ConvertTemperature.asmx
So far I have:
Added HTTP Connection Manager - Configured to access the WSDL file at http://www.webservicex.net/CurrencyConvertor.asmx?wsdl
Created a Web Service Task using the HTTP Connection, made and referenced the WSDL file.
The input fields can be selected manually, for example, CAD to USD.
The output can be easily saved to a specified output.
I have two main problems; the first would be passing the columns from the XML source to the web service and the second is I'm not sure how to handle the datatypes of the web service. In the example web service, the datatype for the currency is "Currency" but that is not a defined datatype within BIDS.
Any advice on this matter would be greatly appreciated.
emphasized textcheck out this link which passes data from a flat file source to a web service.
http://www.vsteamsystemcentral.com/cs/blogs/applied_team_system/archive/2007/01/10/247.aspx

Trigger an SSRS Report from ASP.Net without user intervention

I'd like to be able to fire off an SSRS Report from an ASP.Net application without pulling it up in the application and having to print it from there to a specified printer. This seems like it would be a highly desired feature, but I'm having trouble finding any good solutions online. Can anyone help me with this?
rFirst you will need to set up the report to render from an execution snapshot. You should find this under the reports property tab, execute, select the "Render this report from a report execution snapshot" radio button.
Next you will need to set up a subscription for whom you want it delivered to. Under the subscriptions tab, add new subscription, enter the e-mail information, etc. Under "Subscription Processing Options" select "when the report content is refreshed".
Now you need to be able to trigger a new snapshot programmatically. Fortunately, the reports service exposes a web service for this purpose. Add a service reference to:
http:// your_report_server:your_port/ReportServer/ReportService.asmx
Once you add the reference then you simply need to call the UpdateReportExecutionSnapshot method to cause you report to execute and mail out to your subscribers.
A simple c# command line app to this might look like:
static void Main(string[] args)
{
// The first argument should be the full report path
// and name. It is passed directly to the Ssrs web service
if (args.Length == 0)
{
throw new ArgumentException("Full report name must be the first parameter");
}
// create the endpoint
ReportingServiceSoapClient ssrs = new ReportingServiceSoapClient();
// Update the snapshot
ssrs.UpdateReportExecutionSnapshot(null,args[0]);
}
For the report name, you will need to specify the full report name including any sub folders you have. So if you have your reports say organized by division you would have to specify all the parent folders for example:
/DivisionName/DailyReports/SalesReport
From a Web Application standpoint, in modern prowsers, I don't believe you can specify a printer, and you certainly cannot "auto-start" printing. Reporting services used to have the ability to print unattended with an MS browser plugin, but that was removed a number of years ago as it's now considered a security risk.
The best you can do is "one-click" print, that is programmatically render the report using the Report Execution service from the ReportService.asmx web service and initiate a programmatic solution to print the rendered report.
Unfortunately, printing an SSRS report automatically is quite involved. You can read about How to Print Reports Programmatically here.

how to set querystring in Command of Crystal report

I have made a crystal report in which I pass the database name into querystring. I want to bind that database into crystal report Command. So how is it possible because the report shows the data from multiple database as per selection of user.
I make a webform and use crystal report viewer. I send the database name into querystring.
I will suggest that you should used data table as data source and used a stored procedure or a query where you will decided which database the data will come from.
check this link that will help
http://www.codeproject.com/Articles/28899/Crystal-Report-with-DataSet-and-DataTable-using-C

reporting services and custom datasource

I'm new to reporting services and ask for the possibily of using custom object as datasource? i'm using asp.net, visual web developer 2008 express edition and c#, if yes can you give an example. thanks for help
You can't use POCO as a data source directly in reporting services. There are a few ways to do this.
The simplest it to save your data to a database and query the database.
You could serialize the object to XML and query that by either including the XML directly into your query in an <XmlData> element, or calling a web service to retrieve the XML.
Create an XML Data Source for a Web Service
In your report project, right click on the Shared Data Sources folder.
Select Add New Data Source.
Set the Name to use.
Set the Type to XML.
Set the connection string to http://MyWebServer/MyWebServiceEndpoint.asmx.
Go to the Credentials page.
Configure the authentication.
Click OK.
You'll need to examine the WSDL for the web service and see the following references to help you build the query:
Reporting Services: Using XML and Web Service Data Sources
XML Query Syntax for XML Report Data (SSRS)
Element Path Syntax for XML Report Data (SSRS)
Here's a list of supported data sources from msdn: Data Sources
You would simply add a shared data source to your project (example: MyDataSource.rds) and choose from the available types. There, you would simply supply the appropriate credentials. Each of your reports would use the data source.
EDIT
Here's a simple tutorial on adding a data source: Creating a Shared Data Source in Reporting Services

Categories

Resources