Showing posts with label form. Show all posts
Showing posts with label form. Show all posts

Thursday, March 29, 2012

Edit a step from a job

I can't edit a step (or create a new one) form an Agent job.
I get General acces denied error.
On details I see at program location
Microsoft.SqlServer.Dts.Runtime.Wrapper.ApplicationClass.get_LogProviderInfos()
Microsoft.SqlServer.Dts.Runtime.Application.get_LogProviderInfos()
I use a client station to acces the server
On server works fine
Any ideas ?Does the logon details you're using from the client have rights to change
the job details?
--
--
Jack Vamvas
___________________________________
Receive free SQL tips - www.ciquery.com/sqlserver.htm
___________________________________
"Sorin Popescu" <spopescu@.nospam.com> wrote in message
news:OZyCCE4kGHA.4224@.TK2MSFTNGP05.phx.gbl...
> I can't edit a step (or create a new one) form an Agent job.
> I get General acces denied error.
> On details I see at program location
>
Microsoft.SqlServer.Dts.Runtime.Wrapper.ApplicationClass.get_LogProviderInfo
s()
> Microsoft.SqlServer.Dts.Runtime.Application.get_LogProviderInfos()
> I use a client station to acces the server
> On server works fine
> Any ideas ?
>|||How can I verify that please ?
"Jack Vamvas" <DEL_TO_REPLYtechsupport@.ciquery.com> wrote in message
news:2-ednVMta7jY5AvZRVnyvQ@.bt.com...
> Does the logon details you're using from the client have rights to change
> the job details?
> --
> --
> Jack Vamvas
> ___________________________________
> Receive free SQL tips - www.ciquery.com/sqlserver.htm
> ___________________________________
>
> "Sorin Popescu" <spopescu@.nospam.com> wrote in message
> news:OZyCCE4kGHA.4224@.TK2MSFTNGP05.phx.gbl...
>> I can't edit a step (or create a new one) form an Agent job.
>> I get General acces denied error.
>> On details I see at program location
> Microsoft.SqlServer.Dts.Runtime.Wrapper.ApplicationClass.get_LogProviderInfo
> s()
>> Microsoft.SqlServer.Dts.Runtime.Application.get_LogProviderInfos()
>> I use a client station to acces the server
>> On server works fine
>> Any ideas ?
>>
>|||It's the owner of job
"Jack Vamvas" <DEL_TO_REPLYtechsupport@.ciquery.com> wrote in message
news:2-ednVMta7jY5AvZRVnyvQ@.bt.com...
> Does the logon details you're using from the client have rights to change
> the job details?
> --
> --
> Jack Vamvas
> ___________________________________
> Receive free SQL tips - www.ciquery.com/sqlserver.htm
> ___________________________________
>
> "Sorin Popescu" <spopescu@.nospam.com> wrote in message
> news:OZyCCE4kGHA.4224@.TK2MSFTNGP05.phx.gbl...
>> I can't edit a step (or create a new one) form an Agent job.
>> I get General acces denied error.
>> On details I see at program location
> Microsoft.SqlServer.Dts.Runtime.Wrapper.ApplicationClass.get_LogProviderInfo
> s()
>> Microsoft.SqlServer.Dts.Runtime.Application.get_LogProviderInfos()
>> I use a client station to acces the server
>> On server works fine
>> Any ideas ?
>>
>sql

Wednesday, March 21, 2012

dynanic report with checkbox control

hi all ,
(Using C#.net) there are 4 fields (name , family name , ave , stNumber )in my table . for this , in my form(form1) I've 4 CheckBox Controls . I want to take a report whenever the user select one or two or ... of them . for example , if the user checked CheckBox1(for the name field ) and CheckBox2(for the family field) , In outpout report show , name and family . how can i dot with crystal report ?
plz help me .In Form1 I've a checkbox control . I created a parameter in crystal report .
this is my code :
in btnReport_Click :

{
string strQuery = "SELECT Name FROM MyTable";
sqlconn.Open();
daAdapter = new SqlDataAdapter(strQuery, sqlconn);
SqlCommandBuilder scb = new SqlCommandBuilder(daAdapter);
da.Fill(DatatSet1.MyTable);
//Definitions
ParameterField paramfield = new ParameterField();
ParameterFields paramfields = new ParameterFields();
ParameterDiscreteValue discreteval = new ParameterDiscreteValue();
//setting
paramfield.Name = "Name";
discreteval.Value = ??
paramfield.CurrentValues.Add(discreteval);
paramfields.Add(paramfield);
crystalReportViewer1.ParameterFieldInfo = paramfields;crystalReportViewer1.ReportSource = crystalreport1;
sqlconn.Close();}

I want to take a report from all of records' Name field of the Table When The user checked "CheckBox1" Control .
plz help me in this :
discreteval.Value = ??
thanx|||You can use global variables

Public gblnShowName As Boolean

In Command button Sub, set the value

If chkShowName.Value = vbChecked Then
gblnShowName = True
Else
gblnShowName = False
End If

Then inside the report code section,

If gblnShowName = True Then
Report.NameField.Suppress = False
Else
Report.NameField.Suppress = True
End If

I normally code like this in VB6, hope it works in .NET also.|||hi,
It doesn't work .|||at last it was solved .
in report sheet , right click on any field , and select Format Object and then checked on suppress CheckBox . after that , in Form1.cs , in btnShowReport_Click , write this :
myCrystalReport1.ReportDefinition.Sections[2].ReportObjects["firstname1"].ObjectFormat.EnableSuppress = false;

Friday, March 9, 2012

Dynamically changing position of Textbox

Hi,

In my report, I've to print the address of the customer in a form which is in a pre-defined format. So while printing, the line number and position should be specified by the user. Is there any ways in SSRS to change the position of a textbox/any control dynamically by inputing the x and y coordinates? If there is a way please let me know that.

Thanks in Advance,

Leks

What does the surrounding content in the layout look like? Do you have a "clear" region in which you could place a very large textbox, representing the all the page area in which the textbox could potentially be placed?

If so, you might be able to do this with padding. IOW, you would place this very large textbox in the layout and then you would pad the top and left to "push" the content of the text box into the customer's preferred position, at runtime.

This is possible because you can express the padding values as expressions. Think of the textbox's true top and left as an offset from 0,0, which you will subtract from the customer's input values (which will be parameters) to get the padded top and left at runtime.

HTH,

>L<

|||

Hi Lisa,

Thanks for your quick reply. But unfortunately my layout is not clear. It contains other data too that I need to position according to the input for them. For each item in the report we have to enter the position. I know this process is a bit tedious. but there is no other ways. They actualy need the report data such that it can be printed in many forms. Please reply as soon as possible.

Thank you dear,

Leks

|||

Hi Leks,

If you have to enter the position of each item in the report, then I think your best option is to edit the RDL on the fly, put your coordinates right in the report definition.

Are you comfortable with doing this? It may be quite straightward. Some things that would enter into it and might change what you have to do would include:

* -- What type of data region are you using (list/table) to contain the dynamic items?

* -- Are there additional items in the report that are *not* dynamically positioned, for example is this an order header you are trying to position so that it fits in a window envelope with a table of order lines that is relatively static?

>L<

|||

Hi Lisa,

Here all the data should change position dynamically. So Your solution shoud work. But I didnt get it. How we can change the rdl on the fly?

Thanking you,

Leks

|||

You can write a whole RDL on the fly if you want to. Look for an example called something like "generate RDL dynamically" on http://gotreportviewer.com/ and there is another example there that will show you how to LoadReportDefinition for a local report from a stream. If the report is a serverreport, you could use the SOAP API to upload the adjusted report definition instead.

In your case, I don't think that it will be necessary to write the whole RDL from scratch (although you will still have to load or upload your revised version). You can have a "template" RDL that you adjust, for each run or each customer, or as needed.

There are two ways to do an RDL template revision, the way I would do it and the way most developers would prefer to do it <g>. I prefer XSLT; in this case I might have a parameter in the XSLT for each positionable item in the report, or pass the entire set of adjustments in the form of a lookup document. If you prefer to load up the RDL in the DOM and select the textboxes as nodes to adjust each of them, this is pretty easy too.

Do you need more help than this, or is this what you're looking for?

>L<

|||

Hi Lisa,

Yes. This was what I was looking for. Now I know that using the XSLT we can position the textbox or any control dynamically.

Thank you so much Lisa,

Leks

|||

Great -- if you get stuck, holler. I am very willing to go the extra mile for other folks who like XSLT <s>.

>L<

Dynamically changing position of Textbox

Hi,

In my report, I've to print the address of the customer in a form which is in a pre-defined format. So while printing, the line number and position should be specified by the user. Is there any ways in SSRS to change the position of a textbox/any control dynamically by inputing the x and y coordinates? If there is a way please let me know that.

Thanks in Advance,

Leks

What does the surrounding content in the layout look like? Do you have a "clear" region in which you could place a very large textbox, representing the all the page area in which the textbox could potentially be placed?

If so, you might be able to do this with padding. IOW, you would place this very large textbox in the layout and then you would pad the top and left to "push" the content of the text box into the customer's preferred position, at runtime.

This is possible because you can express the padding values as expressions. Think of the textbox's true top and left as an offset from 0,0, which you will subtract from the customer's input values (which will be parameters) to get the padded top and left at runtime.

HTH,

>L<

|||

Hi Lisa,

Thanks for your quick reply. But unfortunately my layout is not clear. It contains other data too that I need to position according to the input for them. For each item in the report we have to enter the position. I know this process is a bit tedious. but there is no other ways. They actualy need the report data such that it can be printed in many forms. Please reply as soon as possible.

Thank you dear,

Leks

|||

Hi Leks,

If you have to enter the position of each item in the report, then I think your best option is to edit the RDL on the fly, put your coordinates right in the report definition.

Are you comfortable with doing this? It may be quite straightward. Some things that would enter into it and might change what you have to do would include:

* -- What type of data region are you using (list/table) to contain the dynamic items?

* -- Are there additional items in the report that are *not* dynamically positioned, for example is this an order header you are trying to position so that it fits in a window envelope with a table of order lines that is relatively static?

>L<

|||

Hi Lisa,

Here all the data should change position dynamically. So Your solution shoud work. But I didnt get it. How we can change the rdl on the fly?

Thanking you,

Leks

|||

You can write a whole RDL on the fly if you want to. Look for an example called something like "generate RDL dynamically" on http://gotreportviewer.com/ and there is another example there that will show you how to LoadReportDefinition for a local report from a stream. If the report is a serverreport, you could use the SOAP API to upload the adjusted report definition instead.

In your case, I don't think that it will be necessary to write the whole RDL from scratch (although you will still have to load or upload your revised version). You can have a "template" RDL that you adjust, for each run or each customer, or as needed.

There are two ways to do an RDL template revision, the way I would do it and the way most developers would prefer to do it <g>. I prefer XSLT; in this case I might have a parameter in the XSLT for each positionable item in the report, or pass the entire set of adjustments in the form of a lookup document. If you prefer to load up the RDL in the DOM and select the textboxes as nodes to adjust each of them, this is pretty easy too.

Do you need more help than this, or is this what you're looking for?

>L<

|||

Hi Lisa,

Yes. This was what I was looking for. Now I know that using the XSLT we can position the textbox or any control dynamically.

Thank you so much Lisa,

Leks

|||

Great -- if you get stuck, holler. I am very willing to go the extra mile for other folks who like XSLT <s>.

>L<

Friday, February 24, 2012

dynamic tablename issue

Dear all:
I have a storedprocedure for db loader form some temp tables.
my storedprocedure as the following:

declare c cursor
for
select * from @.tablename
open c
fetch c into ...

but I get an error for declare cursor for dynamic tablename,

did sql server has some BIF to evaluate the variable for table name?

thanks for your kindly assistance.

regards,

Stanley Huanguse the dynamic sql statments EXEC(@.sql_statement) or sp_executesql see the Holy BOL|||Originally posted by yoavmaimon
use the dynamic sql statments EXEC(@.sql_statement) or sp_executesql see the Holy BOL
do you mean I can write the stored procedure as:

create proc sp_dynamicTableName
(
declare @.tablename varchar(20)
)
as
declare c cursor
for
exec('select * from ' & @.tablename)
open c
fetch c into ...

regards for your reply

thanks

Stanley Huang|||what u wrote wont work,
1. u must build the sql statement out of th exec
2. all the sql statements that uses the @.tablename variable must be dynamic.
3. why cursors?|||Originally posted by yoavmaimon
what u wrote wont work,
1. u must build the sql statement out of th exec
2. all the sql statements that uses the @.tablename variable must be dynamic.
3. why cursors?

Dear Sir:
Why cursor?
Because I have to parse the records and and by the columns to do some extra action.
After actions, and I will use Waitfor the pause the cursor engine to limit the resource of this stored procedure.
Do you know how to set the priority of specified account in sql server,
then I can avoid to use cursor.

regards,

Stanley Huang