Showing posts with label company. Show all posts
Showing posts with label company. Show all posts

Friday, March 30, 2012

Invoice with multi pages

Hi,

I want know if is possible create a report, with this caracteristics.

Page 1:

Header:

Nome of Company Invoice no 1

Original

Detail:

line 1

line 2

line 3

Page 2:

Header:

Nome of Company Invoice no 1

Copy

Detail:

line 1

line 2

line 3

.

.

.

Many pages of parameter in my code in Visual Studio.

Tanks,

Camsoft77

what about with two table controls that are identical except the "Original"/"Copy" difference?|||

urbancenturion,

My question is how i can create two pages or more, with same information but change for example 1 parameter.

I need build a report to create Invoice. with 3 copies of invoice.

Att,

Camsoft77

|||

>>I need build a report to create Invoice. with 3 copies of invoice.

The best way to do this is with a cartesian join added to your "real" query.

For example, the following will create three rows for each real table row, with an extra column called "invoice_info", properly ordered so the "original" shows up first, in case that is important to you <s>:

Code Snippet

select sales_no, invoice_info from orderheader join

(select 'ORIGINAL' as invoice_info, 1 AS invoice_order

union

select 'COPY1',2

union

select 'COPY2',3

) xx

on 1 = 1

order by sales_no, invoice_order

.. now put a group on your invoice # (or sales_no, in my example) or whatever you want in your report...

HTH,

>L<

Invoice numbering system

I am creating an invoicing structure in our database. Our system allows
multiple companies to be setup within the one database. Each company should
have seperate invoice number sequences. E.g.
Company One's last invoice number was 10000
Company Two generates a new invoice. They should be given either 10000 or a
number in a completely different range. But they should not be given 10001
(in company one's sequence).
Has anyone any suggestions on how to create a system for generating invoice
numbers. Two users should never be given the same invoice number (within
the same company). There should never be any gaps in invoice numbers (e.g.
Company One next invoice number after 10000 must be 10001 and then 10002
etc).
I need a guaranteed system that will generate an invoice number using the
rules above.
Thanks,
ChrisIf I was to generate my next number using something such as this...
INSERT INTO Invoices (InvoiceNo)
SELECT TOP 1 InvoiceNo + 1 FROM Invoices WHERE CompanySerialNo = 5 ORDER
BY InvoiceNo DESC
This approach seems to work, except for when I generate my first invoice
because the select clause returns nothing. So I tried this...
INSERT INTO Invoices (InvoiceNo)
SELECT TOP 1 InvoiceNo FROM (
SELECT InvoiceNo + 1 As InvoiceNo FROM Invoices WHERE CompanySerialNo
= 5
UNION
SELECT 1 AS InvoiceNo) SubQuery ORDER BY InvoiceNo DESC
This seems to work. Does this sound a good approach for generating invoice
numbers that are unique to a company? And does this guarantee two users
cannot be given the same number?
Thanks,
Chris
"Chris" <cw@.community.nospam> wrote in message
news:%23QF7DOqvFHA.3124@.TK2MSFTNGP12.phx.gbl...
>I am creating an invoicing structure in our database. Our system allows
>multiple companies to be setup within the one database. Each company
>should have seperate invoice number sequences. E.g.
> Company One's last invoice number was 10000
> Company Two generates a new invoice. They should be given either 10000 or
> a number in a completely different range. But they should not be given
> 10001 (in company one's sequence).
>
> Has anyone any suggestions on how to create a system for generating
> invoice numbers. Two users should never be given the same invoice number
> (within the same company). There should never be any gaps in invoice
> numbers (e.g. Company One next invoice number after 10000 must be 10001
> and then 10002 etc).
> I need a guaranteed system that will generate an invoice number using the
> rules above.
>
> Thanks,
> Chris
>|||put it on separate tables
--
thanks,
Jose de Jesus Jr. Mcp,Mcdba
Data Architect
Sykes Asia (Manila philippines)
MCP #2324787
"Chris" wrote:

> I am creating an invoicing structure in our database. Our system allows
> multiple companies to be setup within the one database. Each company shou
ld
> have seperate invoice number sequences. E.g.
> Company One's last invoice number was 10000
> Company Two generates a new invoice. They should be given either 10000 or
a
> number in a completely different range. But they should not be given 1000
1
> (in company one's sequence).
>
> Has anyone any suggestions on how to create a system for generating invoic
e
> numbers. Two users should never be given the same invoice number (within
> the same company). There should never be any gaps in invoice numbers (e.g
.
> Company One next invoice number after 10000 must be 10001 and then 10002
> etc).
> I need a guaranteed system that will generate an invoice number using the
> rules above.
>
> Thanks,
> Chris
>
>|||Chris ,
why dont u try describing the column as identity using newid function to
give to unque number everytime
"Chris" wrote:

> If I was to generate my next number using something such as this...
> INSERT INTO Invoices (InvoiceNo)
> SELECT TOP 1 InvoiceNo + 1 FROM Invoices WHERE CompanySerialNo = 5 ORDE
R
> BY InvoiceNo DESC
>
> This approach seems to work, except for when I generate my first invoice
> because the select clause returns nothing. So I tried this...
> INSERT INTO Invoices (InvoiceNo)
> SELECT TOP 1 InvoiceNo FROM (
> SELECT InvoiceNo + 1 As InvoiceNo FROM Invoices WHERE CompanySerial
No
> = 5
> UNION
> SELECT 1 AS InvoiceNo) SubQuery ORDER BY InvoiceNo DESC
>
> This seems to work. Does this sound a good approach for generating invoic
e
> numbers that are unique to a company? And does this guarantee two users
> cannot be given the same number?
> Thanks,
> Chris
>
> "Chris" <cw@.community.nospam> wrote in message
> news:%23QF7DOqvFHA.3124@.TK2MSFTNGP12.phx.gbl...
>
>|||On Wed, 21 Sep 2005 13:29:44 +0100, Chris wrote:

>If I was to generate my next number using something such as this...
>INSERT INTO Invoices (InvoiceNo)
> SELECT TOP 1 InvoiceNo + 1 FROM Invoices WHERE CompanySerialNo = 5 ORDER
>BY InvoiceNo DESC
>
>This approach seems to work, except for when I generate my first invoice
>because the select clause returns nothing. So I tried this...
>INSERT INTO Invoices (InvoiceNo)
> SELECT TOP 1 InvoiceNo FROM (
> SELECT InvoiceNo + 1 As InvoiceNo FROM Invoices WHERE CompanySerialN
o
>= 5
> UNION
> SELECT 1 AS InvoiceNo) SubQuery ORDER BY InvoiceNo DESC
>
>This seems to work. Does this sound a good approach for generating invoice
>numbers that are unique to a company? And does this guarantee two users
>cannot be given the same number?
Hi Chris,
This one is easier, and probably quicker as well:
INSERT INTO Invoices (InvoiceNo)
SELECT COALESCE(MAX(InvoiceNo),0) + 1
FROM Invoices
WHERE CompanySerialNo = 5
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)|||Thanks Hugo,
That's more readable!
Chris

> Hi Chris,
> This one is easier, and probably quicker as well:
> INSERT INTO Invoices (InvoiceNo)
> SELECT COALESCE(MAX(InvoiceNo),0) + 1
> FROM Invoices
> WHERE CompanySerialNo = 5
> Best, Hugo
> --
> (Remove _NO_ and _SPAM_ to get my e-mail address)

Invoice Detail

Hi

I have a invoice that displays the company name in a rectangle on top then it has a list in the list it has details tables my problem is that the invoice detail goes on the next page I need to have the company name as well on the second page I cant put it in the same table as the detail because I have a few tables in the detail so it is actually no header is it possible to have Repeated the Company name information on the next page?

Thanks

Try this:

http://blogs.msdn.com/ChrisHays/

You may be able to add a conditional text box that displays whenever RowNumber > a certain amount, which would be equal to the amount of records that could fit on a page.

cheers,

Andrew

|||<<

You may be able to add a conditional text box that displays whenever RowNumber > a certain amount, which would be equal to the amount of records that could fit on a page.>>

Hi Thanks Andrew

can you please explain a little bit more how you do this?

Thanks

|||A bit of a hack, but how about just creating another rectangle with visibility property =IIF(Globals!PageNumber.Value > 2)

Not sure if that will work though since the body does not know about page numbers.

Did you try Chris Hays's fix?

http://blogs.msdn.com/ChrisHays/

By passing in the RowNumber to a function, you should be able to toggle hidden property using something like =IIF(Code.RowCount(RowNumber(Nothing)) = 25, True, False)

Then just place the title in a new row in your table, or create a table within a table?

Apologies, hope you find an easier way.

cheers,
Andrew

Investigating Custom Security

Hi everyone,
At the moment, my company is looking at ways to offer data hosting to our
customers. As far as Reporting Services goes, the current idea is that they
would contact a Report Server hosted by us externally. As a result, we are
looking at which security options are best and would appreciate some insight
if anyone has any suggestions.
At the moment, the idea is to have a single report server with different
folders for each customer. We would like to implement security so that each
customer can see their own folder, but no-one else can, and no-one can see
the directory of folders. It does not appear to be feasible to do this with
windows role-based security, so we are looking at writing our own custom
security extension. The problem here is that there does not seem to be a
way, when dealing with AceStructs, for example, to monitor which folder the
user is in.
Anyway, my questions are:
1. Is this whole approach wrong-headed, i.e. do we really need to have a
different ReportServer for each customer? We would like to avoid this if
possible.
2. If we do use the same server with different folders, what is the best
way to check what folder the user is in and whether that is their correct
folder (in, for example, the IAuthorizationExtension.CheckAccess implemented
method)?
As ever, any help very much appreciated.
Ed AllisonWe implemented something incredibly similar. You don't need to know what
folder the user is in CheckAccess because thats part of the ACL associated
with it. You assign users (or groups) particular access to different
folders. Check Access will do the rest of the work
so if you had 2 folders in the root for
/ClientA
/ClientB
and neither wants to see the other... (well you don't want them too)
you would assign permissions for the group to clienta for clienta folder,
and clientb for clientb folder.
Now they may be able to see the folder, but if they try to access it, it
gets access denied.
Otherwise, it sounds like your trying to re-write CheckAccess in almost the
same way it is now... just think about it a bit differently.
"Ed Allison" <ed@.optix.co.uk> wrote in message
news:OP6TJBCSGHA.5908@.TK2MSFTNGP14.phx.gbl...
> Hi everyone,
> At the moment, my company is looking at ways to offer data hosting to our
> customers. As far as Reporting Services goes, the current idea is that
> they
> would contact a Report Server hosted by us externally. As a result, we
> are
> looking at which security options are best and would appreciate some
> insight
> if anyone has any suggestions.
> At the moment, the idea is to have a single report server with different
> folders for each customer. We would like to implement security so that
> each
> customer can see their own folder, but no-one else can, and no-one can see
> the directory of folders. It does not appear to be feasible to do this
> with
> windows role-based security, so we are looking at writing our own custom
> security extension. The problem here is that there does not seem to be a
> way, when dealing with AceStructs, for example, to monitor which folder
> the
> user is in.
> Anyway, my questions are:
> 1. Is this whole approach wrong-headed, i.e. do we really need to have a
> different ReportServer for each customer? We would like to avoid this if
> possible.
> 2. If we do use the same server with different folders, what is the best
> way to check what folder the user is in and whether that is their correct
> folder (in, for example, the IAuthorizationExtension.CheckAccess
> implemented
> method)?
> As ever, any help very much appreciated.
> Ed Allison
>
>|||You have to enable "My Reports" feature in the Reporting services and refer
your customers to "My Reports" folder upon login.
Everyone will have its own and you don't have to know, what is the real name
of the folder is - just use "My Reports" path.
But you are going to face a challenge of accessing shared reports in a fixed
folder - use parameter encryption in that case.
--
Oleg Yevteyev,
San Diego, CA
It is OK to contact me with a contracting opportunity.
"myfirstname"001atgmaildotcom.
Replace "myfirstname" with Oleg.
--
"Ed Allison" <ed@.optix.co.uk> wrote in message
news:OP6TJBCSGHA.5908@.TK2MSFTNGP14.phx.gbl...
> Hi everyone,
> At the moment, my company is looking at ways to offer data hosting to our
> customers. As far as Reporting Services goes, the current idea is that
> they
> would contact a Report Server hosted by us externally. As a result, we
> are
> looking at which security options are best and would appreciate some
> insight
> if anyone has any suggestions.
> At the moment, the idea is to have a single report server with different
> folders for each customer. We would like to implement security so that
> each
> customer can see their own folder, but no-one else can, and no-one can see
> the directory of folders. It does not appear to be feasible to do this
> with
> windows role-based security, so we are looking at writing our own custom
> security extension. The problem here is that there does not seem to be a
> way, when dealing with AceStructs, for example, to monitor which folder
> the
> user is in.
> Anyway, my questions are:
> 1. Is this whole approach wrong-headed, i.e. do we really need to have a
> different ReportServer for each customer? We would like to avoid this if
> possible.
> 2. If we do use the same server with different folders, what is the best
> way to check what folder the user is in and whether that is their correct
> folder (in, for example, the IAuthorizationExtension.CheckAccess
> implemented
> method)?
> As ever, any help very much appreciated.
> Ed Allison
>
>|||I'll look into that. Thanks for your help.
"Oleg Yevteyev" <myfirstname001atgmaildotcom> wrote in message
news:%23xh9mOJSGHA.5728@.tk2msftngp13.phx.gbl...
> You have to enable "My Reports" feature in the Reporting services and
> refer your customers to "My Reports" folder upon login.
> Everyone will have its own and you don't have to know, what is the real
> name of the folder is - just use "My Reports" path.
> But you are going to face a challenge of accessing shared reports in a
> fixed folder - use parameter encryption in that case.
> --
> Oleg Yevteyev,
> San Diego, CA
> It is OK to contact me with a contracting opportunity.
> "myfirstname"001atgmaildotcom.
> Replace "myfirstname" with Oleg.
> --
> "Ed Allison" <ed@.optix.co.uk> wrote in message
> news:OP6TJBCSGHA.5908@.TK2MSFTNGP14.phx.gbl...
>> Hi everyone,
>> At the moment, my company is looking at ways to offer data hosting to our
>> customers. As far as Reporting Services goes, the current idea is that
>> they
>> would contact a Report Server hosted by us externally. As a result, we
>> are
>> looking at which security options are best and would appreciate some
>> insight
>> if anyone has any suggestions.
>> At the moment, the idea is to have a single report server with different
>> folders for each customer. We would like to implement security so that
>> each
>> customer can see their own folder, but no-one else can, and no-one can
>> see
>> the directory of folders. It does not appear to be feasible to do this
>> with
>> windows role-based security, so we are looking at writing our own custom
>> security extension. The problem here is that there does not seem to be a
>> way, when dealing with AceStructs, for example, to monitor which folder
>> the
>> user is in.
>> Anyway, my questions are:
>> 1. Is this whole approach wrong-headed, i.e. do we really need to have a
>> different ReportServer for each customer? We would like to avoid this if
>> possible.
>> 2. If we do use the same server with different folders, what is the best
>> way to check what folder the user is in and whether that is their correct
>> folder (in, for example, the IAuthorizationExtension.CheckAccess
>> implemented
>> method)?
>> As ever, any help very much appreciated.
>> Ed Allison
>>
>|||Thanks for your answer Chris. You are correct. I was working on the false
assumption that it would be necessary to completely re-write CheckAccess. I
see that this is not necessary, and that will save me a lot of time.
"Chris Taylor" <ctaylor7480@.newsgroups.nospam> wrote in message
news:ejiAGRFSGHA.4384@.tk2msftngp13.phx.gbl...
> We implemented something incredibly similar. You don't need to know what
> folder the user is in CheckAccess because thats part of the ACL associated
> with it. You assign users (or groups) particular access to different
> folders. Check Access will do the rest of the work
> so if you had 2 folders in the root for
> /ClientA
> /ClientB
> and neither wants to see the other... (well you don't want them too)
> you would assign permissions for the group to clienta for clienta folder,
> and clientb for clientb folder.
> Now they may be able to see the folder, but if they try to access it, it
> gets access denied.
> Otherwise, it sounds like your trying to re-write CheckAccess in almost
> the same way it is now... just think about it a bit differently.
>
>
> "Ed Allison" <ed@.optix.co.uk> wrote in message
> news:OP6TJBCSGHA.5908@.TK2MSFTNGP14.phx.gbl...
>> Hi everyone,
>> At the moment, my company is looking at ways to offer data hosting to our
>> customers. As far as Reporting Services goes, the current idea is that
>> they
>> would contact a Report Server hosted by us externally. As a result, we
>> are
>> looking at which security options are best and would appreciate some
>> insight
>> if anyone has any suggestions.
>> At the moment, the idea is to have a single report server with different
>> folders for each customer. We would like to implement security so that
>> each
>> customer can see their own folder, but no-one else can, and no-one can
>> see
>> the directory of folders. It does not appear to be feasible to do this
>> with
>> windows role-based security, so we are looking at writing our own custom
>> security extension. The problem here is that there does not seem to be a
>> way, when dealing with AceStructs, for example, to monitor which folder
>> the
>> user is in.
>> Anyway, my questions are:
>> 1. Is this whole approach wrong-headed, i.e. do we really need to have a
>> different ReportServer for each customer? We would like to avoid this if
>> possible.
>> 2. If we do use the same server with different folders, what is the best
>> way to check what folder the user is in and whether that is their correct
>> folder (in, for example, the IAuthorizationExtension.CheckAccess
>> implemented
>> method)?
>> As ever, any help very much appreciated.
>> Ed Allison
>>
>

Monday, March 12, 2012

Invalid Connection

Hey everyone, hope you all can help me with this problem.

We have a remotely hosted website, but we have a SQL server in our company (powers our instore portal). I have set up our router so that i can connect to remote desktop and sql server. I can connect to the remote desktop and i can connect to the sql server with query analyzer. On our local site i can set up a connection to look at sqlserver.underpargolfutah.org and it works fine, everything goes well.

Now here is the problem. On the hosted site i have set up the following

web.config >

<appSettings>

<addkey="sql_dsn"value="server=************.underpargolfutah.org;database=online;uid=sa;pwd=*******"/>

</appSettings>

default.aspx >

PublicClass shopDB
'publicly declare typical stuff for connections
Public connAs SqlConnection
Public cmdAs SqlCommand
Public readerAs SqlDataReader
Public dsnAsString = ConfigurationSettings.AppSettings("sql_dsn").ToString
PublicFunction getBaseSelectionsByType(ByVal type)
'declare the connection
conn =New SqlConnection(dsn)
'declare command
cmd =New SqlCommand("SELECT * FROM category", conn)
'open the connection
conn.Open()
'grab data
reader = cmd.ExecuteReader(CommandBehavior.CloseConnection)
Return reader
EndFunction

EndClass

This should all work but i get the following error

[SqlException: Invalid connection.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean& isInTransaction) +474
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +372
System.Data.SqlClient.SqlConnection.Open() +384
v3.shopDB.shopDB.getBaseSelectionsByType(Object type) in shopDB.vb:21
v3.shop_default.Page_Load(Object sender, EventArgs e) in default.aspx.vb:32
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +742

Any ideas? i am stumped.

Thanks in advance
-Darren

Hi Darren!

But it is not tradition way. I think, when you are going to make access to your mashine database from web hosting, then you need to grant the permission for dbaccess aspnet accout from web hosting. Do you know name of webhosting aspnet user? If it is. then do next:

osql -E -S (local)\YourSQLserverName -d yourdatabasename -Q "sp_grantdbaccess'your_aspnet_webhostingaccount'"
osql -E -S (local)\YourSQLserverName -dyourdatabasename-Q "sp_addrolemember 'db_owner','your_aspnet_webhostingaccount'"

Sincerely, LukCAD

Sunday, February 19, 2012

Internet Explorer Version 7.0 Beta 3 can not load Reporting Services

Hi, all!

Internet Explorer Version 7.0 Beta 3 can not load Reporting Services, please check this error. Because my company always using Reporting Services.

I open report OK but when choose and click View Report. Nothing load and IE 7 using a lots resource RAM. And I check many computer set up IE 7. they still error.

Please help me.

Thanks.

There have been some issues around that in the beta phase, but as the RC1 is on the road you should upgrade to this one.

HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de

|||

Just in addition: https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=157905

HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de|||

Dude, it's a MS beta.....

Software is like a new car, never buy one the first year it is introduced.

|||http://blogs.msdn.com/bwelcker/archive/2006/08/28/728739.aspx