|
Seren Singh wrote: Still to many step
I'm not sure what are you referring to. Too many steps for the end-user?
Seren Singh wrote: What would ideally happen is:
-> the user clicks the SAVE button
----> the report prints "silently"
-------> the report generates
-------> the report prints
-------> the report closes
In the ideal situation, couldn't you just wire the Save-button click and then (in code):
- instantiate the report
- set report properties
- set datasources
- render it to (temporary) file
- print it
- (delete temporary file)
This way the user wouldn't have to do anything more than to press the Save-button. No extra UI shown along the way.
|
|
|
|
|
Thanks Mika, that sounds like a possible "alternate" solution. The report is rather detailed and has already been designed and built into a .rdlc file. The datasources and report properties are all included in this.
How would I render it to a temp file, print it and delete then it? I didn't know you could do that with SQL Reporting Services - but that's the point - continuously learn new things.
Thanks again
|
|
|
|
|
Seren Singh wrote: How would I render it to a temp file, print it and delete then it
Have a look at the link I posted in my first reply. The Render method is the key to this.
Ofter the report is printed, you can then delete the temp file using static method File.Delete
|
|
|
|
|
What is Mdb file? How to create it?
|
|
|
|
|
Its most likely an access database
|
|
|
|
|
|
how to get last row of the database table.or only latest row entered in table
|
|
|
|
|
Depends a little bit on the database. If it is a SQL Server try this:
SELECT TOP(1) * FROM table ORDER BY field DESC
By providing a orderby clause you can specify what the condition behind "the last" record is. If you are interested in the last record that was added, you may use a timestamp or auto incremented field in the orderby clause.
|
|
|
|
|
thnx for reply its working.....
|
|
|
|
|
Hi ,
I have created a DTS package to send a mail. This package works fine in my local system since I have a outlook profile. but when moved to the server this task fails because this server does not have a outlook profile installed. Is there a way to configure this Send Mail task to use my user id and microsoft exchange server.
Thanks in advance
|
|
|
|
|
Ramkithepower wrote: Is there a way to configure this Send Mail task to use my user id and microsoft exchange server.
You have to have a MAPI client installed and configured correctly in order to SQL Mail to work. Go through this check-list: Common SQL Mail Problems[^]
|
|
|
|
|
Hi to all
Could anyone please help me with a sql query.
I am using MS Access database with Vb.net2005
I have 3 table student,class_held,attendance with the following fields
1. student table (contains the details of students)
id (primary key)
fname
lname
batch_id
.
.
2.class_held (contains the details of each class held)
class_id (primary key)
date
batch_id
subject
3.attendance (contains the details of only absentees student) [there is no primary key I have given, class_id can be same for n number of students who are absent for a particular class ].[absentees are nothing but the student_id in the student table]
class_id
absentees
Now I want the list of students who are present for a particular class.
Thanks in advance
Regards,
HImangshuS
I am a learner Always
|
|
|
|
|
Sounds like homework...
However, is the idea that every student should be on every class??? If that's correct you could use cartesian product to generate all combinations and then use NOT IN clause to check that the user wasn't marked as absent.
BTW, posting the query you have already tried (you have tried, haven't you) would help a lot.
|
|
|
|
|
Thanks for your reply Mika,
This is not a homework but for my college project.
Anyway,I have already done the Cartesian product and got all the combinations. But, I don't know how to use NOT IN clause with 2 condition (because I need to check for the student Id as well as class_id).
Regards,
Himangshu S
I am a learner Always
|
|
|
|
|
Perhaps it would be easiest to use something like:
...
WHERE NOT EXISTS( SELECT 1
FROM attendance
WHERE attendance.class_id = class_held.class_id
AND attendance.absentees = student.id)
|
|
|
|
|
Hello Mika,
Thanks a lot...I got that correct..
Regards,
HimangshuS
I am a learner Always
|
|
|
|
|
Hi,
I am having database files in .dbf format.I am new to Foxpro database.Now i want to convert those foxpro database files to Sql server. Can you guide me is there any other tools to convert .Dbf files to Sql server(.mdf,.ldf).Its very urgent to me if you know please suggest me.
Thanks in Advance
Pavani
|
|
|
|
|
|
hi all,
i want to create a trigger on table through a stored procedure but i got error in excuting the script
it say syntax problem near word TRIGGER
CREATE PROCEDURE CreateMyTrigger
-- Add the parameters for the stored procedure here
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
CREATE TRIGGER [dbo].[InsertQuestionTrigger]
ON [dbo].[Question]
FOR INSERT AS
UPDATE child
-- set the depth of this "child" to be the
-- depth of the parent, plus one.
SET depth = ISNULL(parent.depth + 1,0),
-- the lineage is simply the lineage of the parent,
-- plus the child's ID (and appropriate '/' characters
lineage = ISNULL(parent.lineage,'/') + LTrim(Str(child.QuestionId)) + '/'
-- we can't update the "inserted" table directly,
-- so we find the corresponding child in the
-- "real" table
FROM Question child INNER JOIN inserted i ON i.QuestionId=child.QuestionId
-- now, we attempt to find the parent of this
-- "child" - but it might not exist, so these
-- values may well be NULL
LEFT OUTER JOIN Question parent ON child.IdParent=parent.QuestionId
END
GO
Any Idea and how can create trigger using function or stored procedure.
Thank you in advance!
|
|
|
|
|
Instead of writing the trigger creation directly to the stored procedure, put it in a varchar variable. Then you can use EXECUTE[^] to execute the string.
|
|
|
|
|
for example;
declare @query varchar(500)
set @query = "your trigger create here, I would suggest using not exists clause to prevent you from trying to create it when it is already created "
EXECUTE @query
Good luck
|
|
|
|
|
Hi All,
I know "TOP" Function can select the TOP n records. How can I select records from for example 20 to 50? I know SQL server doesn't have "LIMIT" Function....
Thanks
Tin
|
|
|
|
|
|
Thanks for your reply, I able to create the row number column but when I tried to select a range of row number. It appeared this error message "
Conversion failed when converting the varchar value 'Row_Number' to data type int"
I have used cast and convert already.
Any idea?
Tin
|
|
|
|
|
Could you post the query so it would be easier to see the problem
|
|
|
|