|
You're selecting everything from the customers table to add to the report. Is this where the bottleneck is? Do you need to select all of this data?
|
|
|
|
|
thnx for Ur replay.
I am taking one record only using where condition,but that time also this report taking more time for first preview,next preview its taking less time compare to first preview.
|
|
|
|
|
If your database connection has not been pooled, then the first preview will take a lot longer than the second time where it's pulled from the pool.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Is the column you are referencing in your where clause defined by an index ?
Use the "show execution plan" option in query analyzer to make sure the query is not doing table scans.
Optimize the query first, then the report should work fine.
|
|
|
|
|
Hi,
I m manjari.let me tell u the problem while doing my work in my company.when ever a person click the print option to print a document it should detect the person and that time instead of print dialog box our window should display with username and password.if valid then it will goes to print spool.I hv done the program after going to print spool it already detect the person but i want before goin to print spool it should detct.anybody plz help me as soon as possible.
thanks,
regards,
manjari
How i will design a a form in windows service to print a document.
|
|
|
|
|
manjari kar wrote: when ever a person click the print option to print a document it should detect the person and that time instead of print dialog box our window should display with username and password
If you want to show a username/password dialog before the print dialog then you should create one and call ShowDialog on the username/password dialog before the PrintDialog.
manjari kar wrote: How i will design a a form in windows service to print a document.
You cannot. A windows service has no user interface and can run without there being any user logged in.
Man who stand on hill with mouth open wait long time for roast duck to drop in
|
|
|
|
|
thanx for responding.plz giv eme ur answer depictly with code .becoz i tried a lot .but i didnt get result.plz help me.and nw again i briefly tell u the task.suppose in ms word or in notepad or in pdf file ,when a person is going to click the print option in file menu thattime our window should display instead of print dialog popup.if valid then it goes to print dialog popup for print that document.
i hv done my task like this.after clicking the print option printdialog popup is comming,then clicking ok my window is displaying and asking for username and password.but i want before that print dialog popup it should display.plz helpme and give me a right path.
my code is like this :
private void timer1_Tick(object sender, EventArgs e)
{
PrintServer myPrintServer = new PrintServer(@"HP LaserJet P2010 Series PCL 5e");
PrintQueueCollection myPrintQueues = myPrintServer.GetPrintQueues();
foreach (PrintQueue pq in myPrintQueues)
{
pq.Refresh();
PrintJobInfoCollection jobs = pq.GetPrintJobInfoCollection();
foreach (PrintSystemJobInfo job in jobs)
{
if (job.Submitter == "gyana.manjarikar")
{
job.Pause();
}
if (true)
{
//MessageBox.Show(job.Name.ToString());
this.Show();
}
else
this.Hide();
}
}
}
private void btnlogin_Click(object sender, EventArgs e)
{
int copies=10;
this.Opacity = 50;
PrintServer myPrintServer = new PrintServer(@"HP LaserJet P2010 Series PCL 5e");
PrintQueueCollection myPrintQueues = myPrintServer.GetPrintQueues();
foreach (PrintQueue pq in myPrintQueues)
{
pq.Refresh();
PrintJobInfoCollection jobs = pq.GetPrintJobInfoCollection();
foreach (PrintSystemJobInfo job in jobs)
{
//if (txtUserName.Text == "aaa" && txtPassword.Text == "bbb" && copies <= 10)
//{
// job.Restart();
//}
if (job.Submitter == "gyana.manjarikar")
{
if (txtUserName.Text == "aa" && txtPassword.Text == "bb" && copies <= 10)
{
timer1.Dispose();
job.Resume();
this.Hide();
}
else
{
lblErrormsg.Text = "Invalid UserName Or Password";
}
}
else
{
this.Show();
timer1.Start();
lblErrormsg.Visible = true;
lblErrormsg.Text = "Invalid User";
}
//if (job.Submitter == "")
//{
// job.Pause();
//}
//else
//{
// lblErrormsg.Visible = true;
// lblErrormsg.Text = "Invalid User";
//}
//if ( txtUserName.Text == "aa" && txtPassword.Text == "bb" )
//{
// job.Pause();
//}
//else
//{
// lblErrormsg.Visible = true;
// lblErrormsg.Text = "Invalid User";
//}
}
}
}
private void btncancel_Click(object sender, EventArgs e)
{
this.Opacity = 50;
this.Hide();
PrintServer myPrintServer = new PrintServer(@"HP LaserJet P2010 Series PCL 5e");
PrintQueueCollection myPrintQueues = myPrintServer.GetPrintQueues();
foreach (PrintQueue pq in myPrintQueues)
{
pq.Refresh();
PrintJobInfoCollection jobs = pq.GetPrintJobInfoCollection();
foreach (PrintSystemJobInfo job in jobs)
{
if (job.Submitter == "gyana.manjarikar")
{
job.Cancel();
}
}// end for each print job
}
}
private void Form1_Load(object sender, EventArgs e)
{
this.Opacity =100;
}
}
}
plz help me where and what i will change here.
How i will design a a form in windows service to print a document.
|
|
|
|
|
that is unreadable.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
I have a program that runs with active user sessions. How to modify the MSI packaging so that installation would also add the program to Services?
|
|
|
|
|
First of all you must modify your program and make it into a service.
Writing a system service is different than writing a user mode program in a few ways.
You should have a look at some articles on the web, you can start from here[^] for example.
2+2=5 for very large amounts of 2
(always loved that one hehe!)
|
|
|
|
|
Hi -
I've got Visual Studio 2005 and I'm trying to create a SQL Server Project on a 2008 Server.
I'm trying to make a 'New Database Reference' with the following settings:
Data Source: SqlClient
Server: <servername>
Windows Authentication
I'm able to successfully test the connection and find the correct database (catalog).
The problem is that I get a message - "This Server version is not supported. You must have Microsoft SQL Server 2005 Beta 2 or later"
Anyone see or overcome this before?
Thanks in advance!
|
|
|
|
|
You need to install VS 2005 SP1 and also a path on top of it.
Look into the following link[^]
|
|
|
|
|
I am trying to create a report in Crystal IDE, using XSD file as the datasource. It is not letting me do it. As soon as I select the XSD and click ok, I get the error that says "Failed to Load database information". I click OK and then I get "Unknown Database connector error". I am able to use other options like XLS,MDB, but XML would not work. Any ideas?
This works perfectly fine from my .net version of CR. Also, in the .net version I see the ADO.net option under "Available Data sources"->"Create New connection", I donot see that in the CR IDE.
Not sure why this is happenning.
Sudha
|
|
|
|
|
I dont think CR knows how to read XML. You need to convert the XML to MDB/DBF/SQL so that your CR template can read those tables not file. Or another way doing it is to use XML to datagrid and datagrid is your datasource.
|
|
|
|
|
I am trying to use XSD file.
|
|
|
|
|
Also, I am trying to do this directly in Crystal IDE, not via .net.
|
|
|
|
|
In your Crystal Report you reference the schema by opening the Field Explorer, right clicking Database Fields, selecting Database Expert, expanding the Create New Connection node, and the ADO.NET (XML) node then double clicking Make New Connection. At the ADO.NET (XML) dialog set the File Path to your XSD file by clicking the elipses and navigating to the schema file
|
|
|
|
|
That is what I am trying to do, but I do not see the ADO.NET option at all. All I see are:
Access/Excel
Database Files
ODBC
OLE DB
Universes
More DataSources.
I tried to use Database Files option, but as soon as I select the XSD file, I get the error "Failed to load Database Info". I click OK and then I get "Unknown Database connector Error".
Thanks for trying to help me.
Sudha
|
|
|
|
|
go to Create New Connection
go to Databases Files
on the drop down Files of Type select XML Files (*.xml;*.xsd)
point to your file and click Open.
|
|
|
|
|
That is when I get that error.
|
|
|
|
|
Do you have the Login and Password? Is the file locally stored on your Workstation?
|
|
|
|
|
yes it is. This is what I did to create the XSD file: I have an ODBC conn to MYSQL. Using this conn, from .net, I created the XSD file by adding a dataset object.I am trying to use this XSD in Crystal IDE and that is when I am getting the error.
|
|
|
|
|
If your template trying to access the server you need to have ODBC connector from your workstation to the server where the XML/XSD located. Go to Control Panel\Administrative Tools\Data Sources. Make sure the Server\XSD table listed with correct Login and password. Then your template will open using the connector from your Workstation to the server and drills to the server to get the XSD and frame it against your template.
|
|
|
|
|
Sudha. I currently have hundreds of CR rpt files that utilizing DBF, MDB, SQL and experiencing no issues at all. My last attempt is to look at the XSD from your Workstation using Microsoft Access and if the table opens that means you have connections and if the table does not open that means connections from the server is no good. If this does not help I give up.
|
|
|
|
|
My site is working fine in IE7. But it is not showing rightly in IE6.
I have used sitemap in masterpage which has broken down
Thanks for help
|
|
|
|