Crystal Reports :: How To Set Data Source - Parameters Info Programitacally
Oct 29, 2010I wanted to set the data set/parameter info programitically to the crystal report. How I can do that?
View 3 RepliesI wanted to set the data set/parameter info programitically to the crystal report. How I can do that?
View 3 RepliesI have already generated crystal reports but i've made them static. but now i want to make the user to select the criteria for generating the reports. for eg., in one of them i want to show monthwise data so user should be able to select the month and year and that would be passed as parameter and compared to the existing data. provide me with proper exact code that can be used for giving parameters in such a report using C#.
View 3 RepliesI'm new to Crystal Reports and am just trying to add some simple reports to my web application. In the non-report pages I've been using SqlDataSources to retrieve data from the database and would like to do the same for the report pages. I saw a tutorial that indicated I could do this by explicitly setting the data source for the report in the Page_Load callback of the ASPX page as shown below:
[code]...
Is there a way to create "bound" fields w/o a database, since I'll be specify the database at runtime? Or is there a way to create the ".rpt" file w/ unbound fields, that get "bound" at runtime?Or is there a better way to do this altogether?
I want to give option to user with two or three search parameters in textbox or dropdownand the result should display in CrystalViewer.
I know how to do this task with gridview but don't know how to do the same with CrystalViewer.
Moreover, can I have a weblink to download Video lecture on CrystalViewer?
i need to pass parameters into the crystal report...i am using asp.net with c#
View 1 RepliesDoes Crystal Report for Visual Studio 2010 supports Entity data source?
View 1 RepliesAfter some internet sifting i found how to create a crystal report using the disconnected model and learnt how to pass parameters to it.
In my report am suplying a range of dates to select data inside the range; when the report only has one page (or the first of a multi paged) everything works like a charm. The problem is when i naviagate the report using the default toolbar buttons on the crystalreportviewer, the report asks for the very same parameters ive set in code behind.
I was using queystring parameters to pass the parameters (i have a page where you pick the report types and another which has the reportviewer and displays the reports previously selected)
and i thought that they got lost because when you click next/previous there is a postback...switched to session variables and it is still the same.
1: How can i solve this?
2: Is there a way to cache all the report so that navigation doesnt require database access?
3: How can i open the reports without any browser controls /toolbars?
//code from the page where the parameters are set
[Code]....
When i run the application locally it works fine but when i publish it n access from it it gives the error asEither the Crystal Reports registry key permissions are insufficient or the Crystal Reports runtime is not installed correctly.
View 2 Repliesi have a load report on asp page
i have load report on button click
but when i click on next navigation button
then it gives me error with popup
"No valid report source is available."
my code is:
protected void Button1_Click(object sender, EventArgs e) { GetData();
}
private void GetData() {
SqlConnection connection = new SqlConnection(strcon); SqlCommand command = new SqlCommand("Select * from demoforreport WHERE role='" + TextBox1.Text + "'", connection); SqlDataAdapter adapter = new SqlDataAdapter(command); DataSet dataset = new DataSet(); adapter.Fill(dataset, "demoforreport"); ReportDocument CustomerReport = new ReportDocument(); CustomerReport.Load(Server.MapPath("CrystalReport.rpt")); CustomerReport.SetDataSource(dataset.Tables["demoforreport"]); CrystalReportViewer1.ReportSource = CustomerReport; CrystalReportViewer1.DataBind(); }
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
[Code]....
My report is displayed without any problem. However, when I click on the button from my crystal report viewer toolbars I get the error. Note : the toolbars is working fine on my local machine.
Error message : Logon failed. Details: mscorlib : Could not find a part of the path 'C:Documents and SettingschiaMy DocumentsVisual Studio 2008WebSitesSafety Permit System
ptLoad_ConfineSpace_Summary.xml'. Error in File C:WINDOWSTEMP
ptPrintSummaryConfineSpace
{965CF937-D48C-483A-AC32-198A790880A6}.rpt: Unable to connect: incorrect log on parameters.
I'm passing some parameters to a CR report programatically and it was working fine, but now that I have added a new date parameter to the report, for some reason, it is prompting me to enter that parameter on screen (the user isn't allowed to set that parameter is the system who must set it.), I haven't changed a thing other than adding the new date parameter, and all the other parameters behave normal, just the date parameter is prompted even thought I've already set a value for the parameter.
This is the code I've got:
private void ConfigureCrystalReports()
{
crystalReportViewer.ReportSource = GetReportPath();
[Code]....
Just for the sake of things: I have checked that the parameter is indeed a date and that it is well formed. CR prompts me to enter it in the format (mm/dd/yyyy hh:mm:ss) so I pass date in that exact format (In fact I've even tried hard coding a well-formed date and it still prompts me to enter the date).
I am trying to find a way that would allow me to display the parameters that have been selected when there are no records found
For instance.
Pulling from a database with a employee table that contains name, address, city, state, zip, job titile and shift.
i then have two list boxes set up that collect the paramets for the reports. One for the job title and one for the shift.
i want to be able to say that no records are found for "managers" on "third shift" where managers and third shift are the parameters from the listboxes.
consider the example where there is a report which displays all products or a single product from a table through a drop down list selection. The dropdown list also has a '- ALL -' selection item So the resulting query might be
Select * from products OR
Select * from products where ID={id}
Now I have a single report , I am using sql CASE for differentiating between all products or a single product. Another approach is to pass a different value with where clause in report parameters like
[Code]....
What I like to know is what is the best approach? Is doing this inside query is best or specifying the where clause in the report parameters is right? I personally feel much safe with the SQL query CASE.
i want to show a crystel report on page load of page. where i want to show report of those student who logged in the system and their session is created.
View 1 RepliesI have been trying from the past two weeks to integrate crystal reports into my web application. The problem is "We created some reports using Crystal Reports 2008(Sp2) and we are trying to integrate those reports into webpage. Everything works fine on my local machine but when it is deployed to the production server i ran into a lot of problems..
Problem-1 : First time I load the report it comes to the screen where it prompts for DB credentials and stucks up there..I mean those are non editable and doesn't go to next screen. On my local machine the report even didn't prompt for DB credentials. Why it prompts when moved to prod'n Box? How to avoid that?
Problem-2: How about the images on parameters screen?
How to create ssrs with parameter in asp.net with c# using sql ....
View 1 RepliesI wanted to post my problem and solution since I've gotten some good information on this board. When deploying my Visual Studio 2008 C# .NET 2.0 web application Production, I encountered some problems, which is not unusual. What was unusual is that my Crystal Reports .NET reports that use the Report Viewer control would not work; they errored out with:
note: Crystal Report works fine in dev environment....
Logon failed. Details: ADO Error Code: 0x Source: ADODB.Connection Description: Provider cannot be found. It may not be properly installed. Unable to connect: incorrect log on parameters.We are using Oracle 11g 64 bit as database. We establish crystal report database connection by two ways,
1. Microsoft OLE DB Provider for Oracle
2. Microsoft OLE DB Provider for ODBC
but we got the same error in report module when we using two methods.
Our Coding : //CrystalDecisions.CrystalReports.Engine.ReportDocument crpt = new ReportDocument();
private ReportDocument crpt = null;
private void Page_Init(object sender, EventArgs e) [code]....
I'm new to Visual Studio.NET . I need to integrate the crystal reports into an ASP.NET application. I generated Crystal report with the help of crystal report XI developer edition(Stand alone version and NOT from the one which comes from visual studio).
How to integrate this report with the web application.
We have quite a few reports which were developed earlier in Crystal Reports 8.5. We are now planning to use these reports in our web application developed in VS 2008 (C#).
What dlls are needed for calling 8.5 in the application and how should they be added to the application while shipping it to the client?
They are also struggling to get the code running. Would also need the code to call the report with parameters.
iam really new to Crystal Report XI Release 2..iam using multiple subreport in mainreport and onclick of particular subreport it would list out all items related to it..for example if u have customer chart(subreport) in mainreport and onclick of this it would list all customer on demand and subreport is binded and onclick of single customer it would list out single customer which sholud be passed as parameter it would get customer(full Contact details) in another subreport.if this can be done. how it can be done and explain in steps how it can be and if possible with screen shots
View 3 RepliesIn my system Visual studio 2008 with sp1 and Crystal Reports XI Release 2.In Visaul studio 2008 ,while adding add reference it showing crystal reports version 10 instead of 11.How to solve the version problem.
View 1 RepliesI am considering using Crystal Report 2008 as my tool of creating reports on my webpage.The only problem which I'm facing is that I have no control of the remote server which hosts my site (besides uploading files). I can't run a MSI to deploy the CR runfiles.I can't find anywhere in the CR user manual of how to deploy the runtime files without running the msi, and I'm not even sure it's possible.Have anyone deployed CR 2008 without running the MSI and without having to register any files?
View 8 RepliesI have a field in my dataset with type nvarchar(1000). when I link it to crystal reports, it converts it to a field of type string with length set to 100. As a result of that, the string in that field is being truncated on the report. How can I increase the string length to 1000? (I already checked the "Can grow" option).
View 3 Repliesa myth has been passed to me by a senior who told me to 'always' design a crystal report using Add command and not through the table view (like selecting tables and linking them manually).I have been having a hard time writing the queries for master detail reports and making sub report links manually. It gets pretty confusing sometimes.I find it easy to design reports by just selecting two tables and dragging and dropping the link in crystal report designer.
View 1 Replies