Showing posts with label page. Show all posts
Showing posts with label page. Show all posts

Wednesday, March 7, 2012

CLR Assemblies

From SQL 2005 docs (type "Designing Assemblies" in the index lookup; bottom
of the page):
Supported .NET Framework Assemblies
Users can refer to the following .NET Framework assemblies in SQL Server
2005 without registering them by using CREATE ASSEMBLY:
custommarshallers.dll
Microsoft.visualbasic.dll
Microsoft.visualc.dll
mscorlib.dll
system.data.dll
<snip> etc ...
Anyone know how? All I can think of is, for example:
CREATE TYPE dbo.Int32
EXTERNAL NAME mscorlib.[System.Int32]
But that errors with:
Msg 6267, Level 16, State 1, Line 1
Assembly "mscorlib" does not exist, or the user does not have permission to
reference it.
I may be reading that sentence wrong, but it sounds like you should be able
to register System.Int32 as a type in SQL 2005 (assuming it conforms to the
requirements for CLR UDTs), but how to refernece the assembly when it hasn't
been registered with CREATE ASSEMBLY? I don't think I'd actually want to use
core CLR types, but ran across it in the docs so now I'm curious.
Thanks - KHAs far as I know, there are a list of assemblies that are loaded from the
GAC by SQL Server and make available for use (since there is no need to
register them into each database). The rest of all asemblies (like user
assemblies) can only be loaded through CREATE ASSEMBLY.
--
HTH,
SriSamp
Email: srisamp@.gmail.com
Blog: http://blogs.sqlxml.org/srinivassampath
URL: http://www32.brinkster.com/srisamp
"KH" <KH@.discussions.microsoft.com> wrote in message
news:2E6A8137-DA4B-4367-A688-AFCDF06FB913@.microsoft.com...
> From SQL 2005 docs (type "Designing Assemblies" in the index lookup;
> bottom
> of the page):
> Supported .NET Framework Assemblies
> Users can refer to the following .NET Framework assemblies in SQL Server
> 2005 without registering them by using CREATE ASSEMBLY:
> custommarshallers.dll
> Microsoft.visualbasic.dll
> Microsoft.visualc.dll
> mscorlib.dll
> system.data.dll
> <snip> etc ...
> Anyone know how? All I can think of is, for example:
> CREATE TYPE dbo.Int32
> EXTERNAL NAME mscorlib.[System.Int32]
> But that errors with:
> Msg 6267, Level 16, State 1, Line 1
> Assembly "mscorlib" does not exist, or the user does not have permission
> to
> reference it.
> I may be reading that sentence wrong, but it sounds like you should be
> able
> to register System.Int32 as a type in SQL 2005 (assuming it conforms to
> the
> requirements for CLR UDTs), but how to refernece the assembly when it
> hasn't
> been registered with CREATE ASSEMBLY? I don't think I'd actually want to
> use
> core CLR types, but ran across it in the docs so now I'm curious.
> Thanks - KH
>|||"examnotes" <KH@.discussions.microsoft.com> wrote in
news:2E6A8137-DA4B-4367-A688-AFCDF06FB913@.microsoft.com:

> Users can refer to the following .NET Framework assemblies in SQL
> Server 2005 without registering them by using CREATE ASSEMBLY:
>
"Refer to" above, means that you can have a dependency on the assembly
without having to catalogue the assembly directly through CREATE
ASSEMBLY (as Sri says in his post). In other words the assemblies
mentioned are the only ones that are allowed to be loaded from the GAC.
All other assebmlies have to be created in the database in question.
Niels
****************************************
**********
* Niels Berglund
* http://staff.develop.com/nielsb
* nielsb@.no-spam.develop.com
* "A First Look at SQL Server 2005 for Developers"
* http://www.awprofessional.com/title/0321180593
****************************************
**********

Friday, February 24, 2012

Client-side Printing and page hesitation

When printing reports from my normal computer to my default printer, all but
one report print without any hesitation between pages. My boss prints
reports and gets a lot of hesitation between pages for most of the reports.
If I print to a differnt printer I too get a lot of hesitation betwen pages.
Does SRS print pages as graphics or as text? Are there any settings on the
server that can alter printing performance? Anyone else having issues with
print hesitation and found a solution to the problem?When u want 2 controll the print properties u should set them at the Report
Properties->layout.
All properties in this tab are 4 the print setting.
"Rob 'Spike' Stevens" wrote:
> When printing reports from my normal computer to my default printer, all but
> one report print without any hesitation between pages. My boss prints
> reports and gets a lot of hesitation between pages for most of the reports.
> If I print to a differnt printer I too get a lot of hesitation betwen pages.
> Does SRS print pages as graphics or as text? Are there any settings on the
> server that can alter printing performance? Anyone else having issues with
> print hesitation and found a solution to the problem?

Sunday, February 19, 2012

Client Side Printing

Ok, for the life of me I can't seem to get this to work. Whenever I used the client-side print for SRS2000 SP2 it will always print out a blank page at the end.

At first I thought it was the margins, because not matter what I did the right-most column would always get chopped off. It would preview and look great, but as soon as I printed the page the last column would be chopped in half and print on a separate page.

So to troubleshoot I created a table that had only one column that was placed in the center of the page (using padding). Event after doing this the column STILL got chopped in half and printed out in two pages. Yet previewed and looked like it would print out ok.

Any help would be greatly appreciated. This one is driving me crazy.

Ok scratch this one. Turns out I wasn't accounting for the margins that were being set somewere. Once I reduced the body and table width by .1 inch then the right hand column isn't chopped and the correct number of pages prints out (no blanks).

There report has no margin and when printing I was sure to set the margins to 0 there as well.

Anyone tell me where this margin is coming from? Is this printer specific?

Thanks

|||

Have you tried to go to REPORT PROPERTIES for the specific report?

and establish the width in CM or inches?

Did you also look at report headers and footers

How large is your "print frame"

Are you using RS 2000 or RS 2005?

Can Help u!

|||

RS 2000.

The body of the report is 8.5" x 11". In the report properties->layout the page width is also 8.5" x 11". In the same section all margins are set to 0. My table is the entire width of the body (i.e. also 8.5" wide).

Now when I print the report using the Active X client side print component there is a margin added to the report that I hadn't accounted for. This margin was chopping the right column off and having it print on a separate page. This margin exists even though no margins are set for the report and when printing there are no margins set there as well.

What had been confusing me was that no matter how wide I made the table it still printed two pages. What I didn't realize is that I had to reduce the width of the body as well.

So by setting the width of the body to 8.45" and the width of the table to the same 8.45" the report prints on one page as expected.

Now, that we are on the same page, where did this margin come from knowing that I did not set it anywhere? The printer, RS2000, the client side Active X control...?

Thanks

|||

Hi,
I rather experience a very peculiar problem. I have developed a page in asp.net, which has a Print button by itself. It has to take the user to the printer window (I have used window.print()). When the user selects the printer and says print the first and the third page ( third page being the last page) gets printed properly where as the second page will have problems with the right side margin. This page is getting created on the run depending on the user's inputs. When I view the print preview, I found that the text in the next line of the page also comes to the previous page resulting in the loss of datain the II page content alone.

For example,

In the actual page, if I have

When a page from the web is printed, sometimes the right
hand side centremeter will be cut off.
Microsoft has a knowledge base article about this problem:

The text in the print preview would be,

When a page from the web is printed, sometimes the right hand side centremeter will be cut off. Microsoft has a
knowledge base article about this problem:

therefore resulting in the loss of data. I have tried adjusting the right and left side margins, but without luck.

This happens even if i print it with/without back to back option.
Even if i ask for the II page alone to be printed twice instead of the whole web page content, both the pages have the right side margin lost.

The same content that appears in the II page if made to appear in the III page does not affect the right margin of the III page. Thus, it does not have any content related issues.

Printing with landscape option wont be a reasonable option for the user. So, that can be ruled out.

Please advise what could be the work around at teh earliest as i have to get back to the user.

Sunday, February 12, 2012

Clicked and Request Timed Out while Writing alot in DB

Hi All,

I am trying to make aound 20,000 enteries to an sql db table through a web form. Once I have clicked the page is timed out although at the backnd requets continues untill it is completed. I have thought and need expert opinion on that plesae.

Suppose on button clik there is code:

while true

--

create cards

--

end while

and how about if after the end while I have statement

response.redirect("progress.aspx")

would the page be moved to progres.aspx (which refreeses every 5 seconds) and creation would continue at the backend?

If it works then on progress page load event I would count the card creation until the count gives me exact number and have it refired o fisih.aspx

Thanks in advance and looking forwrad to hear from you people.

Regards,

Usman Ghani

What you're looking for is a way to do an asynchronous operation. You could do something like:

When someone clicks the button to create cards, you spawn a new thread and have that thread go to a sub that does the database insertions. That will free up the current thread to go back to finishing loading the UI. Also, as part of the page load, you're always looking in some place in the database for a record to indicate that it was completed. It's not really an optimal solution, but it's not that bad.

You could get fancy, and have the sub that checks to see if the cards are done get a count of the total amount completed. Anytime the page loads, it does a tally to see the status.

Be careful of creating threads too often if this is a server application. The runtime is better at thread allocation than we are; an asychronous page would be a smarter idea. And make sure any selections on a table with that much activity have the nolock hint.

|||

Hi

Here is a sample code to start a thread:

Public Sub SomeLongMethod_Thread()'first, declare a new Thread, passing the constructor the address 'of SomeLongMethod. NOTE: SomeLongMethod can be replaced with your 'own methodDim NewThreadAs Thread =New _ Thread(AddressOf SomeLongMethod)'next we set the priority of our thread to lowest, setting 'the priority to a higher level can cause unexpected results.NewThread.Priority = ThreadPriority.Lowest'finally we start the thread executingNewThread.Start()End Sub
Pls refer toThreading in ASP.NETfor details.