Thursday, March 22, 2012
A way to add .Net classes in a report?
I have a project with a .vb class, that, when accessing a web page, based on
the user's login, I grab their Employee ID. With that, I can conceivably
create a method to get a list of employees who report to that person
Is there a way to include a .vb class in a report project, and then, access
a particular method (in this case, getting the list of direct reports), in
the document map?Elmo,
I have done something similar. You should be able to create a reportviewer
in an aspx page and access your class in the aspx code...pass the subsequent
values to the report.
billN
--
Message posted via http://www.sqlmonster.com|||Will I be able to use the same report file (.rdl) that I designed in a
Report Server Project in BI?
I tried adding a .rdl file to a ReportViewer control one time, and it wasn't
recognized.
"wnichols via SQLMonster.com" <u3357@.uwe> wrote in message
news:7e587ee1771a4@.uwe...
> Elmo,
> I have done something similar. You should be able to create a
> reportviewer
> in an aspx page and access your class in the aspx code...pass the
> subsequent
> values to the report.
> billN
> --
> Message posted via http://www.sqlmonster.com
>
Monday, March 19, 2012
A syntex problem.....I think
Can anybody help with this problem. I have looked high and low but find everything else but what to do with the brackets in a SQL VBA application.
Thanks,
DonThe use of brackets in a query is an MS-Access specific feature... VBA doesn't directly support that functionality. You will have to code the parameter entry screen and build the query in VBA.
-PatP
Friday, February 24, 2012
a question about Exec
When I run the following command on sql server:
exec ('print "OK"')
go
This message appears:
Server: Msg 128, Level 15, State 1, Line 1
The name 'OK' is not permitted in this context. Only constants,
expressions, or variables allowed here. Column names are not permitted.
Why? Thanks.findu_2005@.yahoo.com (findu_2005@.yahoo.com) writes:
Quote:
Originally Posted by
When I run the following command on sql server:
>
exec ('print "OK"')
go
>
This message appears:
>
Server: Msg 128, Level 15, State 1, Line 1
The name 'OK' is not permitted in this context. Only constants,
expressions, or variables allowed here. Column names are not permitted.
>
Why? Thanks.
Because when the setting QUOTED_IDENTIFIER is in effect, "" delmits
identifier. This permits you to use table names like Order Details, for
instance:
SELECT ... FROM "Order Details"
In the SQL Server world, we tend to use [] for this function, but "" is
what ANSI mandates.
QUOTED_IDENTIFIER is on by default in most contexts, but not when you
run from SQLCMD, OSQL or Enterprise Manager in SQL 2000. Or for that
matter all DB-Library applications.
When the setting is off, SQL Server reverts to the original behaviour
from 4.x days when you couls use both '' and "" to delimit strings.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Something like this will work
exec ('print ''OK''') . *Note: all are single quotes.
or you'll have to use SET QUOTED_IDENTIFIER OFF and then execute the
SQL.
Regards,
Thyagu.
Saturday, February 11, 2012
A line in a report
How can I make the width of the line to be set to the same as the width of a
matrix or table below it when the report is rendered?
I tried LineWidth "=ReportItems!Matrix1.width", but I got
"Report item expressions can only refer to other report items within the
same grouping scope or a containing grouping scope."
Thanks
BillIn the toolbox collection select line object. Place the line on the report,
then click on the line to 'activate' it. Grab one of the handles at the end
of the line an drag it to the length you want.
NOTE: you can also place the line on the report then use the properties view
to increase/decrease the length and width of the line, as well as the color,
type (solid, dashed, dotted, etc)
X
"bill" wrote:
> I would like to put a line across my report, for appearance.
> How can I make the width of the line to be set to the same as the width of a
> matrix or table below it when the report is rendered?
> I tried LineWidth "=ReportItems!Matrix1.width", but I got
> "Report item expressions can only refer to other report items within the
> same grouping scope or a containing grouping scope."
> Thanks
> Bill
>
>|||Do you know if the width can be set dynamically to the width of a matrix or
table when the report is produced?
Thanks for your help!
-Bill
"Xfonhe" <Xfonhe@.discussions.microsoft.com> wrote in message
news:CF4A40AE-D3C9-49A5-8A11-76E5F96F2EA2@.microsoft.com...
> In the toolbox collection select line object. Place the line on the
report,
> then click on the line to 'activate' it. Grab one of the handles at the
end
> of the line an drag it to the length you want.
> NOTE: you can also place the line on the report then use the properties
view
> to increase/decrease the length and width of the line, as well as the
color,
> type (solid, dashed, dotted, etc)
> X
> "bill" wrote:
> > I would like to put a line across my report, for appearance.
> >
> > How can I make the width of the line to be set to the same as the width
of a
> > matrix or table below it when the report is rendered?
> >
> > I tried LineWidth "=ReportItems!Matrix1.width", but I got
> > "Report item expressions can only refer to other report items within the
> > same grouping scope or a containing grouping scope."
> >
> > Thanks
> > Bill
> >
> >
> >|||Well, you can set the width by expression in the properties view in Report
Designer. I don't know of a built-in function to allow dynamic scaling of an
object in proporation to a second object. You will probably need to write
code to support it, then use the the =CODE() in the expression.
NOTE: to write custom code & embed in the report, eright-click on the blank
section of the layout view, select properties, then the Code tab.
Good luck!
X
"bill" wrote:
> Do you know if the width can be set dynamically to the width of a matrix or
> table when the report is produced?
> Thanks for your help!
> -Bill
> "Xfonhe" <Xfonhe@.discussions.microsoft.com> wrote in message
> news:CF4A40AE-D3C9-49A5-8A11-76E5F96F2EA2@.microsoft.com...
> > In the toolbox collection select line object. Place the line on the
> report,
> > then click on the line to 'activate' it. Grab one of the handles at the
> end
> > of the line an drag it to the length you want.
> >
> > NOTE: you can also place the line on the report then use the properties
> view
> > to increase/decrease the length and width of the line, as well as the
> color,
> > type (solid, dashed, dotted, etc)
> >
> > X
> >
> > "bill" wrote:
> >
> > > I would like to put a line across my report, for appearance.
> > >
> > > How can I make the width of the line to be set to the same as the width
> of a
> > > matrix or table below it when the report is rendered?
> > >
> > > I tried LineWidth "=ReportItems!Matrix1.width", but I got
> > > "Report item expressions can only refer to other report items within the
> > > same grouping scope or a containing grouping scope."
> > >
> > > Thanks
> > > Bill
> > >
> > >
> > >
>
>|||The line itself is not associated with the matrix. So when your matrix grows
or shrinks, the line stays at the same place, and it will look very awkward.
Instead of drawing a line, try use the border control on the rows of the
matrix you want the line to show up. Just like Excel, you can apply just the
top border, or the bottom border, this way the "border" would appear as a
line, and it will move according to your matrix.
"bill" wrote:
> Do you know if the width can be set dynamically to the width of a matrix or
> table when the report is produced?
> Thanks for your help!
> -Bill
> "Xfonhe" <Xfonhe@.discussions.microsoft.com> wrote in message
> news:CF4A40AE-D3C9-49A5-8A11-76E5F96F2EA2@.microsoft.com...
> > In the toolbox collection select line object. Place the line on the
> report,
> > then click on the line to 'activate' it. Grab one of the handles at the
> end
> > of the line an drag it to the length you want.
> >
> > NOTE: you can also place the line on the report then use the properties
> view
> > to increase/decrease the length and width of the line, as well as the
> color,
> > type (solid, dashed, dotted, etc)
> >
> > X
> >
> > "bill" wrote:
> >
> > > I would like to put a line across my report, for appearance.
> > >
> > > How can I make the width of the line to be set to the same as the width
> of a
> > > matrix or table below it when the report is rendered?
> > >
> > > I tried LineWidth "=ReportItems!Matrix1.width", but I got
> > > "Report item expressions can only refer to other report items within the
> > > same grouping scope or a containing grouping scope."
> > >
> > > Thanks
> > > Bill
> > >
> > >
> > >
>
>