473,387 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

how to build crystal reports in windows sharepoint sevices

Hello,

does any one know how to use crystal reports in custom web part
i tried to use but its throughing security exception and i could'nt find
much help on the net...

code:

using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;

protected override void CreateChildControls()
{
try
{
ReportDocument crpt = new ReportDocument();
CrystalDecisions.Shared.TableLogOnInfo myLogin = new
CrystalDecisions.Shared.TableLogOnInfo();
crpt.Load("C:/Documents and Settings/DEVELOPMENT/My
Documents/VisualStudioProjects/LaunchReport/CrystalReport1.rpt");

foreach(CrystalDecisions.CrystalReports.Engine.Tab le mytable in
crpt.Database.Tables)
{
myLogin = mytable.LogOnInfo;
myLogin.ConnectionInfo.ServerName = "ServerName";
myLogin.ConnectionInfo.DatabaseName = "DataBaseName";
myLogin.ConnectionInfo.Password = "Password";
myLogin.ConnectionInfo.UserID = "UseName";
mytable.ApplyLogOnInfo(myLogin);
}
CrystalReportViewer1.ReportSource = crpt;
CrystalReportViewer1.DataBind();
Controls.Add(CrystalReportViewer1);
}
catch(Exception e)
{
throw(e);
}
}
Thanks
Jul 21 '05 #1
0 1121

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Stephan | last post by:
Hi, I'm using Visual Studio 2003 (C#) with the integrated Crystal Report software and have the following question: How can I assign a value (string) to an unbound (string) field in Crystal...
5
by: BStorm | last post by:
I have a transaction log file where the DataSet table's Description column is actually delimited into "subcolumns" based upon the transaction id. I would like to parse these into separate fields...
1
by: Doug Lim | last post by:
I have an ASP.NET application that I've developed using Visual Studio ..NET 2003 and I'm making use of Crystal Reports for .NET that's included to return reports back to the visitor's web browser...
19
by: LP | last post by:
I am using (trying to) CR version XI, cascading parameters feature works it asks user to enter params. But if page is resubmitted. It prompts for params again. I did set...
0
by: repalley | last post by:
Hello, does any one know how to use crystal reports in custom web part i tried to use but its throughing security exception and i could'nt find much help on the net... code: using...
4
by: Jay | last post by:
Sorry if posting this to the wrong group, but do you know of any asp.net hosting vendor with support for Crytal Reports? Apparently they do not exist due to high licensing costs at $25k per cpu....
2
by: Simone | last post by:
Hello I am new to this :) I have created a crystal reports and tried using the Crystal Report Viewer but when I try to preview the report it prompts me for a user name and password. I am using...
0
by: Mark Gold | last post by:
Hi! We have a VB application using Crystal Reports 6 that has worked successfully on hundreds of systems for over 10 years. Now, on one network, the application and access database does not close....
1
by: =?Utf-8?B?Q2lhcmFuIE8nJ0Rvbm5lbGw=?= | last post by:
On reflection, you could possibly make the app a self extracting zip file which extracts the EXE and a settings file and then starts the app, then when you app closes, it can repack the settings...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.