Showing posts with label fields. Show all posts
Showing posts with label fields. Show all posts

Friday, March 30, 2012

Layout incorrect when using ReportViewer

Please can someone help me with this.

I have created a very simple SQL report which has a title, Image, 3 subtitles and some data fields.

When I view it is my VS designer and preview it looks perfect, however when I deploy and view the the report through my ReportViewer control all the labels get moved around and the entire thing is a mess.

If I then export it to PDF it looks perfect again... I am sure I am missing something obvious but I can't find it.

I have done absolutely no expression formatting or coding at all. It's a plain SQL query and plain result textboxes.

Could be that something is overlapping in your report. Make sure that none of the components or fields are overlapping even slightly with each other. Overlapping items usually do not get rendered correctly when viewed on HTML.

-Aayush

|||

Aayush Goyal wrote:

Could be that something is overlapping in your report. Make sure that none of the components or fields are overlapping even slightly with each other. Overlapping items usually do not get rendered correctly when viewed on HTML.

-Aayush

It actually turned out to be a combination of two things, I had some overlapping but it still failed after I fixed that. I then checked it in IE and it worked this time.

Now I need to find out why it is not working in Firefox?

Monday, March 26, 2012

Latency In Transactional Replication

During last couple of weeks some new Tables & Fields were added. SO both the
time i have to re-intialize the Replication. my question is about LATENCY
where i have seen for both the subscriber(SUB) for SUB-1 is 3.5 Hours &
SUB-2 is 21 hrs. Size of the PUBLISHER DB is 18GB. AS Latency are in
Millisecs i have mentioned in HOURS for better understanding. i want to know
how i can resolve this issue as every time when new table or fields are
added it takes 21-22 hours to complete Replication Re-intialization process.
Any help will be highly appreciated. Thanking you in advance.
Use sp_repladdcolumn. There's really no need to reinitialize, unless you are
changing a PK.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .
|||TWO new Tables were added with unique key for couple of fields & were
not going to be use in Transactional Replication due to limitation that
each table needs to have at least one PK. and this 2 tables as no PK.
So using sp_repladdcolumn will not help, i maybe wrong.
please correct me if i am wrong as i am not SQL expert. again any help
& to correct me will be appreciated.
Paul Ibison wrote:
> Use sp_repladdcolumn. There's really no need to reinitialize, unless you are
> changing a PK.
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com .
|||Dear Mr. Paul:
I have replied back with details & did see your
feedback. i will appreciate if you please kindly reply me at your
earliest & doing so will be highly appreciated.
thanks
Paul Ibison wrote:
> Now I'm confused - if you're adding tables to a publication this is
> supported and adding columns to an already published article is supported,
> but this seems to be not relevant to your case somehow. Is the problem that
> you want to add tables which don't have a PK? This is definitely
> unsupported, but you already know that, so please can you add a few more
> details about what it is that you want to do.
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com .

Monday, February 20, 2012

Large Keyword Search

I'm working on a project that will allow a user to search through approx 100,000 records in a SQL table. Three of the columns are 'text' fields that hold paragraphs of text. The user interface has a 'general search' option so that they can enter a number of key words and the database will return a count of the records found containing the keywords.

At the moment I split the input and then build a query based on their input. For instance if they enter 'hello world' the input is split into two strings 'hello' and 'world'. I then build the query in a loop and get a query like so:

Select Count(ID) as myCount FROM myTable WHERE (colOne like '%hello%' AND colOne like '%world%') OR (colTwo like '%hello%' AND colTwo like '%world%') OR (colThree like '%hello%' AND colThree like '%world%')

Unfortunately this query runs EXTREMELY slowly and just seems wrong. Is there a more efficient way I should be doing these types of searching? This method works ok on 100 records, but this is the first time I have worked on such a large database.

Is it also possible to search a text column and look for exact matches?

For instance I have 2 records with their textfield containing:

Rec 1: the news for today is blah blah.
Rec 1: this is a new item

If I currently search for 'new' (select colID from myTable where colOne like '%new%') I will get both these records, but I'd really only like to pull out the second record.

Any help would be great appreciated! :)

You could use Full Text and use Microsoft proprietry CONTAINS, FREETEXT and CONTAINSTABLE and FREETEXTTABLE. The former are predicate and the later are row functions. They are dependent on Full Text index which require the Microsoft Search Service to be populated. Hope this helps.

Sample

SELECT product_id, product_name, From products
WHERE FREETEXT (description, 'manage')

SELECT product_id, product_name, From products
WHERE CONTAINS (description, ' "config" ')

Kind regards,

Gift Peddie

Large fields freeze the report generation

Hi Group,
I have this subreport that displays information from 2 fields of type
nvarchar(4000).
If I try to preview the subreport from the designer, everything works fine -
there are about 2 pages of information displayed. Export to pdf works
normally.
After deploying it on the server, if I use the
http://server_name/Reports/... again everything works fine. Exporting to pdf
produces a 2-3 pages file in about 10 seconds.
The report that contains this subreport works fine - export to pdf goes
through with no problems.
But if I try to use our application that generates / displays the reports,
it just hangs there, after calling the Render method.
The aspnet_wp process on the server stays at about 93% until the Render
method times out (approx. 10 minutes).
I tried removing the two large nvarchar fields from the subreport - the
report starts working fine like any other report.
The information that should be displayed in the report is not even so much -
as I said before, it should generate about 2-3 pages in pdf.
We have more than 200 reports working fine, none of them complained about
large nvarchar fields.
Did anybody have this type of problem ?
Please help !
Thank you,
Andrei.Correction :
After more tests, this is what I have:
Generating the main report with the Report Manager on the server
(http://server/Reports/...) produces an output in 10 seconds.
But trying to export as PDF will lock the process until timeout.
If I remove the fields of type nvarchar(4000) from the SUBreport, then the
report export to PDF works fine.
Generating the SUBreport with the Report Manager on the server
(http://server/Reports/...) produces an output in less than 10 seconds
The export to PDF works fine.
Thank you,
Andrei.
"Andrei" <andrei.toma@.era-environmental.com> wrote in message
news:esEORK8EHHA.2464@.TK2MSFTNGP06.phx.gbl...
> Hi Group,
> I have this subreport that displays information from 2 fields of type
> nvarchar(4000).
> If I try to preview the subreport from the designer, everything works
> fine - there are about 2 pages of information displayed. Export to pdf
> works normally.
> After deploying it on the server, if I use the
> http://server_name/Reports/... again everything works fine. Exporting to
> pdf produces a 2-3 pages file in about 10 seconds.
> The report that contains this subreport works fine - export to pdf goes
> through with no problems.
> But if I try to use our application that generates / displays the reports,
> it just hangs there, after calling the Render method.
> The aspnet_wp process on the server stays at about 93% until the Render
> method times out (approx. 10 minutes).
> I tried removing the two large nvarchar fields from the subreport - the
> report starts working fine like any other report.
> The information that should be displayed in the report is not even so
> much - as I said before, it should generate about 2-3 pages in pdf.
> We have more than 200 reports working fine, none of them complained about
> large nvarchar fields.
> Did anybody have this type of problem ?
> Please help !
> Thank you,
> Andrei.
>